Skip to content

Change HEAP8.length assert in SAFE_HEAP_LOAD/_STORE() to instead asse…#18170

Merged
juj merged 1 commit intoemscripten-core:mainfrom
juj:safe_heap_sbrk_race
Nov 9, 2022
Merged

Change HEAP8.length assert in SAFE_HEAP_LOAD/_STORE() to instead asse…#18170
juj merged 1 commit intoemscripten-core:mainfrom
juj:safe_heap_sbrk_race

Conversation

@juj
Copy link
Collaborator

@juj juj commented Nov 9, 2022

Change HEAP8.length assert in SAFE_HEAP_LOAD/_STORE() to instead assert against wasmMemory.buffer.byteLength, because HEAP8.length may be out of date if another thread races to sbrk(). Related to test case in #18096.

Also improve the assert() tests to give a more meaningful assert failure.

…rt against wasmMemory.buffer.byteLength, because HEAP8.length may be out of date if another thread races to sbrk(). Related to test case in emscripten-core#18096.
@juj juj merged commit 6fabb08 into emscripten-core:main Nov 9, 2022
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.

2 participants