[LLVMbugs] [Bug 22064] New: lib/CodeGen/LexicalScopes.cpp:179: Assertion `DISubprogram(Scope).describes(MF->getFunction())' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 30 11:10:04 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=22064

            Bug ID: 22064
           Summary: lib/CodeGen/LexicalScopes.cpp:179: Assertion
                    `DISubprogram(Scope).describes(MF->getFunction())'
                    failed.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: mcrosier at codeaurora.org
                CC: dblaikie at gmail.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The above assertion began showing up in our 12/29 nightlies.  I did not verify
against ToT.

Reduced test case:
------------------------------------------
$> more test.cc
#include <fstream>

bool foo(const std::string &f) {
  std::ifstream in(f.c_str());
  if (!in)
    std::ofstream out(f.c_str());
}
------------------------------------------

Reproduce with:
clang -c -o test.o -mcpu=cortex-a53 -O2 -g test.cc

Full backtrace:
------------------------------------------

clang-3.6:
/prj/llvm-arm/home/nightly/src/community-mainline/llvm/lib/CodeGen/LexicalScopes.cpp:179:
llvm::LexicalScope*
llvm::LexicalScopes::getOrCreateRegularScope(llvm::MDNode*): Assertion
`DISubprogram(Scope).describes(MF->getFunction())' failed.
#0 0x100f8e2 llvm::sys::PrintStackTrace(_IO_FILE*)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x100f8e2)
#1 0x100dad1 SignalHandler(int)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x100dad1)
#2 0x7f6cfd1898f0 __restore_rt (/lib/libpthread.so.0+0xf8f0)
#3 0x7f6cfc467b25 gsignal
/build/buildd/eglibc-2.11.1/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:64:0
#4 0x7f6cfc46b670 abort /build/buildd/eglibc-2.11.1/stdlib/abort.c:94:0
#5 0x7f6cfc4609f1 __assert_fail
/build/buildd/eglibc-2.11.1/assert/assert.c:81:0
#6 0xc4b30c
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0xc4b30c)
#7 0xc49f45 llvm::LexicalScopes::getOrCreateLexicalScope(llvm::DebugLoc)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0xc49f45)
#8 0xc4b384 llvm::LexicalScopes::getMachineBasicBlocks(llvm::DebugLoc,
llvm::SmallPtrSetImpl<llvm::MachineBasicBlock const*>&)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0xc4b384)
#9 0xbf5386 (anonymous
namespace)::UserValueScopes::dominates(llvm::MachineBasicBlock*)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0xbf5386)
#10 0xbfdd0f (anonymous
namespace)::UserValue::computeIntervals(llvm::MachineRegisterInfo&,
llvm::TargetRegisterInfo const&, llvm::LiveIntervals&,
llvm::MachineDominatorTree&, (anonymous namespace)::UserValueScopes&)
(/prj/llvm-arm/home/nightly/install/community-main
line/cross/2014-12-29/bin/clang-3.6+0xbfdd0f)
#11 0xbff476
llvm::LiveDebugVariables::runOnMachineFunction(llvm::MachineFunction&)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0xbff476)
#12 0xd2c78f llvm::FPPassManager::runOnFunction(llvm::Function&)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0xd2c78f)
#13 0xd2cbfb llvm::FPPassManager::runOnModule(llvm::Module&)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0xd2cbfb)
#14 0xd2cf3d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0xd2cf3d)
#15 0x14169c6 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::StringRef, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) (/prj/llvm-arm/home/nightly/install/commu
nity-mainline/cross/2014-12-29/bin/clang-3.6+0x14169c6)
#16 0x1408a5c clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x1408a5c)
#17 0x19067a3 clang::ParseAST(clang::Sema&, bool, bool)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x19067a3)
#18 0x140976b clang::CodeGenAction::ExecuteAction()
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x140976b)
#19 0x118ead6 clang::FrontendAction::Execute()
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x118ead6)
#20 0x116e169 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x116e169)
#21 0x121661e clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x121661e)
#22 0x69ba58 cc1_main(llvm::ArrayRef<char const*>, char const*, void*)
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x69ba58)
#23 0x67bd16 main
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x67bd16)
#24 0x7f6cfc452c4d __libc_start_main
/build/buildd/eglibc-2.11.1/csu/libc-start.c:258:0
#25 0x6980c9 _start
(/prj/llvm-arm/home/nightly/install/community-mainline/cross/2014-12-29/bin/clang-3.6+0x6980c9)

-- 
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/20141230/d3e2ad02/attachment.html>


More information about the llvm-bugs mailing list