[LLVMbugs] [Bug 16556] New: PPC: llc: realloc(): invalid pointer

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jul 7 09:28:54 PDT 2013


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

            Bug ID: 16556
           Summary: PPC: llc: realloc(): invalid pointer
           Product: libraries
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: kai at redstar.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10822
  --> http://llvm.org/bugs/attachment.cgi?id=10822&action=edit
.ll file crashing llc

The attached realloc.ll file causes the following failure on Linux/PPC:

*** glibc detected *** llc: realloc(): invalid pointer: 0xfff345e0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x86498)[0xee26498]
/lib/libc.so.6(realloc+0x300)[0xee2c09c]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm15SmallVectorBase8grow_podEPvjj+0x74)[0xf74626c]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZNK4llvm17PPCTargetLowering16LowerCall_DarwinENS_7SDValueES1_NS_11CallingConv2IDEbbRKNS_15SmallVectorImplINS_3ISD9OutputArgEEERKNS4_IS1_EERKNS4_INS5_8InputArgEEENS_5SDLocERNS_12SelectionDAGERSA_+0x748)[0xf2d4abc]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZNK4llvm14TargetLowering21LowerOperationWrapperEPNS_6SDNodeERNS_15SmallVectorImplINS_7SDValueEEERNS_12SelectionDAGE+0x54)[0xf557074]
[0x37]
/usr/lib/llvm/libLLVM-3.4svn.so(+0x41d908)[0xf4cd908]
/usr/lib/llvm/libLLVM-3.4svn.so(+0x43cf04)[0xf4ecf04]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm12SelectionDAG13LegalizeTypesEv+0x390)[0xf4ed300]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm16SelectionDAGISel17CodeGenAndEmitDAGEv+0xe8)[0xf58c5b0]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm16SelectionDAGISel16SelectBasicBlockENS_14ilist_iteratorIKNS_11InstructionEEES4_Rb+0xc8)[0xf58d904]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE+0x5c4)[0xf58e120]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm16SelectionDAGISel20runOnMachineFunctionERNS_15MachineFunctionE+0x408)[0xf58f3d0]
/usr/lib/llvm/libLLVM-3.4svn.so(+0x2024f8)[0xf2b24f8]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0xb8)[0xfbb8d04]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x1f0)[0xf941068]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x54)[0xf941140]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm13MPPassManager11runOnModuleERNS_6ModuleE+0x24c)[0xf940bb8]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm15PassManagerImpl3runERNS_6ModuleE+0xdc)[0xf940db0]
/usr/lib/llvm/libLLVM-3.4svn.so(_ZN4llvm11PassManager3runERNS_6ModuleE+0x28)[0xf940e64]
llc[0x10008910]
llc(main+0x118)[0x10007818]
/lib/libc.so.6(+0x23410)[0xedc3410]
/lib/libc.so.6(+0x235a0)[0xedc35a0]
======= Memory map: ========
00100000-00120000 r-xp 00000000 00:00 0                                  [vdso]
0ebf0000-0ec10000 r-xp 00000000 07:00 337062                            
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.6.3/libgcc_s.so.1
0ec10000-0ec20000 rw-p 00010000 07:00 337062                            
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.6.3/libgcc_s.so.1
0ec30000-0ece0000 r-xp 00000000 07:00 262701                            
/lib/libm-2.15.so
0ece0000-0ecf0000 rw-p 000a0000 07:00 262701                            
/lib/libm-2.15.so
0ed00000-0ed10000 r-xp 00000000 07:00 262565                            
/lib/libdl-2.15.so
0ed10000-0ed20000 rw-p 00000000 07:00 262565                            
/lib/libdl-2.15.so
0ed30000-0ed40000 r-xp 00000000 07:00 142978                            
/usr/lib/libffi.so.6.0.0
0ed40000-0ed50000 rw-p 00000000 07:00 142978                            
/usr/lib/libffi.so.6.0.0
0ed60000-0ed80000 r-xp 00000000 07:00 262586                            
/lib/libz.so.1.2.7
0ed80000-0ed90000 rw-p 00010000 07:00 262586                            
/lib/libz.so.1.2.7
0eda0000-0ef10000 r-xp 00000000 07:00 262548                            
/lib/libc-2.15.so
0ef10000-0ef20000 rw-p 00160000 07:00 262548                            
/lib/libc-2.15.so
0ef30000-0f040000 r-xp 00000000 07:00 337041                            
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.6.3/libstdc++.so.6.0.16
0f040000-0f050000 rw-p 00100000 07:00 337041                            
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.6.3/libstdc++.so.6.0.16
0f050000-0f060000 rw-p 00000000 00:00 0
0f070000-0f090000 r-xp 00000000 07:00 262425                            
/lib/libpthread-2.15.so
0f090000-0f0a0000 rw-p 00010000 07:00 262425                            
/lib/libpthread-2.15.so
0f0b0000-0ff90000 r-xp 00000000 07:00 343263                            
/usr/lib/llvm/libLLVM-3.4svn.so
0ff90000-0ffd0000 r--p 00ed0000 07:00 343263                            
/usr/lib/llvm/libLLVM-3.4svn.so
0ffd0000-0ffe0000 rw-p 00f10000 07:00 343263                            
/usr/lib/llvm/libLLVM-3.4svn.so
0ffe0000-0fff0000 rw-p 00000000 00:00 0
10000000-10020000 r-xp 00000000 07:00 343298                            
/usr/bin/llc
10020000-10030000 rw-p 00010000 07:00 343298                            
/usr/bin/llc
10390000-103c0000 rwxp 00000000 00:00 0                                  [heap]
f7890000-f78a0000 rw-p 00000000 00:00 0
f78a0000-f78c0000 r-xp 00000000 07:00 262558                            
/lib/ld-2.15.so
f78c0000-f78d0000 rw-p 00020000 07:00 262558                            
/lib/ld-2.15.so
ffdf0000-fff40000 rw-p 00000000 00:00 0                                 
[stack]
0  libLLVM-3.4svn.so 0x0f74486c llvm::sys::PrintStackTrace(_IO_FILE*) + 92
1  libLLVM-3.4svn.so 0x0f744a60
2  libLLVM-3.4svn.so 0x0f744c5c
3  linux-vdso32.so.1 0x00100364 __kernel_sigtramp32 + 0
4  linux-vdso32.so.1 0xfff33b18 __kernel_sigtramp32 + 4293081012
5  libc.so.6         0x0eddb894 abort + 604
6  libc.so.6         0x0ee1f2a8
7  libc.so.6         0x0ee26498
8  libc.so.6         0x0ee2c09c realloc + 768
9  libLLVM-3.4svn.so 0x0f74626c llvm::SmallVectorBase::grow_pod(void*, unsigned
int, unsigned int) + 116
10 libLLVM-3.4svn.so 0x0f2d4abc
llvm::PPCTargetLowering::LowerCall_Darwin(llvm::SDValue, llvm::SDValue,
llvm::CallingConv::ID, bool, bool, llvm::SmallVectorImpl<llvm::ISD::OutputArg>
const&, llvm::SmallVectorImpl<llvm::SDValue> const&,
llvm::SmallVectorImpl<llvm::ISD::InputArg> const&, llvm::SDLoc,
llvm::SelectionDAG&, llvm::SmallVectorImpl<llvm::SDValue>&) const + 1864
11 libLLVM-3.4svn.so 0x0f557074
llvm::TargetLowering::LowerOperationWrapper(llvm::SDNode*,
llvm::SmallVectorImpl<llvm::SDValue>&, llvm::SelectionDAG&) const + 84
12 libLLVM-3.4svn.so 0x00000037
llvm::TargetLowering::LowerOperationWrapper(llvm::SDNode*,
llvm::SmallVectorImpl<llvm::SDValue>&, llvm::SelectionDAG&) const + 4037709847
13 libLLVM-3.4svn.so 0x0f4cd908
14 libLLVM-3.4svn.so 0x0f4ecf04
15 libLLVM-3.4svn.so 0x0f4ed300 llvm::SelectionDAG::LegalizeTypes() + 912
16 libLLVM-3.4svn.so 0x0f58c5b0 llvm::SelectionDAGISel::CodeGenAndEmitDAG() +
232
17 libLLVM-3.4svn.so 0x0f58d904
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 200
18 libLLVM-3.4svn.so 0x0f58e120
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1476
19 libLLVM-3.4svn.so 0x0f58f3d0
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1032
20 libLLVM-3.4svn.so 0x0f2b24f8
21 libLLVM-3.4svn.so 0x0fbb8d04
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 184
22 libLLVM-3.4svn.so 0x0f941068
llvm::FPPassManager::runOnFunction(llvm::Function&) + 496
23 libLLVM-3.4svn.so 0x0f941140 llvm::FPPassManager::runOnModule(llvm::Module&)
+ 84
24 libLLVM-3.4svn.so 0x0f940bb8 llvm::MPPassManager::runOnModule(llvm::Module&)
+ 588
25 libLLVM-3.4svn.so 0x0f940db0 llvm::PassManagerImpl::run(llvm::Module&) + 220
26 libLLVM-3.4svn.so 0x0f940e64 llvm::PassManager::run(llvm::Module&) + 40
27 llc               0x10008910
28 llc               0x10007818 main + 280
29 libc.so.6         0x0edc3410
30 libc.so.6         0x0edc35a0
Stack dump:
0.      Program arguments: llc -O0 realloc.ll
1.      Running pass 'Function Pass Manager' on module 'realloc.ll'.
2.      Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on
function
'@_D4core4time12TickDuration30__T2toVAyaa7_7365636f6e6473TlZ2toMxFNaNbNfZl'
Aborted (core dumped)
1

I am running Gentoo.
gcc 4.6.3
glibc 2.15
LLVM 3.4 trunk

-- 
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/20130707/bc5d2aaf/attachment.html>


More information about the llvm-bugs mailing list