[LLVMbugs] [Bug 5410] New: Crash in coalescer

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Nov 6 06:46:43 PST 2009


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

           Summary: Crash in coalescer
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: ARM
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: asl at math.spbu.ru
                CC: llvmbugs at cs.uiuc.edu


Consider the attached bytecode (both original & bugpoint-reduced). Running llc
yields a crash in coalescer:

$ ./llc -mcpu=cortex-a8 bugpoint-reduced-simplified.bc
0  llc             0x0000000000cb28d6
1  llc             0x0000000000cb2e72
2  libpthread.so.0 0x00007f0e3041b6f0
3  llc             0x0000000000a3306f
llvm::SimpleRegisterCoalescing::JoinIntervals(llvm::LiveInterval&,
llvm::LiveInterval&, bool&) + 2527
4  llc             0x0000000000a3931e
llvm::SimpleRegisterCoalescing::JoinCopy(llvm::CopyRec&, bool&) + 7898
5  llc             0x0000000000a39f9a
llvm::SimpleRegisterCoalescing::CopyCoalesceInMBB(llvm::MachineBasicBlock*,
std::vector<llvm::CopyRec, std::allocator<llvm::CopyRec> >&) + 1142
6  llc             0x0000000000a3a14e
llvm::SimpleRegisterCoalescing::joinIntervals() + 232
7  llc             0x0000000000a3a66f
llvm::SimpleRegisterCoalescing::runOnMachineFunction(llvm::MachineFunction&) +
735
8  llc             0x00000000009b8cb5
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 83
9  llc             0x0000000000c3595f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 329
10 llc             0x0000000000c375ef
llvm::FunctionPassManagerImpl::run(llvm::Function&) + 111
11 llc             0x0000000000c37796
llvm::FunctionPassManager::run(llvm::Function&) + 112
12 llc             0x0000000000401ec0 main + 3064
13 libc.so.6       0x00007f0e2f744a44 __libc_start_main + 244
14 llc             0x0000000000400249
Stack dump:
0.      Program arguments: ./llc -mcpu=cortex-a8 bugpoint-reduced-simplified.bc 
1.      Running pass 'Simple Register Coalescing' on function '@aaa'

valgrind is not quite as well:

$ valgrind ./llc -mcpu=cortex-a8 bugpoint-reduced-simplified.bc
==19537== Memcheck, a memory error detector.
==19537== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==19537== Using LibVEX rev 1884, a library for dynamic binary translation.
==19537== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==19537== Using valgrind-3.4.1, a dynamic binary instrumentation framework.
==19537== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==19537== For more details, rerun with: -v
==19537== 
==19537== Invalid read of size 8
==19537==    at 0xA3306F:
llvm::SimpleRegisterCoalescing::JoinIntervals(llvm::LiveInterval&,
llvm::LiveInterval&, bool&) (SimpleRegisterCoalescing.cpp:2233)
==19537==    by 0xA3931D:
llvm::SimpleRegisterCoalescing::JoinCopy(llvm::CopyRec&, bool&)
(SimpleRegisterCoalescing.cpp:1652)
==19537==    by 0xA39F99:
llvm::SimpleRegisterCoalescing::CopyCoalesceInMBB(llvm::MachineBasicBlock*,
std::vector<llvm::CopyRec, std::allocator<llvm::CopyRec> >&)
(SimpleRegisterCoalescing.cpp:2427)
==19537==    by 0xA3A14D: llvm::SimpleRegisterCoalescing::joinIntervals()
(SimpleRegisterCoalescing.cpp:2448)
==19537==    by 0xA3A66E:
llvm::SimpleRegisterCoalescing::runOnMachineFunction(llvm::MachineFunction&)
(SimpleRegisterCoalescing.cpp:2717)
==19537==    by 0x9B8CB4:
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(MachineFunctionPass.cpp:27)
==19537==    by 0xC3595E: llvm::FPPassManager::runOnFunction(llvm::Function&)
(PassManager.cpp:1330)
==19537==    by 0xC375EE: llvm::FunctionPassManagerImpl::run(llvm::Function&)
(PassManager.cpp:1282)
==19537==    by 0xC37795: llvm::FunctionPassManager::run(llvm::Function&)
(PassManager.cpp:1212)
==19537==    by 0x401EBF: main (llc.cpp:392)
==19537==  Address 0x10 is not stack'd, malloc'd or (recently) free'd


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