Catching C++ std::exception in D
Iain Buclaw via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 13 10:39:55 PST 2015
On 13 November 2015 at 18:45, Dan Olson via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:
> Johannes Pfau <nospam at example.com> writes:
>
> > Am Thu, 12 Nov 2015 09:59:14 -0800
> > schrieb Dan Olson <gorox at comcast.net>:
> >
> >> Johannes Pfau <nospam at example.com> writes:
> >> > To expand on this: I think we'd prefer one __d_personality_v0 which
> >> > is implemented in upstream druntime and identical for all
> >> > compilers.
> >>
> >> Speacking of upstream support. GDC support SjLj exceptions. In
> >> 2.067, it became obvious that Fiber needed separate SjLj context
> >> stacks which are normally thread specific. I have a change in my iOS
> >> LDC fork which I suppose could go to upstream thread.d file so GDC
> >> can pick it up to.
> >>
> >>
> https://github.com/smolt/druntime/commit/5d32e9e68cc6bd8b13cacfdb18a4d91374bf6b3e
> >>
> >> See, I even included GNU_SjLj_Exceptions :-)
> >>
> >> Sound like a good idea? It is getting queued up soon as a PR to LDC
> >> once we get an iOS version officially in the compiler frontend.
> >
> > Nice work. We certainly want that in GDC or even better in upstream.
> > I guess we don't have a unittest yet which can detect this problem. Is
> > it possible to add a unittest for this?
>
> I had 2.067 unittest failures without this change, I don't recall which.
> I know it made me laugh becase exceptions were being thrown from Fiber A
> but being caught by Fiber B. I can easily find out what fails by
> rerunning without the change. I'll report back later.
>
There may be a few other holes between how Fibers and EH interact.
https://github.com/D-Programming-Language/druntime/commit/f6633abb43ea1f2464d3a772b8f8fe78216ffd8e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20151113/a93a3602/attachment.html>
More information about the Digitalmars-d
mailing list