[LLVMbugs] [Bug 48] New: crash on input from C++ frontend
bugzilla-daemon at zion.cs.uiuc.edu
bugzilla-daemon at zion.cs.uiuc.edu
Thu Oct 16 20:15:44 PDT 2003
http://zion.cs.uiuc.edu/bugs/show_bug.cgi?id=48
Summary: crash on input from C++ frontend
Product: libraries
Version: trunk
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P2
Component: LLVM assembly language parser
AssignedTo: sabre at nondot.org
ReportedBy: gaeke+bugs at uiuc.edu
void %_ZNSt12strstreambufC2Ei() {
%tmp.20 = or bool %tmp.19, and (bool shl (bool false, ubyte 1), bool true)
}
The above input crashes llvm-as in the parser, with the message:
Assertion failed: (V1.getType()->isInteger() && V2.getType() == Type::UByteTy),
function operator<<, file
/usr/home/brg/work/llvm/include/llvm/ConstantHandling.h, line 179.
Abort (core dumped)
I got this input from compiling libstdc++-v3/src/strstream.cc, in the middle
of trying to build libstdc++ on FreeBSD. I reduced the test case to the above
instruction in the above-named method. I am unsure whether the statement is
valid llvm assembly.
The stack trace is as follows:
(gdb) where
#0 0x2834d763 in kill () from /usr/lib/libc.so.5
#1 0x283b8e8c in abort () from /usr/lib/libc.so.5
#2 0x28391f8f in __assert () from /usr/lib/libc.so.5
#3 0x08188872 in operator<< (V1=@0x866e180, V2=@0x866e540)
at ConstantHandling.h:179
#4 0x08164608 in ConstantFoldShiftInstruction(unsigned, Constant const*, Consta
nt const*) (Opcode=29, V1=0x866e180, V2=0x866e540) at ConstantHandling.cpp:139
#5 0x08168813 in ConstantExpr::getShiftTy(Type const*, unsigned, Constant*, Con
stant*) (ReqTy=0x866a680, Opcode=29, C1=0x866e180, C2=0x866e540)
at Constants.cpp:939
#6 0x0814cec4 in ConstantExpr::getShift(unsigned, Constant*, Constant*) (
Opcode=29, C1=0x866e180, C2=0x866e540) at Constants.h:527
#7 0x0813a4ac in llvmAsmparse() () at llvmAsmParser.y:1098
#8 0x08135fdd in RunVMAsmParser(std::string const&, __sFILE*) (
Filename=@0x826a138, F=0x283c71e0) at llvmAsmParser.y:601
#9 0x08133ab7 in ParseAssemblyFile(std::string const&) (Filename=@0x826a138)
at Parser.cpp:27
#10 0x0812faeb in main (argc=1, argv=0xbfbff528) at llvm-as.cpp:44
#11 0x0812f9f5 in _start ()
(gdb) up 4
#4 0x08164608 in ConstantFoldShiftInstruction(unsigned, Constant const*, Consta
nt const*) (Opcode=29, V1=0x866e180, V2=0x866e540) at ConstantHandling.cpp:139
139 case Instruction::Shl: return *V1 << *V2;
(gdb) p V1->dump()
bool false
(at this point gdb invariably crashes; who knows what else is going on.)
Apparently it doesn't like the bool shl (bool false, ubyte 1).
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list