Closed avaer closed 3 years ago
It seems it's during stdio initialization:
Error
at _emscripten_return_address (geometry.js:5678)
at __ubsan_handle_dynamic_type_cache_miss (bin/geometry.wasm:wasm-function[6368]:0x1780ba)
at std::__2::__shared_count::__add_shared() (bin/geometry.wasm:wasm-function[1012]:0x3d56f)
at std::__2::locale::__imp::install(std::__2::locale::facet*, long) (bin/geometry.wasm:wasm-function[5596]:0x167d3d)
at void std::__2::locale::__imp::install<std::__2::collate<char> >(std::__2::collate<char>*) (bin/geometry.wasm:wasm-function[5532]:0x1677c9)
at std::__2::locale::__imp::__imp(unsigned long) (bin/geometry.wasm:wasm-function[5527]:0x1675f3)
at std::__2::locale::__imp& std::__2::(anonymous namespace)::make<std::__2::locale::__imp, unsigned int>(unsigned int) (bin/geometry.wasm:wasm-function[5646]:0x16843c)
at std::__2::locale::__imp::make_classic() (bin/geometry.wasm:wasm-function[5626]:0x16814a)
at std::__2::locale::classic() (bin/geometry.wasm:wasm-function[5624]:0x168117)
at std::__2::locale::__imp::make_global() (bin/geometry.wasm:wasm-function[5647]:0x168448)
at std::__2::locale::__global() (bin/geometry.wasm:wasm-function[5649]:0x168488)
at std::__2::locale::locale() (bin/geometry.wasm:wasm-function[5650]:0x1684b1)
at std::__2::basic_streambuf<char, std::__2::char_traits<char> >::basic_streambuf() (bin/geometry.wasm:wasm-function[4773]:0x1550de)
at std::__2::__stdinbuf<char>::__stdinbuf(_IO_FILE*, __mbstate_t*) (bin/geometry.wasm:wasm-function[4931]:0x156b69)
at std::__2::DoIOSInit::DoIOSInit() (bin/geometry.wasm:wasm-function[4930]:0x1569a8)
at std::__2::ios_base::Init::Init() (bin/geometry.wasm:wasm-function[4929]:0x15697f)
at __cxx_global_var_init (bin/geometry.wasm:wasm-function[4928]:0x156958)
at _GLOBAL__I_000101 (bin/geometry.wasm:wasm-function[4991]:0x157c48)
at __wasm_call_ctors (bin/geometry.wasm:wasm-function[54]:0x343d)
at geometry.js:1991
at func (geometry.js:2324)
at callRuntimeCallbacks (geometry.js:1680)
at initRuntime (geometry.js:1715)
at doRun (geometry.js:7679)
at run (geometry.js:7701)
at runCaller (geometry.js:7648)
at removeRunDependency (geometry.js:1907)
at geometry.js:2222
at Worker.worker.onmessage (geometry.js:2582)
Can you try to reproduce this with a smaller test case? It looks like any programs using iostreams should have the same behaviour.
Does it happen also when run on the main thread rather than a worker? How about if you remove USE_PTHREADS completely?
I've seen this issue a few times, but have never been able to get a reproducer. Any code you could share so I could take a look at this would be great.
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.
This was fixed in #13367.
Looks like UBSan is getting infinite recursion in the dynamic cast check:
Build command: