[PATCH] D90948: [WebAssembly] call_indirect issues table number relocs

Andy Wingo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 1 07:29:50 PST 2021


wingo added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp:115
+  // MVP object files can't have symtab entries for tables.
+  if (!(Subtarget && Subtarget->hasReferenceTypes()))
+    Sym->setOmitFromLinkingSection();
----------------
Relative to the previously landed patch, this is the change -- Subtarget may be NULL.  This is what was causing the crash.  I don't really know in what circumstances this happens -- it happens that the [file that causes the error](https://github.com/emscripten-core/emscripten/blob/master/system/lib/libc/musl/src/stdio/stderr.c) defines no functions, so perhaps the "subtarget" field of the module was never set.  Relanding as I've tested against emscripten and it seems like an obvious change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90948/new/

https://reviews.llvm.org/D90948



More information about the llvm-commits mailing list