#76 terminate called after throwing an instance of 'std::out_of_range' (SSLParser::yyparse)

v1.0 (example)
open
nobody
5
2015-01-07
2013-07-30
No

(gdb) run
Starting program: boomerang ~/.wine/drive_c/windows/hh.exe
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff59bc700 (LWP 8269)]
Boomerang alpha 0.3.1 09/Sep/2006
loading...
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::replace

Program received signal SIGABRT, Aborted.
0x00007ffff5c0e3d5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt

0 0x00007ffff5c0e3d5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

1 0x00007ffff5c0f858 in __GI_abort () at abort.c:90

2 0x00007ffff64ff8cd in gnu_cxx::verbose_terminate_handler () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95

3 0x00007ffff64fd9c6 in cxxabiv1::terminate (handler=<optimized out="">) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:40

4 0x00007ffff64fd9f3 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:50

5 0x00007ffff64fdc1e in cxxabiv1::cxa_throw (obj=0x991bf0, tinfo=<optimized out="">, dest=<optimized out="">) at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:83

6 0x00007ffff654f2ed in std::throw_out_of_range (s=0x7ffff65646ab "basic_string::replace") at ../../../../../libstdc++-v3/src/c++11/functexcept.cc:82

7 0x00007ffff655b376 in _M_check (s=0x7ffff65646ab "basic_string::replace", pos=4294967295, this=0x7fffffffccf0) at /usr/src/debug/gcc-4.7.2-20130108/obj-x86_64-suse-linux/x86_64-suse-linux/libstdc++-v3/include/bits/basic_string.h:321

8 std::string::replace (this=0x7fffffffccf0, pos=4294967295, n1=<optimized out="">, s=<optimized out="">, n2=<optimized out="">) at /usr/src/debug/gcc-4.7.2-20130108/obj-x86_64-suse-linux/x86_64-suse-linux/libstdc++-v3/include/bits/basic_string.tcc:420

9 0x000000000065110b in SSLParser::yyparse (this=0x7fffffffd930, Dict=...) at sslparser.y:639

10 0x0000000000645089 in RTLInstDict::readSSLFile (this=0xa78d88, SSLFileName="/usr/bin/../share/boomerang/pentium.ssl") at db/sslinst.cpp:205

11 0x00000000005a3eaa in PentiumDecoder::PentiumDecoder (this=0xa78d20, prog=0xa76f00) at frontend/machine/pentium/decoder.m:2324

12 0x0000000000530904 in PentiumFrontEnd::PentiumFrontEnd (this=0xa6ad80, pBF=0xa6ddc0, prog=0xa76f00, pbff=0xa77ff0) at frontend/pentiumfrontend.cpp:621

13 0x000000000051e83b in FrontEnd::instantiate (pBF=0xa6ddc0, prog=0xa76f00, pbff=0xa77ff0) at frontend/frontend.cpp:80

14 0x000000000051e9e0 in FrontEnd::Load (fname=0x7fffffffe26f "/home/jobermayr/.wine/drive_c/windows/hh.exe", prog=0xa76f00) at frontend/frontend.cpp:101

15 0x0000000000516aa2 in Boomerang::loadAndDecode (this=0xa6aea0, fname=0x7fffffffe26f "/home/jobermayr/.wine/drive_c/windows/hh.exe", pname=0x0) at boomerang.cpp:1182

16 0x0000000000516f54 in Boomerang::decompile (this=0xa6aea0, fname=0x7fffffffe26f "/home/jobermayr/.wine/drive_c/windows/hh.exe", pname=0x0) at boomerang.cpp:1320

17 0x00000000005164b1 in Boomerang::commandLine (this=0xa6aea0, argc=2, argv=0x7fffffffdde8) at boomerang.cpp:1104

18 0x000000000051e664 in main (argc=2, argv=0x7fffffffdde8) at driver.cpp:43

Discussion

  • Johannes Obermayr

    I could track it down:
    Using npos in checks (here: while ((i = nm.find("\"")) != nm.npos) somehow doesn't work. Using -1 instead of nm.npos fixes it ...
    It is also valid for usage of std::string::npos in other checks.

     
    • Vaughan Woodzell

      I guess that size_t is larger than unsigned int on your platform. I've checked in a change to make the type of i size_t. Hopefully this will fix the bug.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks