<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Random crash in simple C code"
href="https://bugs.llvm.org/show_bug.cgi?id=50611">50611</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Random crash in simple C code
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>12.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>schopf.dan@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24919" name="attach_24919" title="source file">attachment 24919</a> <a href="attachment.cgi?id=24919&action=edit" title="source file">[details]</a></span>
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 <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> 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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>