public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/107554] New: Segmentation fault during GIMPLE pass: strlen (tree-ssa-strlen.cc:4772)
@ 2022-11-07 13:28 nik_1357 at mail dot ru
  2022-11-07 14:09 ` [Bug c/107554] " nik_1357 at mail dot ru
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: nik_1357 at mail dot ru @ 2022-11-07 13:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107554
           Summary: Segmentation fault during GIMPLE pass: strlen
                    (tree-ssa-strlen.cc:4772)
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nik_1357 at mail dot ru
  Target Milestone: ---

Hello.

Test which causes the bug:
#include <string.h>

#define ELEMS 0x40000000

int a[ELEMS];
int b[ELEMS];

int main() {
    memcpy(a, b, ELEMS*sizeof(int));
}

Command:
gcc -O1 -foptimize-strlen test.c -c

Error message:
during GIMPLE pass: strlen
memcpy_segfault.c: In function ‘main’:
memcpy_segfault.c:8:5: internal compiler error: Segmentation fault
    8 | int main()
      |     ^~~~
0xb2636f crash_signal
        ../../../gcc/gcc-10.4.0/gcc/toplev.c:328
0x7f3f359e351f ???
        ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0xcaaaed count_nonzero_bytes
        ../../../gcc/gcc-10.4.0/gcc/tree-ssa-strlen.c:4820
0xcad456 count_nonzero_bytes
        ../../../gcc/gcc-10.4.0/gcc/tree-ssa-strlen.c:4963
0xcad456 handle_store
        ../../../gcc/gcc-10.4.0/gcc/tree-ssa-strlen.c:5040
0xcad456 check_and_optimize_stmt
        ../../../gcc/gcc-10.4.0/gcc/tree-ssa-strlen.c:5687
0xcad456 strlen_dom_walker::before_dom_children(basic_block_def*)
        ../../../gcc/gcc-10.4.0/gcc/tree-ssa-strlen.c:5864
0x12d45d7 dom_walker::walk(basic_block_def*)
        ../../../gcc/gcc-10.4.0/gcc/domwalk.c:309
0xca404e printf_strlen_execute
        ../../../gcc/gcc-10.4.0/gcc/tree-ssa-strlen.c:5930

Bug is present in:
10, 11, 12 and current master.
9 is not affected by it.

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

end of thread, other threads:[~2023-01-26 13:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07 13:28 [Bug c/107554] New: Segmentation fault during GIMPLE pass: strlen (tree-ssa-strlen.cc:4772) nik_1357 at mail dot ru
2022-11-07 14:09 ` [Bug c/107554] " nik_1357 at mail dot ru
2022-11-07 14:50 ` nik_1357 at mail dot ru
2022-11-07 16:51 ` [Bug tree-optimization/107554] [10/11/12/13 Regression] " pinskia at gcc dot gnu.org
2022-11-08  9:27 ` rguenth at gcc dot gnu.org
2022-11-11 13:28 ` rguenth at gcc dot gnu.org
2022-11-11 14:36 ` cvs-commit at gcc dot gnu.org
2022-11-11 15:41 ` [Bug tree-optimization/107554] [10/11/12 " jakub at gcc dot gnu.org
2023-01-24 14:27 ` cvs-commit at gcc dot gnu.org
2023-01-24 15:22 ` [Bug tree-optimization/107554] [10/11 " cvs-commit at gcc dot gnu.org
2023-01-26 13:05 ` [Bug tree-optimization/107554] [10 " cvs-commit at gcc dot gnu.org
2023-01-26 13:07 ` rguenth 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).