[LLVMbugs] [Bug 7938] New: llc crashes on certain inputs

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 19 09:57:17 PDT 2010


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

           Summary: llc crashes on certain inputs
           Product: new-bugs
           Version: 2.7
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: iisaev at ispras.ru
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=5386)
 --> (http://llvm.org/bugs/attachment.cgi?id=5386)
exploit input

A number of bugs discovered in pbc_dump by Avalanche dynamic analysis tool
(http://code.google.com/p/avalanche/).

llc crashes on certain exploit inputs (attached).


user at machine:$ gdb --args llvm-2.7/inst/bin/llc llc_exploits/exploit_0_0 

GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program:
/space/iisaev/avalanche5/branches/separate-analysis/llvm-2.7/inst/bin/llc
llc_exploits/exploit_0_0
[Thread debugging using libthread_db enabled]
[New Thread 0xb7d6d6d0 (LWP 27104)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7d6d6d0 (LWP 27104)]
0x099ab2bf in ?? ()
(gdb) bt
#0  0x099ab2bf in ?? ()
#1  0x085507de in llvm::ParseIRFile (Filename=@0x910c304, Err=@0xbfc502f4,
Context=@0x999dfd8)
    at
/space/iisaev/avalanche5/branches/separate-analysis/llvm-2.7/include/llvm/Support/IRReader.h:105
#2  0x08548e4b in main (argc=2, argv=0xbfc50474) at llc.cpp:228


user at machine:$ gdb --args llvm-2.7/inst/bin/llc llc_exploits/exploit_126_0 

GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program:
/space/iisaev/avalanche5/branches/separate-analysis/llvm-2.7/inst/bin/llc
llc_exploits/exploit_126_0
[Thread debugging using libthread_db enabled]
[New Thread 0xb7dfa6d0 (LWP 27117)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7dfa6d0 (LWP 27117)]
0x0859f834 in llvm::BitstreamCursor::Read (this=0x9ec5780, NumBits=2)
    at
/space/iisaev/avalanche5/branches/separate-analysis/llvm-2.7/include/llvm/Bitcode/BitstreamReader.h:284
284                  (NextChar[2] << 16) | (NextChar[3] << 24);
(gdb) p NextChar
$1 = (const unsigned char *) 0x3c6de80 <Address 0x3c6de80 out of bounds>
(gdb) bt
#0  0x0859f834 in llvm::BitstreamCursor::Read (this=0x9ec5780, NumBits=2)
    at
/space/iisaev/avalanche5/branches/separate-analysis/llvm-2.7/include/llvm/Bitcode/BitstreamReader.h:284
#1  0x0859fa13 in llvm::BitstreamCursor::ReadCode (this=0x9ec5780)
    at
/space/iisaev/avalanche5/branches/separate-analysis/llvm-2.7/include/llvm/Bitcode/BitstreamReader.h:353
#2  0x08594d47 in llvm::BitcodeReader::ParseBitcodeInto (this=0x9ec5750,
M=0x9ec5d38) at BitcodeReader.cpp:1550
#3  0x08594f08 in llvm::getLazyBitcodeModule (Buffer=0x9ec6860,
Context=@0x9eb7fd8, ErrMsg=0xbfddcba8)
    at BitcodeReader.cpp:2416
#4  0x08594fa5 in llvm::ParseBitcodeFile (Buffer=0x9ec6860, Context=@0x9eb7fd8,
ErrMsg=0xbfddcba8) at BitcodeReader.cpp:2432
#5  0x08550526 in llvm::ParseIR (Buffer=0x9ec6860, Err=@0xbfddcc74,
Context=@0x9eb7fd8)
    at
/space/iisaev/avalanche5/branches/separate-analysis/llvm-2.7/include/llvm/Support/IRReader.h:80
#6  0x085507de in llvm::ParseIRFile (Filename=@0x910c304, Err=@0xbfddcc74,
Context=@0x9eb7fd8)
    at
/space/iisaev/avalanche5/branches/separate-analysis/llvm-2.7/include/llvm/Support/IRReader.h:105
#7  0x08548e4b in main (argc=2, argv=0xbfddcdf4) at llc.cpp:228

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