karelklic / canal

Abstract interpreter for real-world application programs
https://github.com/karelklic/canal/wiki
Other
32 stars 3 forks source link

Utils.h:152(dynCast) fatal error: std::bad_cast from N5Canal7Pointer7PointerE to N5Canal7Integer9ContainerE #131

Open xbrukner opened 11 years ago

xbrukner commented 11 years ago
/home/tomas/projekty/canal/lib/Utils.h:152(dynCast) fatal error: std::bad_cast from N5Canal7Pointer7PointerE to N5Canal7Integer9ContainerE
[bt]: (1) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Integer::Container const& Canal::dynCast<Canal::Integer::Container const&, Canal::Domain>(Canal::Domain const&)+0xb8 [0x400e3669]
[bt]: (2) /home/tomas/projekty/canal/lib/libcanal.so : +0xbd9ef [0x400e29ef]
[bt]: (3) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Integer::Container::urem(Canal::Domain const&, Canal::Domain const&)+0x31 [0x400e2c41]
[bt]: (4) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Operations::binaryOperation(llvm::BinaryOperator const&, Canal::State&, Canal::Domain& (Canal::Domain::*)(Canal::Domain const&, Canal::Domain const&))+0x126 [0x400f82ac]
[bt]: (5) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Operations::urem(llvm::BinaryOperator const&, Canal::State&)+0x3d [0x400f8fdb]
[bt]: (6) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Operations::interpretInstruction(llvm::Instruction const&, Canal::State&)+0xc4e [0x400f7d78]
[bt]: (7) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Interpreter::Iterator::interpretInstruction()+0x3f [0x400f2fa5]
[bt]: (8) /home/tomas/projekty/canal/tool/canal : State::run()+0x2e [0x80cb1de]
[bt]: (9) /home/tomas/projekty/canal/tool/canal : CommandRun::run(std::vector<std::string, std::allocator<std::string> > const&)+0x7b [0x80c5527]
[bt]: (10) /home/tomas/projekty/canal/tool/canal : Commands::executeLine(std::string const&)+0x1c2 [0x80c62f0]
[bt]: (11) /home/tomas/projekty/canal/tool/canal : main+0x139 [0x80b487d]
[bt]: (12) /lib/i386-linux-gnu/libc.so.6 : __libc_start_main+0xf3 [0x404324d3]
[bt]: (13) /home/tomas/projekty/canal/tool/canal() [0x80b43b5]

Files: http://www.fi.muni.cz/~xbrukner/integration/cat.c, http://www.fi.muni.cz/~xbrukner/integration/cat.s

xbrukner commented 11 years ago

Also another file, same cast, different backtrace:

/home/tomas/projekty/canal/lib/Utils.h:152(dynCast) fatal error: std::bad_cast from N5Canal7Pointer7PointerE to N5Canal7Integer9ContainerE
[bt]: (1) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Integer::Container const& Canal::dynCast<Canal::Integer::Container const&, Canal::Domain>(Canal::Domain const&)+0xb8 [0x400e3669]
[bt]: (2) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Integer::Container::join(Canal::Domain const&)+0x37 [0x400e2445]
[bt]: (3) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Pointer::Pointer::dereferenceAndMerge(Canal::State const&) const+0x1bf [0x401018b1]
[bt]: (4) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Operations::load(llvm::LoadInst const&, Canal::State&)+0x55 [0x400fa545]
[bt]: (5) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Operations::interpretInstruction(llvm::Instruction const&, Canal::State&)+0x749 [0x400f7873]
[bt]: (6) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Interpreter::Iterator::interpretInstruction()+0x3f [0x400f2fa5]
[bt]: (7) /home/tomas/projekty/canal/tool/canal : State::run()+0x2e [0x80cb1de]
[bt]: (8) /home/tomas/projekty/canal/tool/canal : CommandRun::run(std::vector<std::string, std::allocator<std::string> > const&)+0x7b [0x80c5527]
[bt]: (9) /home/tomas/projekty/canal/tool/canal : Commands::executeLine(std::string const&)+0x1c2 [0x80c62f0]
[bt]: (10) /home/tomas/projekty/canal/tool/canal : main+0x139 [0x80b487d]
[bt]: (11) /lib/i386-linux-gnu/libc.so.6 : __libc_start_main+0xf3 [0x404324d3]
[bt]: (12) /home/tomas/projekty/canal/tool/canal() [0x80b43b5]

Files: http://www.fi.muni.cz/~xbrukner/integration/comm.c, http://www.fi.muni.cz/~xbrukner/integration/comm.s