emscripten-core / emscripten-core/emscripten
Assertion hit with simd128 + wasm=2 + safe_heap=1 combo
- Lingua principale
- C++
- Stelle
- 27.6k
- Fork
- 3.6k
- Merge medio
- 1g 14h
- PR unite (30g)
- 125
Descrizione
With a simple C++ hello world test file (or even just `int main(){}`), using `-msimd128`, `-sWASM=2` and `-sSAFE_HEAP` options together fails by hitting assertion in `AlignmentLowering.cpp`.
By removing any of those flags, or changing to `-sWASM=1`, the error goes away.
**Version of emscripten/emsdk:**
```
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.21 (f9e81472f1ce541eddece1d27c3632e148e9031a)
clang version 16.0.0 (https://github.com/llvm/llvm-project a4a29438f451370ed241dde30bfcaab0fdf2ab71)
Target: wasm32-unknown-emscripten
Thread model: posix
```
**Failing command line in full:**
```
D:\Some\Path>em++.bat -msimd128 -sWASM=2 -sSAFE_HEAP=1 .cpp -o .html
unhandled unaligned load
UNREACHABLE executed at C:\b\s\w\ir\cache\builder\emscripten-releases\binaryen\src\passes\AlignmentLowering.cpp:259!
em++: error: 'D:/SomePath/emsdk/upstream\bin\wasm2js --emscripten .wasm --mvp-features --enable-simd' failed (returned 3221226505)
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riproduci il failure con un file C++ minimale usando -msimd128, -sWASM=2 e -sSAFE_HEAP=1, quindi esamina AlignmentLowering.cpp di Binaryen nei pressi dell’assertion alla riga 259 e il percorso emcc-to-wasm2js. Confronta il comportamento dopo aver rimosso ciascun flag singolarmente oppure aver usato -sWASM=1; l’attività è completata quando la combinazione non genera più assertion ed è presente un test di regressione che copre il comando segnalato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, wasm
- Ambito
- compilers
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100