public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: ljrittle@acm.org
To: gcc-gnats@gcc.gnu.org
Subject: c++/3082: C++ EH is broken for multithreaded programs
Date: Fri, 08 Jun 2001 00:46:00 -0000	[thread overview]
Message-ID: <20010608074007.25855.qmail@sourceware.cygnus.com> (raw)

>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


             reply	other threads:[~2001-06-08  0:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-08  0:46 ljrittle [this message]
2001-06-09 11:14 mmitchel
2001-06-11 17:52 ljrittle

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=20010608074007.25855.qmail@sourceware.cygnus.com \
    --to=ljrittle@acm.org \
    --cc=gcc-gnats@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: link
Be 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).