[LLVMbugs] [Bug 13916] New: SEGV in SROA in llvm::Instruction::eraseFromParent

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 25 04:49:24 PDT 2012


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

             Bug #: 13916
           Summary: SEGV in SROA in llvm::Instruction::eraseFromParent
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: chandlerc at gmail.com
        ReportedBy: kcc at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


test case by csmith/creduce
clang r164596, 64-bit linux

This is very similar to http://llvm.org/bugs/show_bug.cgi?id=13905
but a different repro. 


 typedef char uint8_t;
    struct U1 {
   uint8_t f0};
    void func_26 (  ) 
      {
      struct U1 l_1373;


        if ( safe_rshift_func_uint16_t_u_u (  ) )         l_1373 = l_1373;
        func_45 ( l_1373 );


     }

clang -c -w -O2 z3.c


Program received signal SIGSEGV, Segmentation fault.
0x0000000001177d7d in llvm::Instruction::eraseFromParent() ()
(gdb) bt
#0  0x0000000001177d7d in llvm::Instruction::eraseFromParent() ()
#1  0x0000000000fab09c in (anonymous namespace)::PromoteMem2Reg::run() ()
#2  0x0000000000fac3fb in llvm::PromoteMemToReg(std::vector<llvm::AllocaInst*,
std::allocator<llvm::AllocaInst*> > const&, llvm::DominatorTree&,
llvm::AliasSetTracker*) ()
#3  0x0000000001df3e90 in (anonymous
namespace)::SROA::promoteAllocas(llvm::Function&) ()
#4  0x0000000001df4e9e in (anonymous namespace)::SROA::runOnFunction ()
#5  0x00000000011a9d4d in llvm::FPPassManager::runOnFunction(llvm::Function&)
()
#6  0x00000000011a9efb in llvm::FunctionPassManagerImpl::run(llvm::Function&)
()
#7  0x00000000011aa20c in llvm::FunctionPassManager::run(llvm::Function&) ()
#8  0x00000000012a70f9 in clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) ()
#9  0x00000000012a4599 in
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) ()
#10 0x000000000154fcfe in clang::ParseAST(clang::Sema&, bool, bool) ()
#11 0x00000000012a2e64 in clang::CodeGenAction::ExecuteAction() ()
#12 0x000000000149ba51 in clang::FrontendAction::Execute() ()
#13 0x00000000014762f9 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
#14 0x0000000001284084 in
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
#15 0x000000000066abb0 in cc1_main(char const**, char const**, char const*,
void*) ()
#16 0x0000000000667271 in main ()

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list