public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/111361] New: [14 Regression] ICE: in has_null_terminator, at analyzer/region-model.cc:3410 with -fanalyzer
@ 2023-09-10 11:09 zsojka at seznam dot cz
2023-09-12 12:19 ` [Bug analyzer/111361] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2023-09-10 11:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111361
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=55870&action=edit
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<fixed_wide_int_storage<128>
>, generic_wide_int<fixed_wide_int_storage<128> >*) 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_state*,
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 <https://gcc.gnu.org/bugs/> for instructions.
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/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=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-3825-20230910101237-g0d50facd937-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20230910 (experimental) (GCC)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/111361] [14 Regression] ICE: in has_null_terminator, at analyzer/region-model.cc:3410 with -fanalyzer
2023-09-10 11:09 [Bug analyzer/111361] New: [14 Regression] ICE: in has_null_terminator, at analyzer/region-model.cc:3410 with -fanalyzer zsojka at seznam dot cz
@ 2023-09-12 12:19 ` rguenth at gcc dot gnu.org
2024-01-18 17:12 ` cvs-commit at gcc dot gnu.org
2024-01-18 17:21 ` dmalcolm at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-09-12 12:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111361
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/111361] [14 Regression] ICE: in has_null_terminator, at analyzer/region-model.cc:3410 with -fanalyzer
2023-09-10 11:09 [Bug analyzer/111361] New: [14 Regression] ICE: in has_null_terminator, at analyzer/region-model.cc:3410 with -fanalyzer zsojka at seznam dot cz
2023-09-12 12:19 ` [Bug analyzer/111361] " rguenth at gcc dot gnu.org
@ 2024-01-18 17:12 ` cvs-commit at gcc dot gnu.org
2024-01-18 17:21 ` dmalcolm at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-18 17:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111361
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:
https://gcc.gnu.org/g:d5604febcfb09445eb738dcb8c675a4cb9671519
commit r14-8257-gd5604febcfb09445eb738dcb8c675a4cb9671519
Author: David Malcolm <dmalcolm@redhat.com>
Date: Thu Jan 18 12:11:57 2024 -0500
analyzer: fix ICE on strlen ((char *)&VECTOR_CST) [PR111361]
gcc/analyzer/ChangeLog:
PR analyzer/111361
* region-model.cc (svalue_byte_range_has_null_terminator_1): The
initial byte of an all-zeroes SVAL is a zero byte. Remove
gcc_unreachable from SK_CONSTANT for constants that aren't
STRING_CST or INTEGER_CST.
gcc/testsuite/ChangeLog:
PR analyzer/111361
* c-c++-common/analyzer/strlen-pr111361.c: New test.
* c-c++-common/analyzer/strncpy-1.c (test_zero_fill): Remove fixed
xfail.
* c-c++-common/analyzer/strncpy-pr111361.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/111361] [14 Regression] ICE: in has_null_terminator, at analyzer/region-model.cc:3410 with -fanalyzer
2023-09-10 11:09 [Bug analyzer/111361] New: [14 Regression] ICE: in has_null_terminator, at analyzer/region-model.cc:3410 with -fanalyzer zsojka at seznam dot cz
2023-09-12 12:19 ` [Bug analyzer/111361] " rguenth at gcc dot gnu.org
2024-01-18 17:12 ` cvs-commit at gcc dot gnu.org
@ 2024-01-18 17:21 ` dmalcolm at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2024-01-18 17:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111361
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed by the above patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-18 17:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-10 11:09 [Bug analyzer/111361] New: [14 Regression] ICE: in has_null_terminator, at analyzer/region-model.cc:3410 with -fanalyzer zsojka at seznam dot cz
2023-09-12 12:19 ` [Bug analyzer/111361] " rguenth at gcc dot gnu.org
2024-01-18 17:12 ` cvs-commit at gcc dot gnu.org
2024-01-18 17:21 ` dmalcolm at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).