karelklic / canal

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

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

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 N5Canal5Array9ExactSizeE to N5Canal7Pointer7PointerE
[bt]: (1) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Pointer::Pointer const& Canal::dynCast<Canal::Pointer::Pointer const&, Canal::Domain>(Canal::Domain const&)+0xb8 [0x400fe45f]
[bt]: (2) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Operations::getelementptr(llvm::GetElementPtrInst const&, Canal::State&)+0x11f [0x400fa7b5]
[bt]: (3) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Operations::interpretInstruction(llvm::Instruction const&, Canal::State&)+0x11a [0x400f7244]
[bt]: (4) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Interpreter::Iterator::interpretInstruction()+0x3f [0x400f2fa5]
[bt]: (5) /home/tomas/projekty/canal/tool/canal : State::run()+0x2e [0x80cb1de]
[bt]: (6) /home/tomas/projekty/canal/tool/canal : CommandRun::run(std::vector<std::string, std::allocator<std::string> > const&)+0x7b [0x80c5527]
[bt]: (7) /home/tomas/projekty/canal/tool/canal : Commands::executeLine(std::string const&)+0x1c2 [0x80c62f0]
[bt]: (8) /home/tomas/projekty/canal/tool/canal : main+0x139 [0x80b487d]
[bt]: (9) /lib/i386-linux-gnu/libc.so.6 : __libc_start_main+0xf3 [0x404324d3]
[bt]: (10) /home/tomas/projekty/canal/tool/canal() [0x80b43b5]

Files: http://www.fi.muni.cz/~xbrukner/integration/ptx.c, http://www.fi.muni.cz/~xbrukner/integration/ptx.s http://www.fi.muni.cz/~xbrukner/integration/du.c, http://www.fi.muni.cz/~xbrukner/integration/du.s http://www.fi.muni.cz/~xbrukner/integration/cp.c, http://www.fi.muni.cz/~xbrukner/integration/cp.s http://www.fi.muni.cz/~xbrukner/integration/cksum.c, http://www.fi.muni.cz/~xbrukner/integration/cksum.s http://www.fi.muni.cz/~xbrukner/integration/stty.c, http://www.fi.muni.cz/~xbrukner/integration/stty.s http://www.fi.muni.cz/~xbrukner/integration/touch.c, http://www.fi.muni.cz/~xbrukner/integration/touch.s http://www.fi.muni.cz/~xbrukner/integration/tail.c, http://www.fi.muni.cz/~xbrukner/integration/tail.s http://www.fi.muni.cz/~xbrukner/integration/rm.c, http://www.fi.muni.cz/~xbrukner/integration/rm.s http://www.fi.muni.cz/~xbrukner/integration/date.c, http://www.fi.muni.cz/~xbrukner/integration/date.s

xbrukner commented 11 years ago

Same bad cast, different backtrace:

/home/tomas/projekty/canal/lib/Utils.h:152(dynCast) fatal error: std::bad_cast from N5Canal7Integer9ContainerE to N5Canal7Pointer7PointerE
[bt]: (1) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Pointer::Pointer const& Canal::dynCast<Canal::Pointer::Pointer const&, Canal::Domain>(Canal::Domain const&)+0xb8 [0x400fe45f]
[bt]: (2) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Pointer::Pointer::join(Canal::Domain const&)+0x1f [0x401029df]
[bt]: (3) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Pointer::Pointer::store(Canal::Domain const&, Canal::State&) const+0x229 [0x40102107]
[bt]: (4) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Operations::store(llvm::StoreInst const&, Canal::State&)+0xd7 [0x400fa64b]
[bt]: (5) /home/tomas/projekty/canal/lib/libcanal.so : Canal::Operations::interpretInstruction(llvm::Instruction const&, Canal::State&)+0x330 [0x400f745a]
[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/dirname.c, http://www.fi.muni.cz/~xbrukner/integration/dirname.s