From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 31DD03857803; Thu, 5 Oct 2023 05:27:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31DD03857803 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696483643; bh=LCYfyw1Ayz7GpjcVQoRPUm5ksuOTr2IFMjgSzDqiyCs=; h=From:To:Subject:Date:From; b=VR2DxTPVT+GX2iKmHixZDuiGYk6G32IjaZUQ0r0fEQmRk4TUShMJ9hqINr2jSUKC6 RWqZNjpeKs69l9i5jKIeF2aLgvUOnId+GrONJwHsa7xd/h3WoGMDqlxefbJvgE/6NZ NjowTC1P76ULL72GxPgy2G187kvsQQC7EUfQHCc0= From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/111700] New: ICE: SIGSEGV in needs_read_p (input.cc:598) with -fdiagnostics-format=sarif-file or -fdiagnostics-format=sarif-stderr on pre-processed input Date: Thu, 05 Oct 2023 05:27:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: diagnostic, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz X-Bugzilla-Status: UNCONFIRMED 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_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost Message-ID: 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=3D111700 Bug ID: 111700 Summary: ICE: SIGSEGV in needs_read_p (input.cc:598) with -fdiagnostics-format=3Dsarif-file or -fdiagnostics-format=3Dsarif-stderr on pre-processed input Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: diagnostic, ice-on-valid-code Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Compiler output: $ cat tmp.i # 0 "" x; $ x86_64-pc-linux-gnu-gcc -fdiagnostics-format=3Dsarif-stderr tmp.i -wrapper valgrind,-q =3D=3D21217=3D=3D Invalid read of size 8 =3D=3D21217=3D=3D at 0x289B3E4: needs_read_p (input.cc:598) =3D=3D21217=3D=3D by 0x289B3E4: maybe_read_data (input.cc:665) =3D=3D21217=3D=3D by 0x289B3E4: file_cache_slot::get_next_line(char**, l= ong*) (input.cc:715) =3D=3D21217=3D=3D by 0x289C6BF: get_full_file_content (input.cc:471) =3D=3D21217=3D=3D by 0x289C6BF: file_cache::get_source_file_content(char= const*) (input.cc:1075) =3D=3D21217=3D=3D by 0x2877B83: sarif_builder::maybe_make_artifact_content_object(char const*) const (diagnostic-format-sarif.cc:1545) =3D=3D21217=3D=3D by 0x2877D1F: sarif_builder::make_artifact_object(char= const*) (diagnostic-format-sarif.cc:1524) =3D=3D21217=3D=3D by 0x2879FF7: sarif_builder::make_run_object(sarif_inv= ocation*, json::array*) (diagnostic-format-sarif.cc:1340) =3D=3D21217=3D=3D by 0x287A22E: sarif_builder::make_top_level_object(sarif_invocation*, json::array*) (diagnostic-format-sarif.cc:1296) =3D=3D21217=3D=3D by 0x287A285: sarif_builder::flush_to_file(_IO_FILE*) (diagnostic-format-sarif.cc:473) =3D=3D21217=3D=3D by 0x287C200: ~sarif_stream_output_format (diagnostic-format-sarif.cc:1749) =3D=3D21217=3D=3D by 0x287C200: sarif_stream_output_format::~sarif_stream_output_format() (diagnostic-format-sarif.cc:1750) =3D=3D21217=3D=3D by 0x286E861: diagnostic_finish(diagnostic_context*) (diagnostic.cc:304) =3D=3D21217=3D=3D by 0xDBAA7F: toplev::main(int, char**) (toplev.cc:2310) =3D=3D21217=3D=3D by 0xDBCA7A: main (main.cc:39) =3D=3D21217=3D=3D Address 0x10 is not stack'd, malloc'd or (recently) free= 'd $ x86_64-pc-linux-gnu-gcc -fdiagnostics-format=3Dsarif-file tmp.i -wrapper valgrind,-q =3D=3D32755=3D=3D Invalid read of size 8 =3D=3D32755=3D=3D at 0x289B3E4: needs_read_p (input.cc:598) =3D=3D32755=3D=3D by 0x289B3E4: maybe_read_data (input.cc:665) =3D=3D32755=3D=3D by 0x289B3E4: file_cache_slot::get_next_line(char**, l= ong*) (input.cc:715) =3D=3D32755=3D=3D by 0x289C6BF: get_full_file_content (input.cc:471) =3D=3D32755=3D=3D by 0x289C6BF: file_cache::get_source_file_content(char= const*) (input.cc:1075) =3D=3D32755=3D=3D by 0x2877B83: sarif_builder::maybe_make_artifact_content_object(char const*) const (diagnostic-format-sarif.cc:1545) =3D=3D32755=3D=3D by 0x2877D1F: sarif_builder::make_artifact_object(char= const*) (diagnostic-format-sarif.cc:1524) =3D=3D32755=3D=3D by 0x2879FF7: sarif_builder::make_run_object(sarif_inv= ocation*, json::array*) (diagnostic-format-sarif.cc:1340) =3D=3D32755=3D=3D by 0x287A22E: sarif_builder::make_top_level_object(sarif_invocation*, json::array*) (diagnostic-format-sarif.cc:1296) =3D=3D32755=3D=3D by 0x287A285: sarif_builder::flush_to_file(_IO_FILE*) (diagnostic-format-sarif.cc:473) =3D=3D32755=3D=3D by 0x287BE31: sarif_file_output_format::~sarif_file_output_format() (diagnostic-format-sarif.cc:1778) =3D=3D32755=3D=3D by 0x287C018: sarif_file_output_format::~sarif_file_output_format() (diagnostic-format-sarif.cc:1781) =3D=3D32755=3D=3D by 0x286E861: diagnostic_finish(diagnostic_context*) (diagnostic.cc:304) =3D=3D32755=3D=3D by 0xDBAA7F: toplev::main(int, char**) (toplev.cc:2310) =3D=3D32755=3D=3D by 0xDBCA7A: main (main.cc:39) =3D=3D32755=3D=3D Address 0x10 is not stack'd, malloc'd or (recently) free= 'd =3D=3D32755=3D=3D=20 error: unable to open '' for writing: No such file or directory Internal compiler error: 0x14a9ccf crash_signal /repo/gcc-trunk/gcc/toplev.cc:314 ... $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=3D/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-g= cc COLLECT_LTO_WRAPPER=3D/repo/gcc-trunk/binary-trunk-20231003001722-g41d1c9a9= 795-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/= 14.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=3Dc,c++ --enable-valgrind-annotations --disable-nls --enable-checking=3Dyes,rtl,df,= extra --with-cloog --with-ppl --with-isl --build=3Dx86_64-pc-linux-gnu --host=3Dx86_64-pc-linux-gnu --target=3Dx86_64-pc-linux-gnu --with-ld=3D/usr/bin/x86_64-pc-linux-gnu-ld --with-as=3D/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=3D/repo/gcc-trunk//binary-trunk-20231003001722-g41d1c9a9795-checki= ng-yes-rtl-df-extra-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20231003 (experimental) (GCC)=