gnu-tm: Dont allow assigning transaction_unsafe functions to transaction_safe function pointers (issue6198054)

Dave Boutcher
Wed May 16 01:53:00 GMT 2012

On Tue, May 15, 2012 at 4:16 PM, Patrick Marlier
<> wrote:
> Follow-up of Dave's patch. I would prefer to see such checks in trans-mem.c
> as follows.
> In a transaction, a function pointer can be declared and assigned but there
> is no check that the function pointer is transaction_safe. So at runtime, if
> the function was unsafe, libitm stops on assert because the clone is not
> found.

Of the three tm patches I sent, I'm least fond of this one.  I agree
that this check should be
in trans-mem.c, but it wasn't obvious to me how to add it there, since
the assignment of a
function to a pointer can happen anywhere in the code...far away from
an actual transaction.

Dave B

More information about the Gcc-patches mailing list