[PATCH] D118122: [WebAssembly] Refactor and fix emission of external IR global decls
Paulo Matos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 31 07:48:59 PST 2022
pmatos added inline comments.
================
Comment at: llvm/test/CodeGen/WebAssembly/table-types.ll:1
+; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types | FileCheck %s
+
----------------
bkramer wrote:
> This test crashes with -fsanitize=null because Subtarget is a nullptr.
>
> ```
> llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:183:56: runtime error: member call on null pointer of type 'llvm::WebAssemblySubtarget'
> #0 0x565025dd6a86 in llvm::WebAssemblyAsmPrinter::emitGlobalVariable(llvm::GlobalVariable const*) llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:183:56
> #1 0x56502684357b in llvm::AsmPrinter::doFinalization(llvm::Module&) llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1756:5
> #2 0x56502b16810e in llvm::FPPassManager::doFinalization(llvm::Module&) llvm/lib/IR/LegacyPassManager.cpp:1499:41
> #3 0x56502b1558ea in runOnModule llvm/lib/IR/LegacyPassManager.cpp:1586:41
> #4 0x56502b1558ea in llvm::legacy::PassManagerImpl::run(llvm::Module&) llvm/lib/IR/LegacyPassManager.cpp:540:44
> #5 0x56502b1683a4 in llvm::legacy::PassManager::run(llvm::Module&) llvm/lib/IR/LegacyPassManager.cpp:1677:14
> #6 0x5650238100ae in compileModule(char**, llvm::LLVMContext&) llvm/tools/llc/llc.cpp:719:8
> #7 0x565023809fb6 in main llvm/tools/llc/llc.cpp:417:22
> ```
>
> Probably not the fault of this change though, it just happens when there is no function. Any ideas how to fix it?
@bkramer Thanks for pointing this out. I am not at work atm. I will take a look as soon as I return. Feel free to revert if its causing some issues elsewhere. I am surprised you found this. I ran regularly all tests. Is there a specific mode which includes running tests with sanitizers?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118122/new/
https://reviews.llvm.org/D118122
More information about the llvm-commits
mailing list