This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
RE: exception handling and conservative GC
- From: "Boehm, Hans" <hans dot boehm at hp dot com>
- To: "Benjamin Kosnik" <bkoz at redhat dot com>, "Filip Pizlo" <pizlo at mac dot com>
- Cc: <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 19 Jan 2006 16:50:17 -0800
- Subject: RE: exception handling and conservative GC
[Might bounce on the mailing list, since I'm not subscribed.]
Benjamin -
Thanks for the response.
However, if I look at
http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/libsupc%2B%2B/eh_alloc
.cc?view=markup&rev=109883
which was updated within the last few days, I still see a direct call to
malloc to allocate the exception, at least on the normal path. That
means that a garbage collector cannot see the contents unless it
overrides malloc, and objects referenced by the exception object may
still be garbage collected, if the garbage collector is triggered with
the exception in-flight.
Unless I'm missing something, I don't think this has changed.
I think this is different from 23591. It's not really a bug, in that it
only affects conservatively garbage-collected C++ apps, which don't
officially exist as far as standards are concerned. It may be a libgcj
bug, since the situation may arise there, but I don't think it has been
reported in that context.
Hans
> -----Original Message-----
> From: Benjamin Kosnik [mailto:bkoz@redhat.com]
> Sent: Thursday, January 19, 2006 11:15 AM
> To: Filip Pizlo
> Cc: libstdc++@gcc.gnu.org; Boehm, Hans
> Subject: Re: exception handling and conservative GC
>
>
>
> I agree that the in-flight exceptions issue is problematic.
>
> I actually have a patch somewhere that tracks this stuff and
> attempts to cleanly de-allocate. Much like the arm-eabi hooks.
>
> However, some of this has changed since 4.0.x. In particular,
> mainline and 4.1 have some of these issues fixed: I suggest
> using and or testing with these versions.
>
> See:
> libstdc++/23591
>
> -benjamin
>