WASM Build Test Fails with TypeError: Cannot read properties of undefined (reading 'set')
envgap__libjxl__libjxl-4521
01 / FAILURE SIGNATURE
As reported upstream
TypeError: Cannot read properties of undefined (reading 'set')
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
a85895838affa3c52bf362d0f0078af54ece8a7a- Manifest
tools/wasm_demo/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
libjxl/libjxl #4521 · read the original issue
**Describe the bug**
When trying to build the wasm (WebAssembly) module, an error in a single test occurs:
```
4808/4818 Test #4818: test_wasm_jxl_decoder ............................................................................................................................................................................................................***Failed 0.15 sec
Running testSdr
/---/libjxl/tools/wasm_demo/jxl_decoder_test.js:47
jxlModule.HEAP8.set(encoded, buffer);
^
TypeError: Cannot read properties of undefined (reading 'set')
at testSdr (/---/libjxl/tools/wasm_demo/jxl_decoder_test.js:47:19)
at runTest (/---/libjxl/tools/wasm_demo/jxl_decoder_test.js:15:3)
at Array.forEach (<anonymous>)
at /---/libjxl/tools/wasm_demo/jxl_decoder_test.js:138:9
Node.js v22.15.1
```
**To Reproduce**
Run WASM build (with or without SIMD):
`BUILD_TARGET=wasm32 ENABLE_WASM_SIMD=1 emconfigure ./ci.sh release`
**Expected behavior**
The test should pass.
**Environment**
- OS: OpenSUSE Tumbleweed
- Compiler version: Clang 22.0.0, Emscripten/EMSDK 4.0.20
- CPU type: x86-64
- cjxl/djxl version string: cjxl 0.11.1 | SIMD supported: SSE, SSE2, SSE3, SSE4.1, SSE4.2, AVX, AVX2, Scalar04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]