[Bug c/13920] New: Segmentation Faults with optimization greater than 0

klawson at ad-holdings dot co dot uk gcc-bugzilla@gcc.gnu.org
Thu Jan 29 12:11:00 GMT 2004


sh-elf-gcc on cygwin fails with segmentation faults when building the eCos
FreeBSD stack. The same code can be built using the linux sh-elf-gcc build.

sh-elf-gcc -c  -I/ecos-c/data/ecos/net1_install/include
-I/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0
-I/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src
-I/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/tests -I.
-I/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/
-mb -m3 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef
-Woverloaded-virtual -ggdb -O2 -ffunction-sections -fdata-sections -fno-rtti
-fno-exceptions -fvtable-gc -finit-priority -D_KERNEL -save-temps
-Wp,-MD,src/sys/netinet/tcp_input.tmp -o
src/sys/netinet/net_bsd_tcpip_tcp_input.o
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c:
In function `cyg_tcp_input':
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c:405:
warning: implicit declaration of function `cyg_in_pseudo'
make[1]: Leaving directory `/ecos-c/data/ecos/net1_build/net/bsd_tcpip/v2_0'
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c:
In function `tcp_pulloutofband':
make: Leaving directory `/ecos-c/data/ecos/net1_build'
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c:2541:
internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[1]: *** [src/sys/netinet/tcp_input.o.d] Error 1
make: *** [build] Error 2

Segmentation faults can also occur in other areas of this file.

Host environment is cygwin 1.5.5. The sh-elf toolchain is that obtainable from
eCoscentric, but the same fault also occurs when building your own toolchain.
gcc was configured using:
configure --target=sh-elf --prefix=/newtools --enable-languages=c,c++ \
  --with-gnu-as --with-gnu-ld --with-newlib \
  --with-gxx-include-dir=/gnutools/sh-elf/include \
  -v 2>&1 | tee configure.out

The fault does not occur on a linux build of sh-elf-gcc.

-- 
           Summary: Segmentation Faults with optimization greater than 0
           Product: gcc
           Version: 3.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: klawson at ad-holdings dot co dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: sh-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13920



More information about the Gcc-bugs mailing list