public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3082: C++ EH is broken for multithreaded programs
@ 2001-06-08  0:46 ljrittle
  0 siblings, 0 replies; 3+ messages in thread
From: ljrittle @ 2001-06-08  0:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3082
>Category:       c++
>Synopsis:       C++ EH is broken for multithreaded programs
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 08 00:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     ljrittle@acm.org
>Release:        unknown-1.0
>Organization:
>Environment:
*-*-linux, *-*-freebsd, others
>Description:
Memory used to hold state for EH processing is shared
across threads due to a configuration error introduced
when C++ EH code was moved from gcc/libgcc2.c to
libstdc++-v3/libsupc++.

This bug has been reported a few times on gcc-bugs.

The attached test case was taken from (cleaned up
only slightly):
http://gcc.gnu.org/ml/gcc-bugs/2001-05/msg00855.html

dave@hiauly1.hia.nrc.ca also reported this problem with
an initial patch to libstdc++-v3.
>How-To-Repeat:
The lack of using thread-specific memory produces
non-deterministic failures.  However, the non-portable
(to non-POSIX hosts) code attached will surely crash
after some amount of time.
>Fix:
Patch posted to libstdc++-v3, gcc-patches and installed on
mainline.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="g.C"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="g.C"

I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8cHRocmVhZC5oPgojaW5jbHVkZSA8dW5pc3Rk
Lmg+CiAgICAgCiNkZWZpbmUgTl9USFJFQURTIDEwCiAgICAgCnZvaWQgKnggKHZvaWQgKmFyZykK
ewogIHdoaWxlICgxKSB7CiAgICB0cnkgewogICAgICB0aHJvdyBpbnQgKCk7CiAgICB9CiAgICBj
YXRjaCAoaW50KSB7IH0KICB9Cn0KCnB0aHJlYWRfdCBfX3RbTl9USFJFQURTXTsKCmludAptYWlu
IChpbnQgYXJnYywgY2hhciAqKmFyZ3YpCnsKICBwdGhyZWFkX2F0dHJfdCB0X2F0dHI7CiAgcHRo
cmVhZF9hdHRyX2luaXQgKCZ0X2F0dHIpOwogIHB0aHJlYWRfYXR0cl9zZXRkZXRhY2hzdGF0ZSAo
JnRfYXR0ciwgUFRIUkVBRF9DUkVBVEVfREVUQUNIRUQpOwogCiAgZm9yIChpbnQgaSA9IDA7IGkg
PCBOX1RIUkVBRFM7IGkrKykKICAgICBwdGhyZWFkX2NyZWF0ZSAoJl9fdFtpXSwgJnRfYXR0ciwg
eCwgTlVMTCk7CgogIGludCB1cHRpbWUgPSAwOwogIHdoaWxlICgxKSB7CiAgICBzbGVlcCAoMSk7
CiAgICB1cHRpbWUrKzsKICAgIHN0ZDo6Y291dCA8PCAidXB0aW1lOiAiIDw8IHVwdGltZSA8PCAi
c2Vjc1xyIiA8PCBzdGQ6OmZsdXNoOwogIH0KfSAK


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

* Re: c++/3082: C++ EH is broken for multithreaded programs
@ 2001-06-11 17:52 ljrittle
  0 siblings, 0 replies; 3+ messages in thread
From: ljrittle @ 2001-06-11 17:52 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, ljrittle, ljrittle

Synopsis: C++ EH is broken for multithreaded programs

State-Changed-From-To: analyzed->closed
State-Changed-By: ljrittle
State-Changed-When: Mon Jun 11 17:52:15 2001
State-Changed-Why:
    Patch has been applied to mainline and 3.0 branch to
    address the problem.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3082&database=gcc


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

* Re: c++/3082: C++ EH is broken for multithreaded programs
@ 2001-06-09 11:14 mmitchel
  0 siblings, 0 replies; 3+ messages in thread
From: mmitchel @ 2001-06-09 11:14 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, ljrittle, ljrittle, nobody

Synopsis: C++ EH is broken for multithreaded programs

Responsible-Changed-From-To: unassigned->ljrittle
Responsible-Changed-By: mmitchel
Responsible-Changed-When: Sat Jun  9 11:14:19 2001
Responsible-Changed-Why:
    Will apply patch, I hope.
State-Changed-From-To: open->analyzed
State-Changed-By: mmitchel
State-Changed-When: Sat Jun  9 11:14:19 2001
State-Changed-Why:
    Confirmed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3082&database=gcc


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

end of thread, other threads:[~2001-06-11 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-08  0:46 c++/3082: C++ EH is broken for multithreaded programs ljrittle
2001-06-09 11:14 mmitchel
2001-06-11 17:52 ljrittle

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).