[Bug tree-optimization/92691] New: [10 Regression] ICE in strlen_dom_walker::before_dom_children at gcc/tree-ssa-strlen.c:5177 since r274933

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 27 10:09:00 GMT 2019


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

            Bug ID: 92691
           Summary: [10 Regression] ICE in
                    strlen_dom_walker::before_dom_children at
                    gcc/tree-ssa-strlen.c:5177 since r274933
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

I see the following ICE:

$ cat 1.i
void eloop_register_read_sock();

void hostapd_ctrl_iface_status();
void hostapd_ctrl_iface_receive() { hostapd_ctrl_iface_status(); }
void hostapd_ctrl_iface_init() {
  eloop_register_read_sock(hostapd_ctrl_iface_receive);
}

$ cat 2.i
int a;
char *ptr;
void hostapd_ctrl_iface_status() {
  int b;
  if (b)
    __builtin_snprintf(ptr, a, "asdf");
}

void hostapd_ctrl_iface_init();
int main() { hostapd_ctrl_iface_init(); return 0; }

$ gcc -O2 -flto=16 1.i 2.i
during GIMPLE pass: strlen
1.i: In function ‘hostapd_ctrl_iface_receive’:
1.i:4:6: internal compiler error: Segmentation fault
    4 | void hostapd_ctrl_iface_receive() { hostapd_ctrl_iface_status(); }
      |      ^
0xa15d2f crash_signal
        ../../gcc/toplev.c:328
0x7f960989114f ???
       
/usr/src/debug/glibc-2.30-1.2.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xba47c0 gsi_next
        ../../gcc/gimple-iterator.h:193
0xba47c0 strlen_dom_walker::before_dom_children(basic_block_def*)
        ../../gcc/tree-ssa-strlen.c:5177
0x1186db5 dom_walker::walk(basic_block_def*)
        ../../gcc/domwalk.c:309
0xb9aba1 printf_strlen_execute
        ../../gcc/tree-ssa-strlen.c:5242
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make: *** [/tmp/cccBurgu.mk:2: /tmp/ccEQw7Iw.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

The test-case is reduced from hostapd package.


More information about the Gcc-bugs mailing list