public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "patrick.marlier at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/46646] New: [trans-mem] __cxa_rethrow and __builtin_eh_pointer are unsafe Date: Wed, 24 Nov 2010 20:42:00 -0000 [thread overview] Message-ID: <bug-46646-4@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2010-11-24 20:09 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-11-24 20:42 patrick.marlier at gmail dot com [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-46646-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).