ChakraCore
ChakraCore copied to clipboard
ASSERTION Failure: (m_pc + m_funcState.size == m_currentSection.end) in ChakraCore/lib/WasmReader/WasmBinaryReader.cpp, line 1319
Commit hash
41ad58a9eebf8d52a83424c8fccfaacdb14105ec
Build platform
Ubuntu 20.04
Build steps
./build.sh --debug
poc
let foo = new Uint8Array([
0,
97,
115,
109,
1,
0,
0,
0,
1,
7,
1,
96,
2,
126,
127,
1,
127,
3,
2,
1,
0,
4,
4,
1,
112,
0,
4,
6,
'-0',
5,
127,
0
]);
let bar = new WebAssembly.Module(foo);
assert log
ASSERTION 2388397: (ChakraCore/lib/WasmReader/WasmBinaryReader.cpp, line 1319) m_pc + m_funcState.size == m_currentSection.end
Failure: (m_pc + m_funcState.size == m_currentSection.end)
Illegal instruction
I can reproduce this in debug mode, though it hits a more reasonable Wasm compilation error in release mode (which a malformed module should hit). I think we need to think whether this assert is necessary.