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
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
>
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
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 +
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