public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/110387] New: [14 Regression] ICE: in key_t, at analyzer/region.h:1110 with -fanalyzer
@ 2023-06-24  6:54 zsojka at seznam dot cz
  2023-06-26  9:00 ` [Bug analyzer/110387] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2023-06-24  6:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110387

            Bug ID: 110387
           Summary: [14 Regression] ICE: in key_t, at
                    analyzer/region.h:1110 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

Created attachment 55395
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55395&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -fanalyzer testcase.c 
during IPA pass: analyzer
testcase.c: In function '_S_copy':
testcase.c:7:3: internal compiler error: in key_t, at analyzer/region.h:1110
    7 |   __builtin_memcpy (&a, &d, __n);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x89211a ana::cast_region::key_t::key_t(ana::region const*, tree_node*)
        /repo/gcc-trunk/gcc/analyzer/region.h:1110
0x89211a ana::cast_region::key_t::key_t(ana::region const*, tree_node*)
        /repo/gcc-trunk/gcc/analyzer/region.h:1107
0x89211a ana::region_model_manager::get_cast_region(ana::region const*,
tree_node*)
        /repo/gcc-trunk/gcc/analyzer/region-model-manager.cc:1588
0x25c60f5 ana::region_model::check_symbolic_bounds(ana::region const*,
ana::svalue const*, ana::svalue const*, ana::svalue const*,
ana::access_direction, ana::svalue const*, ana::region_model_context*) const
        /repo/gcc-trunk/gcc/analyzer/bounds-checking.cc:923
0x25c633b ana::region_model::check_region_bounds(ana::region const*,
ana::access_direction, ana::svalue const*, ana::region_model_context*) const
        /repo/gcc-trunk/gcc/analyzer/bounds-checking.cc:1026
0x182e94d ana::region_model::check_region_access(ana::region const*,
ana::access_direction, ana::svalue const*, ana::region_model_context*) const
        /repo/gcc-trunk/gcc/analyzer/region-model.cc:2809
0x182e94d ana::region_model::check_region_access(ana::region const*,
ana::access_direction, ana::svalue const*, ana::region_model_context*) const
        /repo/gcc-trunk/gcc/analyzer/region-model.cc:2798
0x182e94d ana::region_model::check_region_for_read(ana::region const*,
ana::region_model_context*) const
        /repo/gcc-trunk/gcc/analyzer/region-model.cc:2843
0x182e94d ana::region_model::check_region_for_read(ana::region const*,
ana::region_model_context*) const
        /repo/gcc-trunk/gcc/analyzer/region-model.cc:2840
0x182e94d ana::region_model::get_store_value(ana::region const*,
ana::region_model_context*) const
        /repo/gcc-trunk/gcc/analyzer/region-model.cc:2376
0x18164f1 ana::kf_memcpy_memmove::impl_call_pre(ana::call_details const&) const
        /repo/gcc-trunk/gcc/analyzer/kf.cc:518
0x1839e21 ana::region_model::on_call_pre(gcall const*,
ana::region_model_context*)
        /repo/gcc-trunk/gcc/analyzer/region-model.cc:1541
0x183a014 ana::region_model::on_stmt_pre(gimple const*, bool*,
ana::region_model_context*)
        /repo/gcc-trunk/gcc/analyzer/region-model.cc:1260
0x1804310 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:1471
0x1806f4d ana::exploded_graph::process_node(ana::exploded_node*)
        /repo/gcc-trunk/gcc/analyzer/engine.cc:4063
0x1807e9a ana::exploded_graph::process_worklist()
        /repo/gcc-trunk/gcc/analyzer/engine.cc:3466
0x180a58f ana::impl_run_checkers(ana::logger*)
        /repo/gcc-trunk/gcc/analyzer/engine.cc:6125
0x180b416 ana::run_checkers()
        /repo/gcc-trunk/gcc/analyzer/engine.cc:6213
0x17fa868 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-2060-20230624140803-gad5ab848cc4-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-2060-20230624140803-gad5ab848cc4-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20230624 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/110387] [14 Regression] ICE: in key_t, at analyzer/region.h:1110 with -fanalyzer
  2023-06-24  6:54 [Bug analyzer/110387] New: [14 Regression] ICE: in key_t, at analyzer/region.h:1110 with -fanalyzer zsojka at seznam dot cz
@ 2023-06-26  9:00 ` rguenth at gcc dot gnu.org
  2023-07-19 19:44 ` dmalcolm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-26  9:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110387

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/110387] [14 Regression] ICE: in key_t, at analyzer/region.h:1110 with -fanalyzer
  2023-06-24  6:54 [Bug analyzer/110387] New: [14 Regression] ICE: in key_t, at analyzer/region.h:1110 with -fanalyzer zsojka at seznam dot cz
  2023-06-26  9:00 ` [Bug analyzer/110387] " rguenth at gcc dot gnu.org
@ 2023-07-19 19:44 ` dmalcolm at gcc dot gnu.org
  2023-07-21  0:28 ` cvs-commit at gcc dot gnu.org
  2023-07-21  0:35 ` dmalcolm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2023-07-19 19:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110387

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-07-19
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this bug.

Confirmed: https://godbolt.org/z/zxfzzr7fj

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/110387] [14 Regression] ICE: in key_t, at analyzer/region.h:1110 with -fanalyzer
  2023-06-24  6:54 [Bug analyzer/110387] New: [14 Regression] ICE: in key_t, at analyzer/region.h:1110 with -fanalyzer zsojka at seznam dot cz
  2023-06-26  9:00 ` [Bug analyzer/110387] " rguenth at gcc dot gnu.org
  2023-07-19 19:44 ` dmalcolm at gcc dot gnu.org
@ 2023-07-21  0:28 ` cvs-commit at gcc dot gnu.org
  2023-07-21  0:35 ` dmalcolm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-21  0:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110387

--- Comment #2 from CVS 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:5a0aff76a9980488a760ece72323e7ed1f2c0e5e

commit r14-2688-g5a0aff76a9980488a760ece72323e7ed1f2c0e5e
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Thu Jul 20 20:24:01 2023 -0400

    analyzer: fix ICE on certain pointer subtractions [PR110387]

    gcc/analyzer/ChangeLog:
            PR analyzer/110387
            * region.h (struct cast_region::key_t): Support "m_type" being
            null by using "m_original_region" for empty/deleted slots.

    gcc/testsuite/ChangeLog:
            PR analyzer/110387
            * gcc.dg/analyzer/out-of-bounds-pr110387.c: New test.

    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/110387] [14 Regression] ICE: in key_t, at analyzer/region.h:1110 with -fanalyzer
  2023-06-24  6:54 [Bug analyzer/110387] New: [14 Regression] ICE: in key_t, at analyzer/region.h:1110 with -fanalyzer zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2023-07-21  0:28 ` cvs-commit at gcc dot gnu.org
@ 2023-07-21  0:35 ` dmalcolm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2023-07-21  0:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110387

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed by the above patch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-21  0:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-24  6:54 [Bug analyzer/110387] New: [14 Regression] ICE: in key_t, at analyzer/region.h:1110 with -fanalyzer zsojka at seznam dot cz
2023-06-26  9:00 ` [Bug analyzer/110387] " rguenth at gcc dot gnu.org
2023-07-19 19:44 ` dmalcolm at gcc dot gnu.org
2023-07-21  0:28 ` cvs-commit at gcc dot gnu.org
2023-07-21  0:35 ` 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).