From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id BA5E43858D20 for ; Mon, 27 Feb 2023 09:49:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA5E43858D20 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-out2.suse.de (Postfix) with ESMTPS id 959361F8D4; Mon, 27 Feb 2023 09:49:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1677491385; 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=vniQnPEGBughopvGSR3d0C6fXfF3iP4iLUycm8wM6KI=; b=VkeRNPn0kRI2ib0PuNn/R1ceprdC4AW5qDKjMkfCiKlVNclHXdFsEJHqkooSv6w59R9+vb Im5aNXsVmoLhLXIHMVbho9oTM5S7NnHuU7G5Y+m01DN+/SFphG0EKd/yHcWn8cv35guVR8 Du6dAfQK6qybOdHWWhbmLWNOiON1wBU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1677491385; 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=vniQnPEGBughopvGSR3d0C6fXfF3iP4iLUycm8wM6KI=; b=WcDBn1uzjTQ/K1yiWDlg3SwZsn/BXlauSEVbUZ7sATV52yFDB/XyaCJw17GB+FNsCpvqN+ VVzow1uBM/qU6uDQ== 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 8341613912; Mon, 27 Feb 2023 09:49:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Rrf+Hrl8/GOtYQAAMHmgww (envelope-from ); Mon, 27 Feb 2023 09:49:45 +0000 Message-ID: Date: Mon, 27 Feb 2023 10:49:45 +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: <66deef81-2532-43f7-dfc8-281c19a663d8@suse.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.6 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^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 >>> >> >