From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5ADCE3858D3C; Sun, 10 Sep 2023 11:09:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5ADCE3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694344171; bh=mDRviDy9w7DRDK3zzjLHVytAznrTDNx5gTlycSCrIfU=; h=From:To:Subject:Date:From; b=E4Y3nUWYYcUvy4iP9jbzJR8yvcv2v1cbUxxFryftb3YtX1KhgKNiFwa0dsFP7eg4Q CFnU52iWm3kOaMYltpCiCay50YTgIdbH1sntyB9ydxZlLJkQy9KZPDf8TcoY2pzBqw q7P+V5xEF+25eHBzdMx4yZGFErnsNrSqpjE2fdcc= From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/111361] New: [14 Regression] ICE: in has_null_terminator, at analyzer/region-model.cc:3410 with -fanalyzer Date: Sun, 10 Sep 2023 11:09:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: 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: dmalcolm 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 cf_gcctarget attachments.created 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=3D111361 Bug ID: 111361 Summary: [14 Regression] ICE: in has_null_terminator, at analyzer/region-model.cc:3410 with -fanalyzer Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 55870 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55870&action=3Dedit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -fanalyzer testcase.c during IPA pass: analyzer testcase.c: In function 'foo': testcase.c:7:3: internal compiler error: in has_null_terminator, at analyzer/region-model.cc:3410 7 | __builtin_strncpy (out, (void *)&v, 5); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x18a4beb ana::fragment::has_null_terminator(generic_wide_int >, generic_wide_int >*) const /repo/gcc-trunk/gcc/analyzer/region-model.cc:3410 0x1893cf5 ana::region_model::scan_for_null_terminator(ana::region const*, tree_node*, ana::svalue const**, ana::region_model_context*) const /repo/gcc-trunk/gcc/analyzer/region-model.cc:3676 0x18740c3 ana::kf_strncpy::impl_call_post(ana::call_details const&) const /repo/gcc-trunk/gcc/analyzer/kf.cc:1544 0x18740c3 ana::kf_strncpy::impl_call_post(ana::call_details const&) const /repo/gcc-trunk/gcc/analyzer/kf.cc:1409 0x189f197 ana::region_model::on_call_post(gcall const*, bool, ana::region_model_context*) /repo/gcc-trunk/gcc/analyzer/region-model.cc:1679 0x186137b ana::exploded_node::on_stmt_post(gimple const*, ana::program_stat= e*, bool, ana::region_model_context*) /repo/gcc-trunk/gcc/analyzer/engine.cc:1569 0x186137b ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, ana::path_context*) /repo/gcc-trunk/gcc/analyzer/engine.cc:1507 0x1863e25 ana::exploded_graph::process_node(ana::exploded_node*) /repo/gcc-trunk/gcc/analyzer/engine.cc:4082 0x1864d6a ana::exploded_graph::process_worklist() /repo/gcc-trunk/gcc/analyzer/engine.cc:3476 0x186745f ana::impl_run_checkers(ana::logger*) /repo/gcc-trunk/gcc/analyzer/engine.cc:6144 0x18682e6 ana::run_checkers() /repo/gcc-trunk/gcc/analyzer/engine.cc:6232 0x1857608 execute /repo/gcc-trunk/gcc/analyzer/analyzer-pass.cc:87 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. $ 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-r14-3825-20230910101237-= g0d50facd937-checking-yes-rtl-df-extra-nobootstrap-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 --disable-bootstrap --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-r14-3825-20230910101237-g0d50facd9= 37-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20230910 (experimental) (GCC)=