Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken JS_READ_OBJ_ROM_DATA flag #206

Closed
bnoordhuis opened this issue Dec 11, 2023 · 1 comment · Fixed by #216
Closed

Broken JS_READ_OBJ_ROM_DATA flag #206

bnoordhuis opened this issue Dec 11, 2023 · 1 comment · Fixed by #216
Labels
bug Something isn't working

Comments

@bnoordhuis
Copy link
Contributor

This JS_ReadObject() flag no longer works for bytecode. The IC opcodes introduced in #120 are patched during execution.

I can see a few solutions:

  1. disable ICs when the bytecode buffer should be considered immutable

  2. make a copy of the bytecode buffer in JS_ReadFunctionBytecode()

  3. remove the flag

I'm leaning towards option 3 so if anyone is using the flag, now would be a good time to speak up. :-)

@bnoordhuis bnoordhuis added the bug Something isn't working label Dec 11, 2023
@saghul
Copy link
Contributor

saghul commented Dec 11, 2023

Agreed with option 3.

bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Dec 14, 2023
This JS_ReadObject() flag no longer works for bytecode. The IC opcodes
are patched during execution.

Fixes: quickjs-ng#206
Refs: quickjs-ng#120
bnoordhuis added a commit that referenced this issue Dec 14, 2023
This JS_ReadObject() flag no longer works for bytecode. The IC opcodes
are patched during execution.

Fixes: #206
Refs: #120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants