Repository navigation
Fix false-positive $SYSCALLS dependency in wrapSyscallFunction. NFC - #28034
Merged
Merged
Conversation
In `src/lib/libcore.js`, check `t.includes('SYSCALLS.')` instead of
`t.includes('SYSCALLS')` in `wrapSyscallFunction` so comments and
strings mentioning `SYSCALLS_REQUIRE_FILESYSTEM` (such as in
`fd_write`) do not pull in `$SYSCALLS` and `$UTF8ToString` when
`SYSCALLS_REQUIRE_FILESYSTEM=0`.
Split out from emscripten-core#27995
There was a problem hiding this comment.
Code Review
This pull request updates the dependency check in src/lib/libcore.js to look for 'SYSCALLS.' instead of 'SYSCALLS' to avoid incorrect matches, alongside updating the codesize test expectations. The reviewer points out that using 't.includes("SYSCALLS.")' is fragile and suggests a more robust regular expression with word boundaries to safely match valid references to 'SYSCALLS' without missing other access patterns.
sbc100
requested review from
dschuff and
kleisauke
and removed request for
kleisauke
October 20, 2026 21:42
kripken
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
src/lib/libcore.js, checkt.includes('SYSCALLS.')instead oft.includes('SYSCALLS')inwrapSyscallFunctionso comments and strings mentioningSYSCALLS_REQUIRE_FILESYSTEM(such as infd_write) do not pull in$SYSCALLSand$UTF8ToStringwhenSYSCALLS_REQUIRE_FILESYSTEM=0.Split out from #27999