From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCFE23858C5F; Mon, 18 Mar 2024 22:18:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCFE23858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710800337; bh=X3jT8Rbw7dIq+NCTgirUbF7aZcbisKC7iJchlXdBHo8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W7SQgU5822/xUTQllawu8h1w0h+Rt0/xnEcbJ2UT6GeLeJ/KiYtVldPO0yxAlx2nu ApqswCkEI+93NsL8mCXFdIIpKo5g/oSVxAwxez3VTxHtB5x8gZcnvRx8c7csgGUOUf bk6vhtnkN0II+6z77EleloBTTKvxH3TY8xlqFA3s= From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114348] Corrupt SARIF output on stderr Date: Mon, 18 Mar 2024 22:18:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114348 David Malcolm changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Last reconfirmed| |2024-03-18 --- Comment #3 from David Malcolm --- Thanks for reporting this. Note that -fanalyzer isn't needed to reproduce this problem, e.g. on trunk with: $ (./xgcc -B. -fdiagnostics-format=3Dsarif-stderr -c test.c 2>&1) | python = -m json.tool Extra data: line 24 column 1 (char 1839) Also affects -fdiagnostics-format=3Djson-stderr. fnotice (stderr, ...) is used in ~150 places in trunk. I'm looking at ways of fixing this (perhaps by having fnotice bail out earl= y on these machine-readable stderr formats when outputting to stderr).=