[llvm-bugs] [Bug 51454] New: Segfault in llvm::DIE::getUnitDie
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 12 04:13:43 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51454
Bug ID: 51454
Summary: Segfault in llvm::DIE::getUnitDie
Product: libraries
Version: 12.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: protze at itc.rwth-aachen.de
CC: llvm-bugs at lists.llvm.org
Created attachment 25123
--> https://bugs.llvm.org/attachment.cgi?id=25123&action=edit
Preprocessed source
The segfault occurs randomly during compilation. When executing a benchmark
with 177 kernels, the error occurs 1-2 times on my system.
release-12.0.1 source is compiled on ubuntu 18.04 using gcc-10 and these flags:
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release
-DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;compiler-rt;openmp'
I attach preprocessed source and script, although I cannot reproduce the
segfault with the script.
0. Program arguments: /llvm-12.0.1/install_tree/bin/clang-12 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -disable-llvm-verifier -discard-value-names -main-file-name
DRB112-linear-orig-no.c -mrelocation-model static -mframe-pointer=all
-fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -tune-cpu generic -fno-split-dwarf-inlining
-debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb
-fprofile-update=atomic -resource-dir
/llvm-12.0.1/install_tree/lib/clang/12.0.1 -internal-isystem /usr/local/include
-internal-isystem /llvm-12.0.1/install_tree/lib/clang/12.0.1/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /home/drb/dataracebench -ferror-limit 19 -fopenmp
-fopenmp-cuda-parallel-target-regions -fsanitize=thread -fgnuc-version=4.2.1
-fcolor-diagnostics -faddrsig -o /tmp/DRB112-linear-orig-no-9f0161.o -x c
micro-benchmarks/DRB112-linear-orig-no.c
1. <eof> parser at end of file
2. Code generation
#0 0x0000558590b8cc5d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/llvm-12.0.1/install_tree/bin/clang-12+0x3010c5d)
#1 0x0000558590b8a964 llvm::sys::RunSignalHandlers()
(/llvm-12.0.1/install_tree/bin/clang-12+0x300e964)
#2 0x0000558590b8aadb SignalHandler(int)
(/llvm-12.0.1/install_tree/bin/clang-12+0x300eadb)
#3 0x00001481b0b18980 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#4 0x0000558591746400 llvm::DIE::getUnitDie() const
(/llvm-12.0.1/install_tree/bin/clang-12+0x3bca400)
#5 0x000055859175168c llvm::DwarfDebug::finishEntityDefinitions()
(/llvm-12.0.1/install_tree/bin/clang-12+0x3bd568c)
#6 0x00005585917699d5 llvm::DwarfDebug::finalizeModuleInfo()
(/llvm-12.0.1/install_tree/bin/clang-12+0x3bed9d5)
#7 0x000055859176cb18 llvm::DwarfDebug::endModule()
(/llvm-12.0.1/install_tree/bin/clang-12+0x3bf0b18)
#8 0x0000558591738b89 llvm::AsmPrinter::doFinalization(llvm::Module&)
(/llvm-12.0.1/install_tree/bin/clang-12+0x3bbcb89)
#9 0x000055859036848d llvm::FPPassManager::doFinalization(llvm::Module&)
(.localalias) (/llvm-12.0.1/install_tree/bin/clang-12+0x27ec48d)
#10 0x00005585903742b0 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/llvm-12.0.1/install_tree/bin/clang-12+0x27f82b0)
#11 0x0000558590e46e9f clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/llvm-12.0.1/install_tree/bin/clang-12+0x32cae9f)
#12 0x0000558591ad27e4
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/llvm-12.0.1/install_tree/bin/clang-12+0x3f567e4)
#13 0x00005585924bbde9 clang::ParseAST(clang::Sema&, bool, bool)
(/llvm-12.0.1/install_tree/bin/clang-12+0x493fde9)
#14 0x0000558591479e29 clang::FrontendAction::Execute()
(/llvm-12.0.1/install_tree/bin/clang-12+0x38fde29)
#15 0x000055859141a68b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/llvm-12.0.1/install_tree/bin/clang-12+0x389e68b)
#16 0x000055859152b8b8
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/llvm-12.0.1/install_tree/bin/clang-12+0x39af8b8)
#17 0x000055858ea1eb04 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/llvm-12.0.1/install_tree/bin/clang-12+0xea2b04)
#18 0x000055858ea1c257 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/llvm-12.0.1/install_tree/bin/clang-12+0xea0257)
#19 0x000055858e96a24c main (/llvm-12.0.1/install_tree/bin/clang-12+0xdee24c)
#20 0x00001481afb6fbf7 __libc_start_main
/build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
#21 0x000055858ea1bbfa _start (/llvm-12.0.1/install_tree/bin/clang-12+0xe9fbfa)
clang-12: error: unable to execute command: Segmentation fault (core dumped)
clang-12: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 12.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-12: note: diagnostic msg:
********************
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210812/1b6774ea/attachment.html>
More information about the llvm-bugs
mailing list