The dlmalloc symbols are injected used weak aliases in dlmalloc.c: https://github.com/emscripten-core/emscripten/blob/0eab8e3148d072b53e925a2723c87dd21f366a26/system/lib/dlmalloc.c#L861
It looks like it does successfully find dlfree (since this abort comes from within a call to dlfree, no?). Assuming the `dlfree` in the callstack is a wasm frame then the callstack looks normal. What makes you think it can't find dlfree? The error message `abort(undefined)` could mean a number of things but one is that `dlfree` itself detected some issue and called abort (or indirectly via assert). cheers, sam On Wed, Feb 26, 2020 at 10:17 AM Walt Tucker <[email protected]> wrote: > With the llvm-wasm backend, I'm hitting a couple of instances where when > trying to free some memory with free(), emscripten is aborting at runtime > saying that dlfree() is undefined. From what I can tell, memory functions > are transformed to use the dlmalloc implementation that emscripten uses and > builds. When looking at the compiled library in my .emscripten_cache > (libdlmalloc-mt-debug.a), I see those functions defined in the text section > as expected(dlfree, dlmalloc, etc). > I'm curious when this transformation happens (it's not during > preprocessing), and if it's missing some other step. The reason I wonder > about that is because I also see references to emscripten_builtin_malloc > and emscripten_builtin_free. > > The error: > worker.js onmessage() captured an uncaught exception: RuntimeError: > abort(undefined) at jsStackTrace > stackTrace @xxx > abort @xxx > _abort @xxx > dlfree @xxx (our call to free) > ........ > > Has anyone seen this before, and is this something I'm doing wrong when > compiling/linking? This is using emscripten 1.39.7. > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/40fe2228-69d1-47a7-94a3-9ddb455e045b%40googlegroups.com > <https://groups.google.com/d/msgid/emscripten-discuss/40fe2228-69d1-47a7-94a3-9ddb455e045b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_VmRwN9_8%3DatMfvt_tGwbf1pY%2BE0z%2B49ydeXDRsTqUfg%40mail.gmail.com.
