From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 1AB7D385B523; Wed, 30 Nov 2022 18:17:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1AB7D385B523 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62b.google.com with SMTP id ml11so18477625ejb.6; Wed, 30 Nov 2022 10:17:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=9rR1qxLP6IsT3awlw3Rfwb8Mfea3syah7jI+mbNzGNA=; b=S9edH2fSfRqmA0OdFXZn2GV1ZxE4eycQzQmYmlXGINLVTmrSWrquxj+gef1DO+xC/8 7ivHXitgan5E0G08Zkmn2aBy3lQBH78oK8msVr966XZuYzpRTxqkpLmniG518IfbymKT Ak0pm4PBZm/UTjEJKMKxPrEayjLMqxcaTyfVOgF56kxi5SQgcNjZbyjDmRrF3xc1RLH0 fjJjI2rVYYHUWv6DeSe+NdY2EeWQqI8aAL5MGttXJAkcqT8vlcGurCtuH3NfTSKJpb0d xKRIFWLvqiw3Wc8EeTf/UfNO2rgZH9km6tTS2sODfPomqQ8NWVw+KFhmTUTR6pJyX3XD 2ZhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9rR1qxLP6IsT3awlw3Rfwb8Mfea3syah7jI+mbNzGNA=; b=grxTeP9mTw+zvcgbmBfDubGdLyUSMzNk0MjCCt5mvNiPk9pM9KzZ+pqv1dT74p9ZTV XQrshVOtC4EnjcVOfl939M8oWFwuoqcRgBZIPLxmFKBPbWpv5aH/53li2IoDGA2ngJUC zm9jSyxx7YFGkYHl6OGVlRBoPhE4k1n3Jy9tcTGMgpHm0OqncMoMPem0YjPB1k5+gFHz BBcIomwCopufSQfpRrVIWMU93FhE6nOiuIjZqL6SkHCtSkiABgv37L/XLji4wQw8Qt2C BElR1npvaqDGIfXGj4wvpqz5LxOFCqRxqPIMQDFA6U9IUp8+yct3cwe+Vt++mSJGrQCi APyg== X-Gm-Message-State: ANoB5pkeDPtIUsXibviTlAKX3kXTltmYOjw3xBCTvLbKwEbS+cmy3OPB uTU8VJY5JNmUKs4Ci7tIOwc= X-Google-Smtp-Source: AA0mqf6rXswVst6O0IoVpEU+qNS9aDOPi/qQKrQvmsu383mcrgDDob5hFxvQ2Po/RnGzsIisOYcCBA== X-Received: by 2002:a17:906:8547:b0:7b4:ae8f:c61 with SMTP id h7-20020a170906854700b007b4ae8f0c61mr44496016ejy.403.1669832238742; Wed, 30 Nov 2022 10:17:18 -0800 (PST) Received: from [10.2.0.65] ([109.190.253.14]) by smtp.googlemail.com with ESMTPSA id r17-20020a17090609d100b007bd28b50305sm886265eje.200.2022.11.30.10.17.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Nov 2022 10:17:18 -0800 (PST) Message-ID: Date: Wed, 30 Nov 2022 19:17:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] libstdc++: Add error handler for Content-Language: fr, en-US To: Jonathan Wakely Cc: =?UTF-8?Q?Bj=c3=b6rn_Sch=c3=a4pers?= , libstdc++@gcc.gnu.org, gcc Patches References: <20221129214107.25572-1-gcc@hazardy.de> From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 30/11/22 14:07, Jonathan Wakely wrote: > On Wed, 30 Nov 2022 at 11:57, Jonathan Wakely wrote: >> >> >> On Wed, 30 Nov 2022 at 11:54, Jonathan Wakely wrote: >>> >>> >>> On Wed, 30 Nov 2022 at 06:04, François Dumont via Libstdc++ wrote: >>>> Good catch, then we also need this patch. >>> >>> Is it worth printing an error? If we can't show the backtrace because of an error, we can just print nothing there. >>> >>> We also need to pass an error handler to the __glibcxx_backtrace_create_state call in formatter.h. >>> >>> Now that I look at this code again, why do we need the _M_backtrace_full member? It's always set to the same thing, why can't we just call that function directly? >> >> Oh right, I remember now ... because otherwise the libstdc++.so library needs the definition of __glibcxx_backtrace_full. > I'm testing the attached patch. > > >>> And I think we should use threaded=1 for the __glibcxx_backtrace_create_state call. You mean that 2 threads could try to assert at the same time. I don't know what's the rule on the static _Error_formatter instance in _S_at. If we have a strong guaranty that only 1 instance will be created then I understand why we need threaded=1. Even if in this case the 2 threads will report the same stacktrace.