Failure to use UBSan
Hello,
$ emcc --version emcc (Emscripten gcc/clang-like replacement) 1.38.41 (commit d94e9fbc89fce94a7f4135786f551ef7e00bf161)
I tried to follow the steps from:
https://emscripten.org/docs/debugging/Sanitizers.html#undefined-behaviour-sanitizer
but couldn't manage to compile using the -fsanitize=undefined flag.
$ emcc -fsanitize=undefined null-assign.c Traceback (most recent call last): File "/Users/XXX/emsdk/fastcomp/emscripten/emcc.py", line 3547, in
sys.exit(run(sys.argv)) File "/Users/XXX/emsdk/fastcomp/emscripten/emcc.py", line 1957, in run extra_files_to_link += system_libs.calculate([f for , f in sorted(temp_files)] + extra_files_to_link, in_temp, stdout=None, stderr_=None, forced=forced_stdlibs) File "/Users/XXX/emsdk/fastcomp/emscripten/tools/system_libs.py", line 1274, in calculate add_library(system_libs_map['libubsan_rt_wasm']) KeyError: 'libubsan_rt_wasm'
I did a emcc --clean-cache.
I tried with 1.38.39 as well.
Thanks,
It seems like you are trying to use UBSan with the old fastcomp backend. That is not supported. You will need to use the upstream LLVM backend instead. See here for instructions.