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
A few fixes related to CommonJS module loading #9540
Conversation
❌ @Jarred-Sumner 4 files with test failures on linux-x64: |
❌ @Jarred-Sumner 5 files with test failures on linux-x64-baseline: |
❌🪟 @Jarred-Sumner, there are 10 test regressions on Windows x86_64
|
❌ @Jarred-Sumner 7 files with test failures on bun-darwin-aarch64:
|
❌ @Jarred-Sumner 4 files with test failures on bun-darwin-x64:
|
nit: it seems the PR description is truncated at this point |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good now.
if you are worried about JS code being wrong, feel free to add more $assert
s into it (they are tree-shaken)
What does this PR do?
Bun.gc(true)
free more memoryCommonJSModule
store the JSC::SourceCode directly instead of usingJSC::JSSourceCode
. Goal is to free it earlier instead of whenever GC decides to free it.How did you verify your code works?
It doesn't work yet
It crashes in release builds, but not debug builds
I suspect something fishy with either GC or a C++ use-after-move somewhere. Worst case I revert it back