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 D04BA3858D28 for ; Tue, 24 Jan 2023 13:34:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D04BA3858D28 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 E180D1FDC3; Tue, 24 Jan 2023 13:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1674567271; 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=IPLWAXyvzJrmPLIkbfmQxLAD5Zg8Jy0rZLB6J5U+pW0=; b=g/wZNKSLHiGuc/1Jqv8em9hV/NoAzK1tQtD6VWy8VTYr3taPCRk9KL8mEV0HEpzPtyfMJ2 RxZCD1J4B0cmUFznkBxIMklY6xvEYMGPGqoPjVG4dUYSbUGPow0Cm9h0LNFii3pbaop06V OD/ZpXdjvZNvCfN3gHIsBmwI/Q7EnIc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1674567271; 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=IPLWAXyvzJrmPLIkbfmQxLAD5Zg8Jy0rZLB6J5U+pW0=; b=wiNzEzlMG8c5JfD4duY8IY4VgcRpVrxVHk3sIJEo8FQbFpEGPnlPunPM2C1b3Fg5AWWOWG 9GLGxVJxflFt1oDQ== 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 CE8F913487; Tue, 24 Jan 2023 13:34:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Ik5pMWfez2PvYwAAMHmgww (envelope-from ); Tue, 24 Jan 2023 13:34:31 +0000 Message-ID: <9cfb9de3-1b7a-60e2-70ba-ac3b534e2871@suse.cz> Date: Tue, 24 Jan 2023 14:34:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] diagnostics: fix crash with -fdiagnostics-format=json-file Content-Language: en-US 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> In-Reply-To: <3cf31374-0496-3119-7775-0c22bc03cb38@suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.1 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=ham 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^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