Enable stdio locking under Wasm Workers#26489
Open
sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
Open
Enable stdio locking under Wasm Workers#26489sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
Conversation
a20ccec to
c552f4a
Compare
Collaborator
Author
|
@kleisauke PTAL. I took your new test and verified that it fails on main today. |
c552f4a to
941f9da
Compare
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Mar 20, 2026
I noticed some code size issues while working on emscripten-core#26489 and gemini tracked them down to usage of the `printf` symbol. It turns out that just referencing the printf (even if the referencing function is not used) in a used object file can lead code bloat due to the weak symbol mechanism used in musl to track stdio usage (see __stdout_used, etc).
941f9da to
89f6d3d
Compare
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Mar 20, 2026
I noticed some code size issues while working on emscripten-core#26489 and gemini tracked them down to usage of the `printf` symbol. It turns out that just referencing the printf (even if the referencing function is not used) in a used object file can lead code bloat due to the weak symbol mechanism used in musl to track stdio usage (see __stdout_used, etc).
sbc100
added a commit
that referenced
this pull request
Mar 20, 2026
I noticed some code size issues while working on #26489 and gemini tracked them down to usage of the `printf` symbol. It turns out that just referencing the printf (even if the referencing function is not used) in a used object file can lead code bloat due to the weak symbol mechanism used in musl to track stdio usage (see __stdout_used, etc).
0fa8755 to
09d36d8
Compare
This change removes the use of pthread_self from musl's internal file locking mechanism. This is needed as part of my effort to remove all pthread symbols from the Wasm Workers builds.
09d36d8 to
a61a1ee
Compare
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.
This change removes the use of
pthread_selffrom musl's internal file locking mechanism, while enabled libc's internal threading state in once the first worker is started. The test changed here come from #18201This is needed as part of my effort to remove all pthread symbols from the Wasm Workers builds.