[LLVMbugs] [Bug 13905] New: Segmentation fault in SROA

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 24 03:20:21 PDT 2012


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

             Bug #: 13905
           Summary: Segmentation fault in SROA
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: kcc at google.com
                CC: chandlerc at gmail.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


test case by csmith/creduce
clang r164482, linux x86_64 

typedef int32_t;
typedef uint32_t;
a;
b;
c;
d;
e;
*fn1 (*p1) {
  int32_t *f = 0;
  int32_t **g = &f;
lbl_555:
  for (; a; a--)
    if (c)
      return f;
  *g = p1;
  if (b)
    goto lbl_555;
  e--;
  if (d)
    goto lbl_555;
  return 0;
}
fn2 () {
  uint32_t h = 0;
  fn1 (&h);
}



Program received signal SIGSEGV, Segmentation fault.
0x000000000102cbb0 in llvm::Instruction::eraseFromParent() ()
(gdb) bt
#0  0x000000000102cbb0 in llvm::Instruction::eraseFromParent() ()
#1  0x0000000000e87f33 in
llvm::LoadAndStorePromoter::run(llvm::SmallVectorImpl<llvm::Instruction*>
const&) const ()
#2  0x0000000001c1e1d0 in (anonymous
namespace)::SROA::promoteAllocas(llvm::Function&) ()
#3  0x0000000001c2af9d in (anonymous namespace)::SROA::runOnFunction ()
#4  0x000000000105abb9 in llvm::FPPassManager::runOnFunction(llvm::Function&)
()
#5  0x0000000000eade1a in (anonymous
namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&,
llvm::CallGraph&, bool&) ()
#6  0x0000000000eaf8b9 in (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&) ()
#7  0x000000000105a81e in llvm::MPPassManager::runOnModule(llvm::Module&) ()
#8  0x000000000105a92d in llvm::PassManagerImpl::run(llvm::Module&) ()
#9  0x0000000001147681 in clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) ()
#10 0x0000000001144dac in
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) ()
#11 0x00000000013c581e in clang::ParseAST(clang::Sema&, bool, bool) ()
#12 0x0000000001143b43 in clang::CodeGenAction::ExecuteAction() ()
#13 0x0000000001317ed9 in clang::FrontendAction::Execute() ()
#14 0x00000000012f4f31 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
#15 0x0000000001128024 in
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
#16 0x000000000063aa08 in cc1_main(char const**, char const**, char const*,
void*) ()
#17 0x00000000006375a3 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