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

2012-05-15 Thread Dave Boutcher
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 runti

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

2012-05-15 Thread Dave Boutcher
On Tue, May 15, 2012 at 11:23 AM, Torvald Riegel wrote: > > On Tue, 2012-05-08 at 18:02 -0500, Dave Boutcher wrote: > > Without this patch it is perfectly fine to assign non-transaction_safe > > functions to function pointers marked as transaction_safe. Unpleasantness >

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

2012-05-08 Thread Dave Boutcher
Without this patch it is perfectly fine to assign non-transaction_safe functions to function pointers marked as transaction_safe. Unpleasantness happens at run time. e.g. __attribute__((transaction_safe)) long (*compare)(int, int); compare = my_funky_random_function; gcc/c-typeck.c |7

trans-mem: make sure clones for functions referenced indirectly are marked as needed (issue6201064)

2012-05-08 Thread Dave Boutcher
Without this patch we generate calls to TM_GETTMCLONE for functions called indirectly, but we don't actually store the clone mapping in the clone table because we think the functions are not "needed". Compiles fine, dies at runtime. See GCC Bugzilla – Bug 53008 gcc/trans-mem.c | 14 +

trans-mem: functions making indirect calls are not transformed (issue6194061)

2012-05-08 Thread Dave Boutcher
gcc/trans-mem.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 2badf25..24073fa 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -4721,7 +4721,7 @@ ipa_tm_transform_clone (struct cgraph_node *node) /* If this function makes no