Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Nov 4, 2024

This allows program built with SHARED_MEMORY enabled to run in a single threaded context where SharedArrayBuffer is not defined (i.e. when crossOriginIsolated is false).

Fixes: #22837

@sbc100 sbc100 force-pushed the avoid_SharedArrayBuffer branch from b55621a to 7075487 Compare November 4, 2024 21:22
expected = 'pthread_create: environment does not support SharedArrayBuffer, pthreads are not available'
self.do_runf('hello_world.c', expected, assert_returncode=NON_ZERO, emcc_args=['--pre-js=pre.js'])
#
# We specifically test that we can call UTF8ToString which previously contained
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# We specifically test that we can call UTF8ToString which previously contained
# We specifically test that we can call UTF8ToString which in earlier Emscripten versions contained

This allows program built with `SHARED_MEMORY` enabled to run in a
single threaded context where `SharedArrayBuffer` is not defined (i.e.
when crossOriginIsolated is false).

Fixes: emscripten-core#22837
@sbc100 sbc100 force-pushed the avoid_SharedArrayBuffer branch from 7075487 to 6647b3a Compare November 4, 2024 23:14
@sbc100 sbc100 merged commit 7fcebb0 into emscripten-core:main Nov 4, 2024
1 of 10 checks passed
@sbc100 sbc100 deleted the avoid_SharedArrayBuffer branch November 4, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UTF8ToString does not work with -sWASM_WORKERS if window.crossOriginIsolated is false

2 participants