public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/61199] New: [trans-mem] _cxa_free_exception is not transaction safe
@ 2014-05-16 10:35 torvald at gcc dot gnu.org
  2014-05-16 10:37 ` [Bug middle-end/61199] " torvald at gcc dot gnu.org
  2014-06-09 19:54 ` jason at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: torvald at gcc dot gnu.org @ 2014-05-16 10:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61199

            Bug ID: 61199
           Summary: [trans-mem] _cxa_free_exception is not transaction
                    safe
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: torvald at gcc dot gnu.org

Created attachment 32804
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32804&action=edit
test case

See attached test case.  I'm not quite sure how we need to handle it: Is this
only called when another transaction has taken over, and we're freeing up
garbage?  Or can a call to this create a situation in which we "canceled" a
previous exception throw?  If the latter case holds, I guess we also need to
reset the transaction-in-flight state that libitm keeps when
cxa_allocate_exception is called.  Depending on this, we either need to make it
TM-pure or add a wrapper in libitm.

Thoughts?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/61199] [trans-mem] _cxa_free_exception is not transaction safe
  2014-05-16 10:35 [Bug middle-end/61199] New: [trans-mem] _cxa_free_exception is not transaction safe torvald at gcc dot gnu.org
@ 2014-05-16 10:37 ` torvald at gcc dot gnu.org
  2014-06-09 19:54 ` jason at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: torvald at gcc dot gnu.org @ 2014-05-16 10:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61199

torvald at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-05-16
                 CC|                            |aldyh at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org,
                   |                            |rth at gcc dot gnu.org
     Ever confirmed|0                           |1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/61199] [trans-mem] _cxa_free_exception is not transaction safe
  2014-05-16 10:35 [Bug middle-end/61199] New: [trans-mem] _cxa_free_exception is not transaction safe torvald at gcc dot gnu.org
  2014-05-16 10:37 ` [Bug middle-end/61199] " torvald at gcc dot gnu.org
@ 2014-06-09 19:54 ` jason at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jason at gcc dot gnu.org @ 2014-06-09 19:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61199

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
Since we have a TM wrapper for __cxa_allocate_exception, it seems reasonable to
have one for __cxa_free_exception as well.

In the testcase, we free the allocated 'bar' exception when the copy
constructor throws an 'int' exception, and then the 'int' exception propagates
out of foo.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-09 19:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-16 10:35 [Bug middle-end/61199] New: [trans-mem] _cxa_free_exception is not transaction safe torvald at gcc dot gnu.org
2014-05-16 10:37 ` [Bug middle-end/61199] " torvald at gcc dot gnu.org
2014-06-09 19:54 ` jason 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).