WebAssembly / WebAssembly/binaryen
In I64ToI32Lowering pass, lowerReinterpretFloat64() and lowerReinterpretInt64() are not multithreading, ASAN, STACK_OVERLOW_CHECK or SAFE_HEAP safe
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
there are assumptions made that are unsafe for multithreaded Wasm2JS builds. The memory address zero could be trashed by other threads when they are reinterpreted as float64/int64.
Also the Emscripten STACK_OVERFLOW_CHECK, ASAN and SAFE_HEAP checks place a cookie at address 0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/passes/I64ToI32Lowering.cpp around lowerReinterpretFloat64() and lowerReinterpretInt64() at the referenced lines. Trace how the pass handles memory address zero and consider the multithreading, ASAN, STACK_OVERFLOW_CHECK, and SAFE_HEAP assumptions; the work is done when those lowerings are safe in the affected Wasm2JS builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100