From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2F5CC3858D32; Mon, 19 Feb 2024 17:19:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F5CC3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708363146; bh=aydwpaRFAoveagkVou+38gXL/qMT0rTaCPRxXWcDW+Y=; h=From:To:Subject:Date:From; b=EcQQSj5Py2YOjTPE3sKy7UoeD15dOc4QVveNwy5Pi2aksjN72NW94AB+lpoWMlKlr y/OpywcXagOjftXfqzzXokX0U57YddorlKDYGP8QzQ1AvT+8MtNigbUkvzp2/G67gs ZZJpLujqjbeugsuC3MbhzbkC4p4au5zXM6YKNmLw= From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/113999] New: [14 Regression] ICE: in string_cst_has_null_terminator, at analyzer/region-model.cc:3651 with -fanalyzer on gcc.dg/tree-ssa/strncpy-2.c Date: Mon, 19 Feb 2024 17:19:05 +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=3D113999 Bug ID: 113999 Summary: [14 Regression] ICE: in string_cst_has_null_terminator, at analyzer/region-model.cc:3651 with -fanalyzer on gcc.dg/tree-ssa/strncpy-2.c 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 57464 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57464&action=3Dedit auto-reduced testcase Maybe related to PR113998 Compiler output: $ x86_64-pc-linux-gnu-gcc -fanalyzer gcc.dg/tree-ssa/strncpy-2.c during IPA pass: analyzer gcc.dg/tree-ssa/strncpy-2.c: In function 'main': gcc.dg/tree-ssa/strncpy-2.c:24:15: internal compiler error: in string_cst_has_null_terminator, at analyzer/region-model.cc:3651 24 | size_t n1 =3D __builtin_strlen (a); | ^~~~~~~~~~~~~~~~~~~~ 0x8c3351 string_cst_has_null_terminator /repo/gcc-trunk/gcc/analyzer/region-model.cc:3651 0x195c069 svalue_byte_range_has_null_terminator_1 /repo/gcc-trunk/gcc/analyzer/region-model.cc:3712 0x195c069 svalue_byte_range_has_null_terminator /repo/gcc-trunk/gcc/analyzer/region-model.cc:3809 0x195c3c8 svalue_byte_range_has_null_terminator_1 /repo/gcc-trunk/gcc/analyzer/region-model.cc:3774 0x195c3c8 svalue_byte_range_has_null_terminator /repo/gcc-trunk/gcc/analyzer/region-model.cc:3809 0x1969838 ana::region_model::scan_for_null_terminator_1(ana::region const*, tree_node*, ana::svalue const**, ana::region_model_context*) const /repo/gcc-trunk/gcc/analyzer/region-model.cc:4066 0x196a67e ana::region_model::check_for_null_terminated_string_arg(ana::call_details const&, unsigned int, bool, ana::svalue const**) const /repo/gcc-trunk/gcc/analyzer/region-model.cc:4337 0x1945766 ana::kf_strlen::impl_call_pre(ana::call_details const&) const /repo/gcc-trunk/gcc/analyzer/kf.cc:1389 0x1961a57 ana::region_model::on_call_pre(gcall const*, ana::region_model_context*) /repo/gcc-trunk/gcc/analyzer/region-model.cc:1700 0x196600a ana::region_model::on_stmt_pre(gimple const*, bool*, ana::region_model_context*) /repo/gcc-trunk/gcc/analyzer/region-model.cc:1337 0x192cf70 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, bool*, ana::path_context*) /repo/gcc-trunk/gcc/analyzer/engine.cc:1512 0x192ff05 ana::exploded_graph::process_node(ana::exploded_node*) /repo/gcc-trunk/gcc/analyzer/engine.cc:4124 0x1930e3a ana::exploded_graph::process_worklist() /repo/gcc-trunk/gcc/analyzer/engine.cc:3515 0x19335a3 ana::impl_run_checkers(ana::logger*) /repo/gcc-trunk/gcc/analyzer/engine.cc:6209 0x19344b6 ana::run_checkers() /repo/gcc-trunk/gcc/analyzer/engine.cc:6300 0x1922e58 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-9062-20240219114159-= geb17bdc211a-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-l= inux-gnu/14.0.1/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-r14-9062-20240219114159-geb17bdc21= 1a-checking-yes-rtl-df-extra-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.1 20240219 (experimental) (GCC)=