public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/21334] Lack of Posix compliant thread safety in std::basic_string
Date: Thu, 31 May 2012 16:15:00 -0000	[thread overview]
Message-ID: <bug-21334-4-Hc7qCTWKRL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-21334-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21334

--- Comment #45 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-31 15:54:05 UTC ---
Thanks for the patch, I'll take a look asap.

Just to answer this older comment ...

(In reply to comment #35)
> Who said that calling begin() on a non const std::string should be thread safe
> ?

For the record, as it hasn't been mentioned here explicitly, C++11 says it:

23.2.2 Container data races [container.requirements.dataraces]
-1- For purposes of avoiding data races (17.6.5.9), implementations shall
consider the following functions to be const: begin, end, rbegin, rend, front,
back, data, find, lower_bound, upper_bound, equal_range, at and, except in
associative or unordered associative containers, operator[].

So in C++11 this is definitely a bug (but then a COW string is non-conforming
in other ways too, which is why it will go away when the ABI is changed.)


  parent reply	other threads:[~2012-05-31 15:55 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-21334-4@http.gcc.gnu.org/bugzilla/>
2012-05-30 18:52 ` tlknv at yandex dot ru
2012-05-30 21:56 ` glisse at gcc dot gnu.org
2012-05-31 14:46 ` tlknv at yandex dot ru
2012-05-31 16:15 ` redi at gcc dot gnu.org [this message]
2012-05-31 16:24 ` tlknv at yandex dot ru
2012-05-31 17:19 ` redi at gcc dot gnu.org
2014-07-08  0:14 ` lopresti at gmail dot com
2014-11-09 19:15 ` tim at matterfab dot com
2014-11-09 19:18 ` tim at matterfab dot com
2015-03-23 13:04 ` redi at gcc dot gnu.org
2015-03-23 13:13 ` redi at gcc dot gnu.org
2015-03-24 15:21 ` redi at gcc dot gnu.org
     [not found] <bug-21334-9635@http.gcc.gnu.org/bugzilla/>
2005-10-22  8:24 ` ebotcazou at gcc dot gnu dot org
2007-05-08 15:11 ` james dot kanze at gmail dot com
2007-05-08 15:21 ` james dot kanze at gmail dot com
2007-05-08 18:47 ` pcarlini at suse dot de
2007-05-08 18:50 ` pcarlini at suse dot de
2007-05-09  0:55 ` gianni at mariani dot ws
2007-05-09  1:01 ` pcarlini at suse dot de
2007-05-09  1:01 ` pcarlini at suse dot de
2007-06-14  1:28 ` pinskia at gcc dot gnu dot org
2005-05-02 11:45 [Bug libstdc++/21334] New: " jkanze at cheuvreux dot com
2005-05-02 11:55 ` [Bug libstdc++/21334] " pinskia at gcc dot gnu dot org
2005-05-02 12:02 ` pcarlini at suse dot de
2005-05-02 13:23 ` jkanze at cheuvreux dot com
2005-05-02 13:27 ` gdr at integrable-solutions dot net
2005-05-02 13:30 ` jkanze at cheuvreux dot com
2005-05-02 13:32 ` pcarlini at suse dot de
2005-05-02 13:32 ` pcarlini at suse dot de
2005-05-02 14:09 ` gdr at integrable-solutions dot net
2005-05-02 14:20 ` pcarlini at suse dot de
2005-05-02 14:42 ` gdr at gcc dot gnu dot org
2005-05-02 16:03 ` rittle at latour dot waar dot labs dot mot dot com
2005-05-02 16:40 ` gdr at integrable-solutions dot net
2005-05-02 17:01 ` pcarlini at suse dot de
2005-05-02 17:17 ` gdr at integrable-solutions dot net
2005-05-02 17:23 ` pcarlini at suse dot de
2005-05-02 17:33 ` pcarlini at suse dot de
2005-05-02 18:45 ` gdr at integrable-solutions dot net
2005-05-03  8:34 ` jkanze at cheuvreux dot com
2005-05-03  8:37 ` jkanze at cheuvreux dot com
2005-05-03  8:56 ` jkanze at cheuvreux dot com
2005-05-03  9:09 ` jkanze at cheuvreux dot com
2005-05-03  9:29 ` pcarlini at suse dot de
2005-05-03 10:39 ` pcarlini at suse dot de
2005-05-03 10:59 ` jkanze at cheuvreux dot com
2005-05-03 11:15 ` pcarlini at suse dot de
2005-05-03 15:07 ` pinskia at gcc dot gnu dot org
2005-05-03 15:57 ` jkanze at cheuvreux dot com
2005-05-03 16:07   ` Ian Lance Taylor
2005-05-03 19:08 ` rittle at latour dot waar dot labs dot mot dot com
2005-05-04  9:14 ` jkanze at cheuvreux dot com
2005-05-04 12:13 ` gdr at integrable-solutions dot net
2005-05-04 12:46 ` jkanze at cheuvreux dot com
2005-06-03 23:37 ` dank at kegel dot com
2005-06-03 23:51 ` pcarlini at suse dot de

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-21334-4-Hc7qCTWKRL@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: 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).