[lld] [lld][WebAssembly] Move input vectors from symtab to ctx. NFC (PR #78640)

Steven Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 09:36:56 PST 2024


steven-johnson wrote:

This change has apparently injected crashes in Halide when we use LLD in library form for WebAssembly... SISGSEV in calls to MarkLive::enqueueInitFunctions:

```
std::__u::vector<llvm::wasm::WasmInitFunc, std::__u::allocator<llvm::wasm::WasmInitFunc> >::begin (this=0x5959595959595bb1)
    at third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/vector:1375
1375	  return __make_iter(this->__begin_);
(gdb) bt
#0  std::__u::vector<llvm::wasm::WasmInitFunc, std::__u::allocator<llvm::wasm::WasmInitFunc> >::begin (this=0x5959595959595bb1)
    at third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/vector:1375
#1  0x0000555566472e4d in lld::wasm::(anonymous namespace)::MarkLive::enqueueInitFunctions (this=0x7fffffff4f30, obj=0x25c8bf7f8000)
    at third_party/llvm/llvm-project/lld/wasm/MarkLive.cpp:79
#2  0x0000555566472a7a in lld::wasm::(anonymous namespace)::MarkLive::run (this=0x7fffffff4f30)
    at third_party/llvm/llvm-project/lld/wasm/MarkLive.cpp:102
#3  0x000055556647182a in lld::wasm::markLive () at third_party/llvm/llvm-project/lld/wasm/MarkLive.cpp:150
#4  0x00005555663f4db2 in lld::wasm::(anonymous namespace)::LinkerDriver::linkerMain (this=0x7fffffff66e0, argsArr=...)
    at third_party/llvm/llvm-project/lld/wasm/Driver.cpp:1328
#5  0x00005555663f2a72 in lld::wasm::link (args=..., stdoutOS=..., stderrOS=..., exitEarly=false, disableOutput=false)
    at third_party/llvm/llvm-project/lld/wasm/Driver.cpp:101
#6  0x000055556653252a in lld::unsafeLldMain (args=..., stdoutOS=..., stderrOS=..., drivers=..., exitEarly=false)
    at third_party/llvm/llvm-project/lld/Common/DriverDispatcher.cpp:163
#7  0x0000555566533b49 in lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>)::$_0::operator()() const (this=0x7fffffff7190) at third_party/llvm/llvm-project/lld/Common/DriverDispatcher.cpp:188
#8  0x0000555566533a8c in llvm::function_ref<void ()>::callback_fn<lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>)::$_0>(long) (callable=140737488318864) at third_party/llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45
#9  0x000055556d8b0ea0 in llvm::function_ref<void ()>::operator()() const (this=0x7fffffff7108)
    at third_party/llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
#10 0x000055556eaacbf6 in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (this=0x7fffffff71c8, Fn=...)
    at third_party/llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426
#11 0x0000555566532753 in lld::lldMain (args=..., stdoutOS=..., stderrOS=..., drivers=...)
    at third_party/llvm/llvm-project/lld/Common/DriverDispatcher.cpp:187
```

https://github.com/llvm/llvm-project/pull/78640


More information about the llvm-commits mailing list