GktD: exceptions in handlers cause segfaults.

Johannes Pfau nospam at example.com
Fri Jul 19 12:43:38 PDT 2013


Am Fri, 19 Jul 2013 12:38:45 +0200
schrieb Marco Leise <Marco.Leise at gmx.de>:

> It turns out that what Walter explained is the
> key here, too. All my libraries are compiled without frame
> pointers, so the simple stack unwinding that D uses fails
> there. I recompiled glib and gtk+ with -fno-omit-frame-pointer
> specifically and from now on exception handling works again.

Would be nice to know if this is working with gdc or ldc. In theory it
should work as we use gcc's exception handling/stack unwinding so it's
probably a dmd bug.

Slightly off topic, but maybe interesting:
Things can get really nasty if the GCC backend somehow decided
a function is nothrow and you throw from there. Unless GTK uses some
special __nothrow__ attributes that shouldn't happen in C, but I've seen
D code that throws from @nothrow functions and at least on ARM that
crashes... Might be a gdc bug or a problem with the D language
specification.


More information about the Digitalmars-d-learn mailing list