-
Notifications
You must be signed in to change notification settings - Fork 96
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
Segmentation fault with cyclic imports #567
Labels
bug
Something isn't working
Comments
bnoordhuis
added a commit
to bnoordhuis/quickjs
that referenced
this issue
Sep 30, 2024
Consider the following two files: // a.js import {f} from "b.js" export {f} And: // b.js import * as a from "a.js" export function f() {} Before this commit, it crashed with a nullptr dereference. Throw a "circular reference when looking for export" SyntaxError. No test because the test suite currently isn't equipped for tests that throw exceptions at import time. Fixes: quickjs-ng#567
Fix in #568. |
bnoordhuis
added a commit
to bnoordhuis/quickjs
that referenced
this issue
Oct 5, 2024
Consider the following two files: // a.js import {f} from "b.js" export {f} And: // b.js import * as a from "a.js" export function f() {} Before this commit, it crashed with a nullptr dereference. Throw a "circular reference when looking for export" SyntaxError. No test because the test suite currently isn't equipped for tests that throw exceptions at import time. Fixes: quickjs-ng#567
bnoordhuis
added a commit
to bnoordhuis/quickjs
that referenced
this issue
Oct 14, 2024
Before this commit it segfaulted, now it throws a SyntaxError. That's still not correct behavior but better than segfaulting. To be continued. Refs: quickjs-ng#567
bnoordhuis
added a commit
to bnoordhuis/quickjs
that referenced
this issue
Oct 16, 2024
Before this commit it segfaulted, now it throws a SyntaxError. That's still not correct behavior but better than segfaulting. To be continued. Refs: quickjs-ng#567
bnoordhuis
added a commit
to bnoordhuis/quickjs
that referenced
this issue
Oct 16, 2024
Before this commit it segfaulted, now it throws a SyntaxError. That's still not correct behavior but better than segfaulting. To be continued. Refs: quickjs-ng#567
bnoordhuis
added a commit
that referenced
this issue
Oct 16, 2024
Before this commit it segfaulted, now it throws a SyntaxError. That's still not correct behavior but better than segfaulting. To be continued. Includes a small run-test262 fix to handle Windows line endings. Refs: #567
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This bug was initially reported in bellard/quickjs#329, but it seams that there it didn't get any attention, so I'm reporting it here too.
To reproduce create two files
a.mjs
andb.mjs
and runqjs a.mjs
.a.mjs:
b.mjs:
There is no crash if
export { fb };
is removed froma.mjs
or the import inb.mjs
is changed toimport {} from "a.mjs";
.The text was updated successfully, but these errors were encountered: