Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2226305/?format=api
{ "id": 2226305, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2226305/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhubrmqub2.gcc.gcc-TEST.redi.31.1.5@forge-stage.sourceware.org/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/1.2/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<bmm.hhubrmqub2.gcc.gcc-TEST.redi.31.1.5@forge-stage.sourceware.org>", "list_archive_url": null, "date": "2026-04-22T10:44:20", "name": "[v1,05/16] libstdc++: Fix race condition in new atomic notify code", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "74f31fa549e2c7039b0733022b828e495abf6ea7", "submitter": { "id": 93210, "url": "http://patchwork.ozlabs.org/api/1.2/people/93210/?format=api", "name": "Jonathan Wakely via Sourceware Forge", "email": "forge-bot+redi@forge-stage.sourceware.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhubrmqub2.gcc.gcc-TEST.redi.31.1.5@forge-stage.sourceware.org/mbox/", "series": [ { "id": 500987, "url": "http://patchwork.ozlabs.org/api/1.2/series/500987/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=500987", "date": "2026-04-22T10:44:17", "name": "atomic wait/notify ABI stabilization", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500987/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226305/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226305/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org", "sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org", "server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0xgN39wlz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 21:23:44 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 76AC44363039\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 11:23:42 +0000 (GMT)", "from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id 67F5F4015EAD\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 10:46:05 +0000 (GMT)", "from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id BA3E242BB3\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 10:46:01 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 76AC44363039", "OpenDKIM Filter v2.11.0 sourceware.org 67F5F4015EAD" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 67F5F4015EAD", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 67F5F4015EAD", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776854765; cv=none;\n b=OpA7qWvuRCZREM+qs6Eb2ChYSXLfnF7B398ia/mohv9rsrv0o3SF3g3ebU1GFkUViaG87dacvfSMlIbjzKW+YZ4DkTLEdJBGn3oCLfls7Kzj5tvP2xLTQJ7wvf57YIYUFB0TU97pjpLIx2g7kfMzfAucr7evtNUuZBGXlYartHk=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776854765; c=relaxed/simple;\n bh=IFXImRkCm98BPx0Xj2VBL60dTcKVjHcPKNWaAoWsZ38=;\n h=From:Date:Subject:To:Message-ID;\n b=Gw3iKevknDDnUQjvQ3lWNfr7P7mjgFZuQ6UJYnpbQ/a/BpxnJk7dlGoy0Pqbs8fUpKmYeJqqODo7QdH49aeXhh/4d5tmsjsfShNBLYNJgKkhUDU6PJPRvjFUeVT6Gma+0lgizvOTQ0LzW2PiNN7G59liNRSSBHQj9UF4QP6W0BQ=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "From": "Jonathan Wakely via Sourceware Forge\n <forge-bot+redi@forge-stage.sourceware.org>", "Date": "Wed, 22 Apr 2026 10:44:20 +0000", "Subject": "[PATCH v1 05/16] libstdc++: Fix race condition in new atomic notify\n code", "To": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>", "Message-ID": "\n <bmm.hhubrmqub2.gcc.gcc-TEST.redi.31.1.5@forge-stage.sourceware.org>", "X-Mailer": "batrachomyomachia", "X-Pull-Request-Organization": "gcc", "X-Pull-Request-Repository": "gcc-TEST", "X-Pull-Request": "https://forge.sourceware.org/gcc/gcc-TEST/pulls/31", "References": "\n <bmm.hhubrmqub2.gcc.gcc-TEST.redi.31.1.0@forge-stage.sourceware.org>", "In-Reply-To": "\n <bmm.hhubrmqub2.gcc.gcc-TEST.redi.31.1.0@forge-stage.sourceware.org>", "X-Patch-URL": "\n https://forge.sourceware.org/redi/gcc/commit/b7703d2c63548243f4f85f4393e0aff3ec89ed6a", "X-BeenThere": "gcc-patches@gcc.gnu.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>", "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>", "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Reply-To": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>, redi@gcc.gnu.org", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "From: Jonathan Wakely <jwakely@redhat.com>\n\nWhen using a proxy object for atomic waiting and notifying operations,\nwe need to ensure that the _M_ver value is always incremented by a\nnotifying operation, even if we return early without doing the futex\nwake syscall. Otherwise we get missed wake-ups because the notifying\nthread doesn't modify the value that other threads are doing a futex\nwait on.\n\nlibstdc++-v3/ChangeLog:\n\n\t* include/bits/atomic_wait.h (__notify_impl): Increment the\n\tproxy value before returning early for the uncontended case.\n---\n libstdc++-v3/include/bits/atomic_wait.h | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)", "diff": "diff --git a/libstdc++-v3/include/bits/atomic_wait.h b/libstdc++-v3/include/bits/atomic_wait.h\nindex 172910a4e34f..725ea030245d 100644\n--- a/libstdc++-v3/include/bits/atomic_wait.h\n+++ b/libstdc++-v3/include/bits/atomic_wait.h\n@@ -406,18 +406,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n {\n __waiter_pool_impl* __pool = nullptr;\n \n- if (__args & __wait_flags::__track_contention)\n-\t{\n-\t __pool = &__waiter_pool_impl::_S_impl_for(__addr);\n-\t if (!__pool->_M_waiting())\n-\t return;\n-\t}\n-\n const __platform_wait_t* __wait_addr;\n if (__args & __wait_flags::__proxy_wait)\n \t{\n-\t if (!__pool)\n-\t __pool = &__waiter_pool_impl::_S_impl_for(__addr);\n+\t __pool = &__waiter_pool_impl::_S_impl_for(__addr);\n \t // Waiting for *__addr is actually done on the proxy's _M_ver.\n \t __wait_addr = &__pool->_M_ver;\n \t __atomic_fetch_add(&__pool->_M_ver, 1, __ATOMIC_RELAXED);\n@@ -430,6 +422,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n else // Use the atomic variable's own address.\n \t__wait_addr = __addr;\n \n+ if (__args & __wait_flags::__track_contention)\n+\t{\n+\t if (!__pool)\n+\t __pool = &__waiter_pool_impl::_S_impl_for(__addr);\n+\t if (!__pool->_M_waiting())\n+\t return;\n+\t}\n+\n #ifdef _GLIBCXX_HAVE_PLATFORM_WAIT\n __platform_notify(__wait_addr, __all);\n #else\n", "prefixes": [ "v1", "05/16" ] }