This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/46941] [trans-mem] new/delete operator are unsafe
- From: "patrick.marlier at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 2 Feb 2011 14:17:34 +0000
- Subject: [Bug c++/46941] [trans-mem] new/delete operator are unsafe
- Auto-submitted: auto-generated
- References: <bug-46941-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46941
Patrick Marlier <patrick.marlier at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #7 from Patrick Marlier <patrick.marlier at gmail dot com> 2011-02-02 14:17:23 UTC ---
(In reply to comment #6)
> Fixed
> http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00776.html
Please considered this...
http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01206.html
It must be **transaction_safe** not transaction_pure.
Moreover I think we should also add ECF_MALLOC (malloc attribute) because
otherwise the allocated memory will not be considered as local.
Extract from trans-mem.c: thread_private_new_memory()
if (stmt && is_gimple_call (stmt) && gimple_call_flags (stmt) & ECF_MALLOC)
/* Thread-local or transaction-local. */
;
else
retval = mem_non_local;
Thanks.