From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Yg5RDkNxE2bfricAWB0awg (envelope-from ) for ; Mon, 08 Apr 2024 00:23:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1712550211; bh=1KNMO5Kykai/VQbXsTuFAKQIW4cp5e9oZPYYYQNHq1I=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uvCMLvEOyRxIzLIWDTAaSkCEH8AiVcFR22q7JwVn8EHshQnvARvIIF6imbNHw7o5O l3UdfncJus4oo6DMv5pfXtgh5y7mWihcY6gTChtFbeEEh6ObsABflG3R4b57c3jHuv M+mz6ZTZYeVNbrz7fZgbqvY6LKQq/mUZYH6Tdtmk= Received: by simark.ca (Postfix, from userid 112) id 115441E0C0; Mon, 8 Apr 2024 00:23:31 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=IS1Jnho4; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D2E261E092 for ; Mon, 8 Apr 2024 00:23:28 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 248593858410 for ; Mon, 8 Apr 2024 04:23:28 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 20C483858D28 for ; Mon, 8 Apr 2024 04:23:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 20C483858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 20C483858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712550187; cv=none; b=kkOgStznzLBMOwHClOKlMMI4oGyOzcsvI0Hj7xA/3EKquQ1+Ojj34WELvSloVjjihlQUWkXT3OKcw/uaVM/f/DwP8DC0hCX1w6KspL8noiydluL+ARMzzSm+Un/TBYR1OWrC03o7pQ0DETyv9EVN9OCrIrNe2U0VfhMDWH+jhIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712550187; c=relaxed/simple; bh=1KNMO5Kykai/VQbXsTuFAKQIW4cp5e9oZPYYYQNHq1I=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=OFMFZ7rSW9NIdbo9Pu6xzsN4NPfsK+RVV/KBlk2LhEMvHujglcQZne7Hzth4l8vFsCScL2Vm/RNtGlcV1Uvy8CJt4XldRdHq8MVZ5y7eDe3GPNfYN8q7NJu+c2nEfqG4CfsTZpest8t1OM08flji6hCeCZYqRfH8sKvU2ApyI1k= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1712550185; bh=1KNMO5Kykai/VQbXsTuFAKQIW4cp5e9oZPYYYQNHq1I=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=IS1Jnho4ytZySafWm228RYJ1DGVo1ZhPC8yp5smQ7Drq6raybuzfGF8qQruknXX3q T0ebg3zLPWn/Rvv4TEIv1mNwLL7CWHVZhNzVmxeYlDlq0Dv6495kgO2jEW/s18BBoK oUeSoLpJRQqA46au24bVae+yJ6s48W02o21jKY/Q= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 7725D1E092; Mon, 8 Apr 2024 00:23:05 -0400 (EDT) Message-ID: Date: Mon, 8 Apr 2024 00:23:05 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] Capture warnings when writing to the index cache To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20240312144033.77496-1-tromey@adacore.com> <87zfulat8g.fsf@tromey.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <87zfulat8g.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, TXREP 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org On 2024-03-26 11:49, Tom Tromey wrote: >>>>>> "Tom" == Tom Tromey writes: > > Tom> PR symtab/30837 points out a race that can occur when writing to the > Tom> index cache: a call to ada_encode can cause a warning, which is > Tom> forbidden on a worker thread. > > Tom> This patch fixes the problem by arranging to capture any such > Tom> warnings. > > Tom> This is v2 of the patch. It is rebased on top of some other changes > Tom> in the same area. v1 was here: > > Tom> https://sourceware.org/pipermail/gdb-patches/2024-February/206595.html > > Tom> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30837 > > I'm checking this in now. > > Tom Not sure if this has been reported already, but when I build for --host=x86_64-w64-mingw32, I get: CXX gdb.o In file included from /home/simark/src/binutils-gdb/gdb/defs.h:620, from : /home/simark/src/binutils-gdb/gdb/utils.h:378:56: error: ignoring attributes on template argument ‘void(const char*, va_list)’ {aka ‘void(const char*, char*)’} [-Werror=ignored-attributes] 378 | typedef gdb::function_view warning_hook_handler; | ^ I'm guessing that the problem is some attributes on va_list, on mingw-w64? I wouldn't know how to find that. With that issue and the other one that broke the clang build, using that function signature in a function view seems pretty fragile. It would perhaps be simpler for `warning_hook_handler` to be an abstract base class with one virtual method (with the same signature as the current warning_hook_handler). That method could have whatever attribute it needs, it wouldn't be a problem. Simon