From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id CC2DD383E692 for ; Tue, 21 Jun 2022 07:41:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CC2DD383E692 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-252-uWwt93bLO6WVyU1U85OWjA-1; Tue, 21 Jun 2022 03:41:08 -0400 X-MC-Unique: uWwt93bLO6WVyU1U85OWjA-1 Received: by mail-ej1-f72.google.com with SMTP id k7-20020a1709062a4700b006fe92440164so4421740eje.23 for ; Tue, 21 Jun 2022 00:41:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E2Wzb0GL1omCkziM96NAglTdhPIbPtr/RseCll/laaA=; b=JXv02VUOSjymD+yjcIgwlYbUAdJp7pLv7OtT6Qx0eclWUuGfsMs0JxJNowQvZz3o8c DvJI6oJmk1/oh4TMBAFLjbnROJIt8WcIaqVMeL461kjPzwpUU8EKABOerTfFUBbCl9yt wAZhwsRvvzontAM2eyn/zLJVA/rBvvMQB1CZf47jlutvfhoERvCTw1GmMMVG0S4SZSYs H+v7470izKShrz7Ki1JxcOi2P2FbjH0Yr13Fusv0gnk3K1azWbcB8+GmLNxbfr7VGZ2T tAtuO+djXX7vUXWxJgKpcbo32NlpqDNdP41jbfMUKELrtAwyR3pD5Lg4A52azUxzxnBZ fBLw== X-Gm-Message-State: AJIora+aWoJWZNlMJc0tE43cJ+JJlttixpvtHAUVAohCV74qLJoCpR3a EUtz0mdrt6oqAGtuXaFOXHfa/yTtmtrItBZUZ8TJmVYJHtpxhgf2pP686fBGMINEWLx3ofstdPH 9c+BwNgHD/q8la9viHfwpc28ajCXVyGw= X-Received: by 2002:a17:906:8301:b0:6e4:896d:59b1 with SMTP id j1-20020a170906830100b006e4896d59b1mr23538296ejx.396.1655797267302; Tue, 21 Jun 2022 00:41:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1taHg0t4QE3fE4b6WFmdmTwH8kplNqNpdMiPT8JARLXQP6yPoWMfjRAj0yI9Jz4GVcv9oebHOMnFZmSYsCposM= X-Received: by 2002:a17:906:8301:b0:6e4:896d:59b1 with SMTP id j1-20020a170906830100b006e4896d59b1mr23538287ejx.396.1655797267091; Tue, 21 Jun 2022 00:41:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Tue, 21 Jun 2022 08:40:56 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: eh_globals: gthreads: reset _S_init before deleting key To: Alexandre Oliva Cc: gcc Patches , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2022 07:41:10 -0000 On Tue, 21 Jun 2022 at 07:04, Alexandre Oliva via Libstdc++ wrote: > > > Clear __eh_globals_init's _S_init in the dtor before deleting the > gthread key. > > This ensures that, in case any code involved in deleting the key > interacts with eh_globals, the key that is being deleted won't be > used, and the non-thread-specific eh_globals fallback will. > > Regstrapped on x86_64-linux-gnu, also tested with a cross to > aarch64-rtems6. Ok to install? OK, thanks. > PS: This is a fix for a theoretical issue, that came to mind while I > independently investigated the problem that I later found to be > PR105880. It looks like a real problem though, if rare in practice.