Fix emrun_file_dump() to work in multithreaded builds.#26698
Open
juj wants to merge 1 commit intoemscripten-core:mainfrom
Open
Fix emrun_file_dump() to work in multithreaded builds.#26698juj wants to merge 1 commit intoemscripten-core:mainfrom
juj wants to merge 1 commit intoemscripten-core:mainfrom
Conversation
sbc100
reviewed
Apr 16, 2026
| self.assertContained('remember to add `--` between arguments', err) | ||
|
|
||
| @also_with_threads | ||
| def test_emrun(self): |
Collaborator
There was a problem hiding this comment.
IIRC we are not actually running these tests in CI since they got disabled a while back.
See #26182
We should certain look into fixing that.
sbc100
reviewed
Apr 16, 2026
| http.open("POST", "stdio.html?file=" + filename, true); | ||
| http.send(data); // XXX this does not work in workers, for some odd reason (issue #2681) | ||
| if (ArrayBuffer.isView(data) && typeof SharedArrayBuffer !== "undefined" && data.buffer instanceof SharedArrayBuffer) { | ||
| http.send(new data.constructor(data)); // Make a clone of the typed array of the same type, since http.send() does not allow SharedArrayBuffer backing. |
Collaborator
There was a problem hiding this comment.
Maybe just always go this. Its such a rare opertaion?\
Or at least do
if (.. ) {
data = new data.constructor(data);
}
http.send(data);
sbc100
reviewed
Apr 16, 2026
| out(`Dumping out file "${filename}" with ${data.length} bytes of data.`); | ||
| http.open("POST", "stdio.html?file=" + filename, true); | ||
| http.send(data); // XXX this does not work in workers, for some odd reason (issue #2681) | ||
| if (ArrayBuffer.isView(data) && typeof SharedArrayBuffer !== "undefined" && data.buffer instanceof SharedArrayBuffer) { |
Collaborator
There was a problem hiding this comment.
It you look at getUnsharedTextDecoderView I think we can replace this whole expression with just !(data.buffer instanceof ArrayBuffer)
Collaborator
|
Re the code size failures, here was an update that happened overnight. If you rebase that should now be fixed. |
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.
No description provided.