[Patch, libstdc++] Fix data races in basic_string implementation

Jonathan Wakely jwakely@redhat.com
Wed Sep 2 14:05:00 GMT 2015


On 02/09/15 15:49 +0200, Dmitry Vyukov wrote:
>On Wed, Sep 2, 2015 at 12:58 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
>> On Tue, 1 Sep 2015, Dmitry Vyukov wrote:
>>
>>> The refcounted basic_string implementation contains several data races
>>> on _M_refcount:
>>
>>
>> There are several bug reports about races in basic_string in bugzilla (some
>> might even have been closed as wontfix because of the new implementation).
>> Does this also fix some of them?
>
>I've tried to search for "basic_string race" with all statuses:
>https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&cf_known_to_fail_type=allwords&cf_known_to_work_type=allwords&component=libstdc%2B%2B&list_id=125385&query_format=advanced&short_desc=basic_string%20race&short_desc_type=allwordssubstr
>
>But it does not yield anything interesting. What bugs can I reference?

There's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21334 but I don't
think this fixes it. That's a race condition in the logic, not a
formal data race due to non-atomic operations like the problem being
fixed here.



More information about the Libstdc++ mailing list