From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 7D7F53858D39 for ; Thu, 16 Mar 2023 10:06:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7D7F53858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 322FB21A15; Thu, 16 Mar 2023 10:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1678961160; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aUfrjYZFp3kxZvwNlkPLxS7oM2d+YRtR0zYcQYVpcmc=; b=3HYaxhW8HX+lRxo+wsK+GXr2OqzhrF8ua1NKSCLL8gjWdkYhQXhFpTc7tLV54Zpm2Y28Wd vwAnQdUYLgJOBk8jhJOLhKWoVgkJPjgFw220y6IAHOCZ6kUKBIEmo5PvINwlWm+BIAShhc EP041+DI6he0wJEIbem8ei55XVzWbUw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1678961160; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aUfrjYZFp3kxZvwNlkPLxS7oM2d+YRtR0zYcQYVpcmc=; b=+yR45ynnbJINKeJPMgrlkEeRYVbpidGLieq1S69yJVCm8dxCsvlJh82EmrzBhFoKZ1xKZb 8fn2BwafW60kzXAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 14D6D133E0; Thu, 16 Mar 2023 10:06:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5yGXAwjqEmQNVwAAMHmgww (envelope-from ); Thu, 16 Mar 2023 10:06:00 +0000 Message-ID: Date: Thu, 16 Mar 2023 11:05:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] diagnostics: fix crash with -fdiagnostics-format=json-file From: =?UTF-8?Q?Martin_Li=c5=a1ka?= To: David Malcolm , gcc-patches@gcc.gnu.org References: <60f9fd2b-211e-c1d5-e17a-1fab1ee51338@suse.cz> <3cf31374-0496-3119-7775-0c22bc03cb38@suse.cz> <9cfb9de3-1b7a-60e2-70ba-ac3b534e2871@suse.cz> <66deef81-2532-43f7-dfc8-281c19a663d8@suse.cz> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_SOFTFAIL,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: PING^5 On 2/27/23 10:49, Martin Liška wrote: > PING^4 > > On 2/17/23 15:52, Martin Liška wrote: >> PING^3 >> >> On 2/1/23 14:13, Martin Liška wrote: >>> PING^2 >>> >>> On 1/24/23 14:34, Martin Liška wrote: >>>> PING^1 >>>> >>>> On 1/10/23 16:10, Martin Liška wrote: >>>>> On 1/6/23 14:21, David Malcolm wrote: >>>>>> On Fri, 2023-01-06 at 12:33 +0100, Martin Liška wrote: >>>>>>> Patch can bootstrap on x86_64-linux-gnu and survives regression >>>>>>> tests. >>>>>> >>>>>> Thanks for the patch. >>>>>> >>>>>> I noticed that you marked PR 108307 as a dup of this, which covers >>>>>> -fdiagnostics-format=sarif-file (and a .S file as input). >>>>>> >>>>>> The patch doesn't add any test coverage (for either of the diagnostic >>>>>> formats). >>>>>> >>>>>> If we try to emit a diagnostic and base_file_name is NULL, and the user >>>>>> requested one of -fdiagnostics-format={json,sarif}-file, where do the >>>>>> diagnostics go?  Where should they go? >>>>> >>>>> Hey. >>>>> >>>>> I've done a new version of the patch where I utilize x_main_input_basename. >>>>> >>>>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >>>>> >>>>> Ready to be installed? >>>>> Thanks, >>>>> Martin >>>> >>> >> >