<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 - clang frontend segfault compiling FreeBSD world"
href="https://bugs.llvm.org/show_bug.cgi?id=32641">32641</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang frontend segfault compiling FreeBSD world
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>emaste@freebsd.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18278" name="attach_18278" title="reproduction .c and .sh">attachment 18278</a> <a href="attachment.cgi?id=18278&action=edit" title="reproduction .c and .sh">[details]</a></span>
reproduction .c and .sh
--- all_subdir_usr.bin/svn/lib/libapr_util ---
clang-5.0: error: unable to execute command: Segmentation fault (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 5.0.0 (<a href="https://github.com/llvm-mirror/clang.git">https://github.com/llvm-mirror/clang.git</a>
b3196fddb0623c60de3cfee3f85c2e518c7f8e4d)
(<a href="https://github.com/llvm-mirror/llvm.git">https://github.com/llvm-mirror/llvm.git</a>
944d939ce13980e02d603df3038eb7c4b8feac84)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /home/emaste/src/llvm/build/bin
clang-5.0: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang-5.0: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-5.0: note: diagnostic msg: /tmp/apr_reslist-260753.c
clang-5.0: note: diagnostic msg: /tmp/apr_reslist-260753.sh
(lldb) run
Process 83962 launching
Process 83962 launched: '/usr/home/emaste/src/llvm/build/bin/clang-5.0'
(x86_64)
Process 83962 stopped
* thread #1, stop reason = signal SIGSEGV: invalid address (fault address: 0x8)
frame #0: clang-5.0`(anonymous
namespace)::PeepholeOptimizer::findNextSource(unsigned int, unsigned int,
llvm::SmallDenseMap<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo::RegSubRegPair,
(anonymous namespace)::ValueTrackerResult, 4, (anonymous
namespace)::PeepholeOptimizer::findNextSource::DenseMapInfo<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo>, (anonymous
namespace)::PeepholeOptimizer::findNextSource::detail::DenseMapPair<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo, (anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo::RegSubRegPair>
<span class="quote">>&) [inlined] llvm::MachineOperand::getParent(this=0x0000000000000000) at</span >
MachineOperand.h:215
212
213 /// getParent - Return the instruction that this operand belongs to.
214 ///
-> 215 MachineInstr *getParent() { return ParentMI; }
216 const MachineInstr *getParent() const { return ParentMI; }
217
218 /// clearParent - Reset the parent pointer.
(lldb) bt
* thread #1, stop reason = signal SIGSEGV: invalid address (fault address: 0x8)
* frame #0: clang-5.0`(anonymous
namespace)::PeepholeOptimizer::findNextSource(unsigned int, unsigned int,
llvm::SmallDenseMap<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo::RegSubRegPair,
(anonymous namespace)::ValueTrackerResult, 4, (anonymous
namespace)::PeepholeOptimizer::findNextSource::DenseMapInfo<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo>, (anonymous
namespace)::PeepholeOptimizer::findNextSource::detail::DenseMapPair<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo, (anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo::RegSubRegPair>
<span class="quote">>&) [inlined] llvm::MachineOperand::getParent(this=0x0000000000000000) at</span >
MachineOperand.h:215
frame #1: clang-5.0`(anonymous
namespace)::PeepholeOptimizer::findNextSource(unsigned int, unsigned int,
llvm::SmallDenseMap<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo::RegSubRegPair,
(anonymous namespace)::ValueTrackerResult, 4, (anonymous
namespace)::PeepholeOptimizer::findNextSource::DenseMapInfo<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo>, (anonymous
namespace)::PeepholeOptimizer::findNextSource::detail::DenseMapPair<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo, (anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo::RegSubRegPair>
<span class="quote">>&) [inlined] llvm::MachineRegisterInfo::defusechain_iterator<false, true,</span >
false, true, false, false>::getOperandNo(void) const at
MachineRegisterInfo.h:953
frame #2: clang-5.0`(anonymous
namespace)::PeepholeOptimizer::findNextSource(unsigned int, unsigned int,
llvm::SmallDenseMap<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo::RegSubRegPair,
(anonymous namespace)::ValueTrackerResult, 4, (anonymous
namespace)::PeepholeOptimizer::findNextSource::DenseMapInfo<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo>, (anonymous
namespace)::PeepholeOptimizer::findNextSource::detail::DenseMapPair<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo, (anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo::RegSubRegPair>
<span class="quote">>&) [inlined] (anonymous namespace)::ValueTracker::getNextSource(void) at</span >
PeepholeOptimizer.cpp:1973
frame #3: clang-5.0`(anonymous
namespace)::PeepholeOptimizer::findNextSource(this=<unavailable>,
Reg=<unavailable>, SubReg=<unavailable>,
RewriteMap=<unavailable>)::PeepholeOptimizer::findNextSource::TargetInstrInfo::RegSubRegPair,
(anonymous namespace)::ValueTrackerResult, 4, (anonymous
namespace)::PeepholeOptimizer::findNextSource::DenseMapInfo<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo>, (anonymous
namespace)::PeepholeOptimizer::findNextSource::detail::DenseMapPair<(anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo, (anonymous
namespace)::PeepholeOptimizer::findNextSource::TargetInstrInfo::RegSubRegPair>
<span class="quote">>&) at PeepholeOptimizer.cpp:661</span >
frame #4: clang-5.0`(anonymous
namespace)::PeepholeOptimizer::runOnMachineFunction(llvm::MachineFunction&) at
PeepholeOptimizer.cpp:1224
frame #5: clang-5.0`(anonymous
namespace)::PeepholeOptimizer::runOnMachineFunction(this=<unavailable>,
MF=<unavailable>) at PeepholeOptimizer.cpp:1603
frame #6:
clang-5.0`llvm::MachineFunctionPass::runOnFunction(this=0x00000188faadbc50,
F=0x00000188fad68368) at MachineFunctionPass.cpp:62
frame #7: clang-5.0`llvm::FPPassManager::runOnFunction(this=<unavailable>,
F=<unavailable>) at LegacyPassManager.cpp:1513
frame #8:
clang-5.0`llvm::FPPassManager::runOnModule(this=0x00000188fad22d40,
M=<unavailable>) at LegacyPassManager.cpp:1534
frame #9: clang-5.0`llvm::legacy::PassManagerImpl::run(llvm::Module&) at
LegacyPassManager.cpp:1590
frame #10:
clang-5.0`llvm::legacy::PassManagerImpl::run(this=0x00000188faae8c00,
M=<unavailable>) at LegacyPassManager.cpp:1693
frame #11: clang-5.0`clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, clang::LangOptions const&::Module*, clang::BackendAction,
std::__1::unique_ptr<clang::LangOptions const&::raw_pwrite_stream,
clang::BackendAction::default_delete<std::__1::unique_ptr> >) at
BackendUtil.cpp:766
frame #12: clang-5.0`clang::EmitBackendOutput(Diags=<unavailable>,
HeaderOpts=<unavailable>, CGOpts=<unavailable>, TOpts=<unavailable>,
LOpts=<unavailable>, TDesc=0x00000188faa34540, M=<unavailable>,
Action=<unavailable>, OS=<unavailable>) at BackendUtil.cpp:1068
frame #13:
clang-5.0`clang::BackendConsumer::HandleTranslationUnit(this=0x00000188faa9f300,
C=<unavailable>) at CodeGenAction.cpp:258
frame #14: clang-5.0`clang::ParseAST(S=<unavailable>,
PrintStats=<unavailable>, SkipFunctionBodies=<unavailable>) at ParseAST.cpp:159
frame #15:
clang-5.0`clang::FrontendAction::Execute(this=0x00000188faa27180) at
FrontendAction.cpp:512
frame #16:
clang-5.0`clang::CompilerInstance::ExecuteAction(this=0x00000188faa22280,
Act=0x00000188faa27180) at CompilerInstance.cpp:969
frame #17: clang-5.0`clang::ExecuteCompilerInvocation(Clang=<unavailable>)
at ExecuteCompilerInvocation.cpp:249
frame #18: clang-5.0`char const* cc1_main(Argv=<unavailable>,
Argv0="/usr/home/emaste/src/llvm/build/bin/clang-5.0",
MainAddr=0x00000000011e1280) at cc1_main.cpp:221
frame #19: clang-5.0`main [inlined] llvm::StringRef
ExecuteCC1Tool(Tool=<unavailable>) at driver.cpp:299
frame #20: clang-5.0`main(argc_=<unavailable>, argv_=<unavailable>) at
driver.cpp:380
frame #21: 0x00000000011e117f clang-5.0`_start + 383
(lldb)</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>