[PATCH] D53329: Generate DIFile with main program if source is not available
Yonghong Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 14 17:03:59 PST 2018
yonghong-song added a comment.
F7549230: clang-crash-x86.tar <https://reviews.llvm.org/F7549230>
Just attached a new test case (clang-crash-x86.tar) which works even if the compiler is compiled with assertion on. JIT now generates x86-64 code instead of BPF code.
The error message looks like:
Failure value returned from cantFail wrapped call
UNREACHABLE executed at /home/yhs/work/llvm/include/llvm/Support/Error.h:732!
Aborted (core dumped)
The core stack looks like
Core was generated by `./clang-test'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f47542e0277 in raise () from /lib64/libc.so.6
(gdb) where
#0 0x00007f47542e0277 in raise () from /lib64/libc.so.6
#1 0x00007f47542e1968 in abort () from /lib64/libc.so.6
#2 0x00000000045f66b6 in llvm::llvm_unreachable_internal (msg=0x5df9ba0 "Failure value returned from cantFail wrapped call",
file=0x5df9bd8 "/home/yhs/work/llvm/include/llvm/Support/Error.h", line=732)
at /home/yhs/work/llvm/lib/Support/ErrorHandling.cpp:222
#3 0x00000000032482f1 in llvm::cantFail<unsigned int> (ValOrErr=...,
Msg=0x5df9ba0 "Failure value returned from cantFail wrapped call") at /home/yhs/work/llvm/include/llvm/Support/Error.h:732
#4 0x0000000003247183 in llvm::MCStreamer::EmitDwarfFileDirective (this=0x8625e40, FileNo=0, Directory=..., Filename=...,
Checksum=0x8640868, Source=..., CUID=0) at /home/yhs/work/llvm/include/llvm/MC/MCStreamer.h:786
#5 0x000000000324184b in llvm::DwarfCompileUnit::getOrCreateSourceID (this=0x8630ed0, File=0x861ae80)
at /home/yhs/work/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:110
#6 0x00000000032a1903 in llvm::DwarfUnit::addSourceLine (this=0x8630ed0, Die=..., Line=13, File=0x861ae80)
at /home/yhs/work/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:395
#7 0x00000000032a1a95 in llvm::DwarfUnit::addSourceLine (this=0x8630ed0, Die=..., G=0x861af10)
at /home/yhs/work/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:410
#8 0x0000000003241b5c in llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE (this=0x8630ed0, GV=0x861af10, GlobalExprs=...)
at /home/yhs/work/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:153
#9 0x000000000325b5f9 in llvm::DwarfDebug::beginModule (this=0x862ec00)
at /home/yhs/work/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:782
#10 0x000000000320636d in llvm::AsmPrinter::doInitialization (this=0x8626820, M=...)
at /home/yhs/work/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:309
#11 0x00000000024eeea4 in llvm::X86AsmPrinter::doInitialization (this=0x8626820, M=...)
at /home/yhs/work/llvm/lib/Target/X86/X86AsmPrinter.h:137
#12 0x00000000044aa4ee in llvm::FPPassManager::doInitialization (this=0x8633e10, M=...)
at /home/yhs/work/llvm/lib/IR/LegacyPassManager.cpp:1688
#13 0x00000000044aa6a2 in (anonymous namespace)::MPPassManager::runOnModule (this=0x868a380, M=...)
at /home/yhs/work/llvm/lib/IR/LegacyPassManager.cpp:1720
#14 0x00000000044ab027 in llvm::legacy::PassManagerImpl::run (this=0x860e710, M=...)
at /home/yhs/work/llvm/lib/IR/LegacyPassManager.cpp:1857
#15 0x00000000044ab2a7 in llvm::legacy::PassManager::run (this=0x7fff67f37fe0, M=...)
at /home/yhs/work/llvm/lib/IR/LegacyPassManager.cpp:1888
#16 0x0000000002d4a39b in llvm::MCJIT::emitObject (this=0x862ab00, M=0x85a7bd0)
at /home/yhs/work/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp:169
#17 0x0000000002d4a669 in llvm::MCJIT::generateCodeForModule (this=0x862ab00, M=0x85a7bd0)
at /home/yhs/work/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp:208
#18 0x0000000002d4ab68 in llvm::MCJIT::finalizeObject (this=0x862ab00)
at /home/yhs/work/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp:263
#19 0x000000000040ac10 in main ()
This coredump stack matches one of stacks I hit earlier with using bcc infrastructure to reproduce the issue.
Thanks!
Repository:
rC Clang
https://reviews.llvm.org/D53329
More information about the cfe-commits
mailing list