emscripten-core / emscripten-core/emscripten
Closure error with ASan + minimal_runtime
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
When using ASan with MINIMAL_RUNTIME=1 and -O2, closure errors out with:
```
building:ERROR: /tmp/emscripten_temp/test_exceptions.wasm.js.jso.js.jso.js:33: ERROR - [JSC_UNDEFINED_VARIABLE] variable runtimeInitialized is undeclared
if (runtimeInitialized) return _asan_c_load_1(ptr);
^^^^^^^^^^^^^^^^^^
```
From what I gather, MINIMAL_RUNTIME does not include the `runtimeInitialized` variable, but that variable is used by `_asan_js_load_1` and friends in runtime_safe_heap.js. What is the most appropriate course of action?
1) disallow using ASan with MINIMAL_RUNTIME
2) Add versions of `_asan_js_load1` and friends for use with MINIMAL_RUNTIME that do not depend on `runtimeInitialized` and assume it to be true.
3) something else?
Contributor guide
Assessment
This issue has not been assessed yet.