This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR middle-end/51212: sorry out on -fgnu-tm + -fnon-call-exceptions
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Torvald Riegel <triegel at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 23 Dec 2011 10:31:05 +0100
- Subject: Re: PR middle-end/51212: sorry out on -fgnu-tm + -fnon-call-exceptions
- References: <4EF3894B.5050504@redhat.com>
On Thu, Dec 22, 2011 at 8:47 PM, Aldy Hernandez <aldyh@redhat.com> wrote:
> The problem here is that with -fnon-call-exceptions, a memory dereference
> may trap, but when we instrument the store, we have lost the landing pad
> information.
>
> One solution would be to move the EH information to the TM load/store
> instrumentation builtins, but that doesn't get us around the fact that
> libitm is not exception safe, and we have no mechanism for taking and
> exception (and propagating it) in the middle of a transaction.
>
> Richard has suggested that another alternative could be to support the
> exception case for NULL, but non-null faulting memory references would still
> cause a crash. ?In this case we would simply test for NULL at the start of
> the accessors and explicitly throw the exception.
>
> And yet a third alternative, is to disable the -fgnu-tm and
> -fnon-call-exceptions combination. ?I have implemented this one, as I'd
> rather have it not work, than work half-way.
>
> Torvald, do you have any thoughts on the matter?
>
> Attached patch for disabling the feature, if you both agree on this
> approach.
I think this should be documented at the place -fgnu-tm is documented.
Richard.