C++ Exception handling

Peter Naulls peter at chocky.org
Thu Feb 26 02:00:41 PST 2004

In message <403DC0E8.30902 at dsvr.net>
          Nick Burrett <nick at dsvr.net> wrote:

> I've never heard or seen any reports of exception handling issues.


I've had several, but none that were able to be boiled down to a
useful bug report until very recently.  

Try this, in either version of GCC:

"libfile -v"

It's supposed to give a warning, because it's expecting another
argument, but instead:

*libfile -v

"BList.h", line 299: T& List<T>::operator[](unsigned int) [with T = BString]: Assertion failed: (i>=0)&&(i<m_size)

Fatal signal received: Aborted
A stack backtrace will now follow ...)
stack backtrace:

 pc:    5fed4 sp:   5a6b14  ^write_backtrace()
 pc:    675f4 sp:   5a6b3c  ^post_signal()
 pc:    678f0 sp:   5a6b54  __unixlib_raise_signal()
 pc:    12f58 sp:   5a6b64  raise()
 pc:    117f8 sp:   5a6b78  abort()
 pc:    38a48 sp:   5a6ba8  __assert_fail()
 pc:    17264 sp:   5a6cd4  _ZN9ArgParser9getOptionE7BStringRS0_()
 pc:    62304 sp:   5a6e5c  _ZN9Librarian3runEv()
 pc:    32ee8 sp:   5a6f60  main()
 pc:    5fa08 sp:   5a6f78  _main()

Register dump:

 a1:        6 a2:        0 a3:        0 a4: 34653664
 v1:    27154 v2:        0 v3:        2 v4:        0
 v5:        0 v6: 65703c20 sl:    26cfc fp:        0
 ip:        3 sp:        0 lr:        0 pc: 666f6d2c

See riscos-aof/libfe/ArgParser.cc

Peter Naulls - peter at chocky.org        | http://www.chocky.org/
RISC OS C Programming                  | http://www.riscos.info/

More information about the gcc mailing list