[llvm-bugs] [Bug 32641] New: clang frontend segfault compiling FreeBSD world

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 12 10:42:44 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32641

            Bug ID: 32641
           Summary: clang frontend segfault compiling FreeBSD world
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: emaste at freebsd.org
                CC: llvm-bugs at lists.llvm.org

Created attachment 18278
  --> https://bugs.llvm.org/attachment.cgi?id=18278&action=edit
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 (https://github.com/llvm-mirror/clang.git
b3196fddb0623c60de3cfee3f85c2e518c7f8e4d)
(https://github.com/llvm-mirror/llvm.git
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
http://llvm.org/bugs/ 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>
>&) [inlined] llvm::MachineOperand::getParent(this=0x0000000000000000) at
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>
>&) [inlined] llvm::MachineOperand::getParent(this=0x0000000000000000) at
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>
>&) [inlined] llvm::MachineRegisterInfo::defusechain_iterator<false, true,
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>
>&) [inlined] (anonymous namespace)::ValueTracker::getNextSource(void) at
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>
>&) at PeepholeOptimizer.cpp:661
    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)

-- 
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/20170412/8a0b7527/attachment.html>


More information about the llvm-bugs mailing list