This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Tue, May 15, 2012 at 4:16 PM, Patrick Marlier
<patrick.marlier@gmail.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]