[llvm-commits] PATCH: Fix crash in APInt.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Sat Jun 9 19:01:42 PDT 2012


On Jun 8, 2012, at 6:18 AM, James Benton wrote:

> Fixed the following crash in llvm::APInt::lshr when shiftAmt > BitWidth.
> Added a test which causes this crash.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000ff5c9d in llvm::APInt::lshr (this=0x7fffffffc880, shiftAmt=160)
>    at /home/james/private_vmware/llvm/lib/Support/APInt.cpp:1173
> 1173                 (pVal[i+offset+1] << (APINT_BITS_PER_WORD - wordShift));
> 
> 
> #0  0x0000000000ff5c9d in llvm::APInt::lshr (this=0x7fffffffc870, shiftAmt=160)
>    at llvm/lib/Support/APInt.cpp:1173
> #1  0x00000000009168d2 in (anonymous namespace)::DAGCombiner::visitAND (this=0x7fffffffcf90, N=0x181b3c0)
>    at llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2496
> <diff.txt>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


The test is failing here: http://lab.llvm.org:8011/builders/llvm-arm-linux/builds/1170

******************** TEST 'LLVM :: CodeGen/Generic/2012-06-08-APIntCrash.ll' FAILED ********************Script:
--
/wd/buildbot/llvm-arm-linux/llvm/Debug+Asserts/bin/llc < /wd/buildbot/llvm-arm-linux/llvm/test/CodeGen/Generic/2012-06-08-APIntCrash.ll
--
Exit Code: 134
Command Output (stderr):
--
Return operand #4 has unhandled type i32UNREACHABLE executed at CallingConvLower.cpp:112!
0  llc       0x01208534
1  llc       0x01208ebc
2  libc.so.6 0x4021cc10 __default_sa_restorer_v2 + 0
Stack dump:
0.	Program arguments: /wd/buildbot/llvm-arm-linux/llvm/Debug+Asserts/bin/llc 
1.	Running pass 'Function Pass Manager' on module '<stdin>'.
2.	Running pass 'ARM Instruction Selection' on function '@test1'
/wd/buildbot/llvm-arm-linux/llvm/test/CodeGen/Generic/Output/2012-06-08-APIntCrash.ll.script: line 2: 29742 Aborted                 '/wd/buildbot/llvm-arm-linux/llvm/Debug+Asserts/bin/llc' < '/wd/buildbot/llvm-arm-linux/llvm/test/CodeGen/Generic/2012-06-08-APIntCrash.ll'
--

********************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120609/86e76e1c/attachment.html>


More information about the llvm-commits mailing list