public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/46646] New: [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe @ 2010-11-24 20:42 patrick.marlier at gmail dot com 2010-12-13 11:15 ` [Bug c++/46646] " aldyh at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: patrick.marlier at gmail dot com @ 2010-11-24 20:42 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46646 Summary: [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe Product: gcc Version: trans-mem Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: patrick.marlier@gmail.com I try to 'transactify' STL and I fall into this: /gcc/transactional-memory/libstdc++-v3/include/bits/stl_list.h: At global scope: /gcc/transactional-memory/libstdc++-v3/include/bits/stl_list.h:472:6: error: unsafe function call ‘void __cxa_rethrow()’ within ‘transaction_safe’ function /gcc/transactional-memory/libstdc++-v3/include/bits/stl_list.h:469:2: error: unsafe function call ‘void * __builtin_eh_pointer(int)’ within ‘transaction_safe’ function Temporary I set these functions as transaction_safe but I think __cxa_rethrow needs a replacement to _ITM_cxa_rethrow. Patrick Marlier. Index: except.c =================================================================== --- except.c (revision 167126) +++ except.c (working copy) @@ -149,8 +149,12 @@ tree build_exc_ptr (void) { - return build_call_n (built_in_decls [BUILT_IN_EH_POINTER], - 1, integer_zero_node); + tree tmp = built_in_decls [BUILT_IN_EH_POINTER]; + + if (flag_tm) + apply_tm_attr (tmp, get_identifier ("transaction_pure")); + + return build_call_n (tmp, 1, integer_zero_node); } /* Declare a function NAME, returning RETURN_TYPE, taking a single @@ -887,6 +891,9 @@ /* Declare void __cxa_rethrow (void). */ fn = push_throw_library_fn (fn, build_function_type (void_type_node, void_list_node)); + /* TODO Add replacement _ITM_cxa_rethrow */ + if (flag_tm) + apply_tm_attr (fn, get_identifier ("transaction_pure")); } /* ??? Indicate that this function call allows exceptions of the type ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/46646] [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe 2010-11-24 20:42 [Bug c++/46646] New: [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe patrick.marlier at gmail dot com @ 2010-12-13 11:15 ` aldyh at gcc dot gnu.org 2010-12-13 15:13 ` aldyh at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: aldyh at gcc dot gnu.org @ 2010-12-13 11:15 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46646 Aldy Hernandez <aldyh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/46646] [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe 2010-11-24 20:42 [Bug c++/46646] New: [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe patrick.marlier at gmail dot com 2010-12-13 11:15 ` [Bug c++/46646] " aldyh at gcc dot gnu.org @ 2010-12-13 15:13 ` aldyh at gcc dot gnu.org 2010-12-14 11:13 ` patrick.marlier at gmail dot com 2010-12-14 14:20 ` aldyh at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: aldyh at gcc dot gnu.org @ 2010-12-13 15:13 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46646 Aldy Hernandez <aldyh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2010.12.13 15:13:26 Ever Confirmed|0 |1 --- Comment #1 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2010-12-13 15:13:26 UTC --- Testcase? ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/46646] [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe 2010-11-24 20:42 [Bug c++/46646] New: [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe patrick.marlier at gmail dot com 2010-12-13 11:15 ` [Bug c++/46646] " aldyh at gcc dot gnu.org 2010-12-13 15:13 ` aldyh at gcc dot gnu.org @ 2010-12-14 11:13 ` patrick.marlier at gmail dot com 2010-12-14 14:20 ` aldyh at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: patrick.marlier at gmail dot com @ 2010-12-14 11:13 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46646 --- Comment #2 from Patrick Marlier <patrick.marlier at gmail dot com> 2010-12-14 11:13:15 UTC --- Created attachment 22751 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22751 testcase .ii I will try to make a shorter one soon. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/46646] [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe 2010-11-24 20:42 [Bug c++/46646] New: [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe patrick.marlier at gmail dot com ` (2 preceding siblings ...) 2010-12-14 11:13 ` patrick.marlier at gmail dot com @ 2010-12-14 14:20 ` aldyh at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: aldyh at gcc dot gnu.org @ 2010-12-14 14:20 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46646 Aldy Hernandez <aldyh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2010-12-14 14:20:43 UTC --- Fixed and committed: http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01097.html ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-14 14:20 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-11-24 20:42 [Bug c++/46646] New: [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe patrick.marlier at gmail dot com 2010-12-13 11:15 ` [Bug c++/46646] " aldyh at gcc dot gnu.org 2010-12-13 15:13 ` aldyh at gcc dot gnu.org 2010-12-14 11:13 ` patrick.marlier at gmail dot com 2010-12-14 14:20 ` aldyh at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).