[llvm-bugs] [Bug 50611] New: Random crash in simple C code
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jun 7 22:45:53 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50611
Bug ID: 50611
Summary: Random crash in simple C code
Product: clang
Version: 12.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: schopf.dan at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Created attachment 24919
--> https://bugs.llvm.org/attachment.cgi?id=24919&action=edit
source file
After upgrading to Clang 12 I get a random crash when compiling a specific C
file. It happens roughly about 30% of the time when compiling this file.
Crash:
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/bin/clang -O2 -g3 -fno-omit-frame-pointer -fPIC
-c input.c
1. <eof> parser at end of file
2. Code generation
#0 0x00007f3532768643 (/usr/bin/../lib/libLLVM-12.so+0xb48643)
#1 0x00007f35327661b4 llvm::sys::CleanupOnSignal(unsigned long)
(/usr/bin/../lib/libLLVM-12.so+0xb461b4)
#2 0x00007f35326771e9 (/usr/bin/../lib/libLLVM-12.so+0xa571e9)
#3 0x00007f353187ada0 __restore_rt (/usr/bin/../lib/libc.so.6+0x3cda0)
#4 0x00007f3533103af0 llvm::DIE::getUnitDie() const
(/usr/bin/../lib/libLLVM-12.so+0x14e3af0)
#5 0x00007f3533124f3d llvm::DwarfDebug::finishEntityDefinitions()
(/usr/bin/../lib/libLLVM-12.so+0x1504f3d)
#6 0x00007f3533139456 llvm::DwarfDebug::finalizeModuleInfo()
(/usr/bin/../lib/libLLVM-12.so+0x1519456)
#7 0x00007f3533141130 llvm::DwarfDebug::endModule()
(/usr/bin/../lib/libLLVM-12.so+0x1521130)
#8 0x00007f35330ec026 llvm::AsmPrinter::doFinalization(llvm::Module&)
(/usr/bin/../lib/libLLVM-12.so+0x14cc026)
#9 0x00007f35328b967d llvm::FPPassManager::doFinalization(llvm::Module&)
(/usr/bin/../lib/libLLVM-12.so+0xc9967d)
#10 0x00007f35328c62b8 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/bin/../lib/libLLVM-12.so+0xca62b8)
#11 0x00007f3539752173 (/usr/bin/../lib/libclang-cpp.so.12+0x1898173)
#12 0x00007f3539754035 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> >)
(/usr/bin/../lib/libclang-cpp.so.12+0x189a035)
#13 0x00007f3539ad15e2 (/usr/bin/../lib/libclang-cpp.so.12+0x1c175e2)
#14 0x00007f35387f1659 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/bin/../lib/libclang-cpp.so.12+0x937659)
#15 0x00007f353a23c249 clang::FrontendAction::Execute()
(/usr/bin/../lib/libclang-cpp.so.12+0x2382249)
#16 0x00007f353a1d354e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/bin/../lib/libclang-cpp.so.12+0x231954e)
#17 0x00007f353a2bc929
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/bin/../lib/libclang-cpp.so.12+0x2402929)
#18 0x0000561f69ff88de cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/bin/clang+0x128de)
#19 0x0000561f69ff5ee8 (/usr/bin/clang+0xfee8)
#20 0x00007f3539ea4fd5 (/usr/bin/../lib/libclang-cpp.so.12+0x1feafd5)
#21 0x00007f35326772f3
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/usr/bin/../lib/libLLVM-12.so+0xa572f3)
#22 0x00007f3539ea5380 (/usr/bin/../lib/libclang-cpp.so.12+0x1feb380)
#23 0x00007f3539e79298
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/usr/bin/../lib/libclang-cpp.so.12+0x1fbf298)
#24 0x00007f3539e79d29
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/usr/bin/../lib/libclang-cpp.so.12+0x1fbfd29)
#25 0x00007f3539e89c5a
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/usr/bin/../lib/libclang-cpp.so.12+0x1fcfc5a)
#26 0x0000561f69ff3c13 main (/usr/bin/clang+0xdc13)
#27 0x00007f3531865b25 __libc_start_main (/usr/bin/../lib/libc.so.6+0x27b25)
#28 0x0000561f69ff586e _start (/usr/bin/clang+0xf86e)
clang-12: error: clang frontend command failed with exit code 139 (use -v to
see invocation)
clang version 12.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Attached is the file preprocessed by creduce. So far I have only been able to
reproduce this with the official Arch Linux package, the Ubuntu package from
apt.llvm.org does not seem to be affected.
--
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/20210608/a372c577/attachment-0001.html>
More information about the llvm-bugs
mailing list