[gambit-list] Medium-to-high-prio, would appreciate a hand resolving this completely reproducible pita bug: SIGSEGV on every ordinary termination (, q (exit) etc.) on Gambit-current on OpenBSD-current w at least g++ 4.7.2 & 4.6.3

Marc Feeley feeley at iro.umontreal.ca
Thu Jan 3 14:03:58 EST 2013

I can't reproduce this bug with OpenBSD 5.2 and the g++ 4.2.1 which comes with it.  My guess is that the problem is related to a bug in the versions of g++ you have used.  Can you install an older g++ and see if that solves the problem?  Can you also try to compile using gcc (i.e. don't use --enable-cplusplus)?

On 2012-12-02, at 10:16 PM, Mikael <mikael.rcv at gmail.com> wrote:

> Dear Marc,
> On OpenBSD-current (and I suppose any other OBSD version) there's a PITA bug in latest Gambit when compiled with --enable-cplusplus. I tried it with G++ 4.7.2 and 4.6.3. Possibly this bug exists also with any Gambit version.
> The bug is extremely easily reproducible:
> $ gsc
> Gambit v4.6.6
> > ,q
> terminate called after throwing an instance of '___throw_struct'
> terminate called recursively
> Abort trap (core dumped)
> $
> I've been hunting this bug down quite extensively now and it appears to me that Gambit's normal way of terminating (at least on OBSD and Debian) is by throwing an uncaught exception, containing a ___throw_struct whose content is a __SCMOBJ containing a fixnum by the number one (1)???
> But if so, why is not an uncaught exception error printed at gsc termination on every platform (which is g++'s default behavior)???

No, the runtime system should catch this exception in the ___BEGIN_TRY / ___END_TRY macros which are called in lib/setup.c (in only 2 places, so it should be easy to verify that the exception is actually caught by adding some printfs in the code).

> Would greatly appreciate a hand in resolving this bug, it takes time generating the core file, clutters the terminal by requiring you to run reset after every gsc session, and primarily, it gives a terrible 'out of control' sense to the console interaction!..
> Find my notes in hunting this one down below. If I can check for or try anything particular as to resolve the originating cause, please just tell me what.
> Thanks!
> Mikael


More information about the Gambit-list mailing list