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

Stack underflow with generators #189

Closed
Maltysen opened this issue Jul 27, 2023 · 2 comments
Closed

Stack underflow with generators #189

Maltysen opened this issue Jul 27, 2023 · 2 comments

Comments

@Maltysen
Copy link

Maltysen commented Jul 27, 2023

I'm using quickjs to run some javascript that has been run through the closure compiler and I got the error InternalError: stack underflow (op=132, pc=1454). This seems to be the op code for OP_iterator_close_return. I noticed some unsure comments in the quickjs source where this was emitted, but I don't understand the code well enough to debug this.

Changing closure to output es2017 so it could use native async/await and avoid generators lets the code run fine, so its something related to closure's shim for async/await.

I wanted to try isolating the error, but the project is large and i don't know how to interpret the program counter the pc= refers to. If someone could help me with that, I'll try isolating the error.

(Running with asan/ubsan gave some null pointer and other errors, but they seem unrelated, and prolly exist in normal operation).

P.S: quickjs is awesome and u guys r awesome for building it :)

@bellard
Copy link
Owner

bellard commented Dec 7, 2023

sorry but without a source code reproducing the error it is not possible to help

@bellard
Copy link
Owner

bellard commented Dec 13, 2023

The last commits should fix your issue

@bellard bellard closed this as completed Dec 17, 2023
TooTallNate pushed a commit to TooTallNate/quickjs that referenced this issue Dec 18, 2023
And replace the open-coded JS_NewBigInt() logic at its one call site
with the real thing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants