[LLVMbugs] [Bug 340] NEW: Bytecode reader asserts on the attached input

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue May 18 12:14:59 PDT 2004


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=340

           Summary: Bytecode reader asserts on the attached input
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Bytecode Reader
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: criswell at uiuc.edu


The bytecode reader seems to fail on the attached input.  I suspect that it is a
bug in the verifier, since the problem occurs from a switch statement that
selects on a uint with each possible case typed as an int

This was reported by Mark Hills:

llvm-as file.ll
opt file.bc -o null.bc
opt: /home/vadve/criswell/llvm/include/Support/Casting.h:197: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
llvm::Constant, Y = llvm::Value*]: Assertion `isa<X>(Val) && "cast<Ty>()
argument of incompatible type!"' failed.
opt[0x861e78a]
opt[0x861e9aa]
opt[0x42029188]
opt(abort+0x16e)[0x4202a8c2]
opt[0x42022ecb]
opt(llvm::cast_retty<llvm::Constant, llvm::Value*>::ret_type
llvm::cast<llvm::Constant, llvm::Value*>(llvm::Value* const&)+0x3b)[0x83bcbd7]
opt(llvm::BytecodeParser::ParseInstruction(unsigned char const*&, unsigned char
const*, std::vector<unsigned, std::allocator<unsigned> >&,
llvm::BasicBlock*)+0x11f4)[0x83af6ec]
opt(llvm::BytecodeParser::ParseInstructionList(llvm::Function*, unsigned char
const*&, unsigned char const*)+0x2ca)[0x83b2ffc]
opt(llvm::BytecodeParser::materializeFunction(llvm::Function*)+0x58a)[0x83b3ae6]
opt(llvm::BytecodeParser::materializeModule()+0x5c)[0x83c2b76]
opt(llvm::ModuleProvider::releaseModule()+0x18)[0x83c8238]
opt(llvm::BytecodeParser::releaseModule()+0x11)[0x83c2b91]
opt(llvm::ParseBytecodeFile(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>,
std::allocator<char> >*)+0x39)[0x83b7b8d]
opt(main+0x6b)[0x83a5efb]
opt(__libc_start_main+0x95)[0x42017589]
opt(std::basic_ostream<char, std::char_traits<char> >& std::operator<<
<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&,
char)+0x5d)[0x83a5de1]
Abort (core dumped)



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