[LLVMbugs] [Bug 13943] New: null deref in RegisterCoalescer::eliminateDeadDefs / LiveRangeEdit::allUsesAvailableAt

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 27 06:59:55 PDT 2012


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

             Bug #: 13943
           Summary: null deref in RegisterCoalescer::eliminateDeadDefs /
                    LiveRangeEdit::allUsesAvailableAt
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: kcc at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


test by csmith+creduce
clang r164773, 64-bit linux


//=================================
a;
b;
c;
***d;
e;
f;
void
fn1 () {
  int *g[] = { 0, &a, 0, 0, 0, 0, 0, 0, 0 };
  for (;; c) {
    int **h = &g[6];
    fn2 (0);
    d = 0;
    fn3 (e & f == (*h = g[1]) );
    if (b)
      return;
  }
}
//=================================


clang  x.c   -c -w -O1


Program received signal SIGSEGV, Segmentation fault.
0x0000000000d0e64c in
llvm::LiveRangeEdit::allUsesAvailableAt(llvm::MachineInstr const*,
llvm::SlotIndex, llvm::SlotIndex) ()
(gdb) bt
#0  0x0000000000d0e64c in
llvm::LiveRangeEdit::allUsesAvailableAt(llvm::MachineInstr const*,
llvm::SlotIndex, llvm::SlotIndex) ()
#1  0x0000000000d0ec65 in llvm::LiveRangeEdit::foldAsLoad(llvm::LiveInterval*,
llvm::SmallVectorImpl<llvm::MachineInstr*>&) ()
#2  0x0000000000d0fa00 in
llvm::LiveRangeEdit::eliminateDeadDefs(llvm::SmallVectorImpl<llvm::MachineInstr*>&,
llvm::ArrayRef<unsigned int>) ()
#3  0x0000000000c621f9 in (anonymous
namespace)::RegisterCoalescer::eliminateDeadDefs() ()
#4  0x0000000000c66867 in (anonymous
namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&) ()
#5  0x0000000000c67e53 in (anonymous
namespace)::RegisterCoalescer::copyCoalesceInMBB(llvm::MachineBasicBlock*) ()
#6  0x0000000000c68663 in (anonymous
namespace)::RegisterCoalescer::runOnMachineFunction(llvm::MachineFunction&) ()
#7  0x0000000001060a39 in llvm::FPPassManager::runOnFunction(llvm::Function&)
()
#8  0x0000000001060ad3 in llvm::FPPassManager::runOnModule(llvm::Module&) ()
#9  0x000000000106069e in llvm::MPPassManager::runOnModule(llvm::Module&) ()
#10 0x00000000010607ad in llvm::PassManagerImpl::run(llvm::Module&) ()
#11 0x000000000114d5a8 in clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) ()
#12 0x000000000114ac7c in
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) ()
#13 0x00000000013cbf2e in clang::ParseAST(clang::Sema&, bool, bool) ()
#14 0x0000000001149a13 in clang::CodeGenAction::ExecuteAction() ()
#15 0x000000000131dc39 in clang::FrontendAction::Execute() ()
#16 0x00000000012fac81 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
#17 0x000000000112def4 in
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
#18 0x000000000063aef8 in cc1_main(char const**, char const**, char const*,
void*) ()

-- 
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