[Bug bootstrap/19852] Segmentation fault during: build/genmodes -h > tmp-modes.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19852 --- Comment #8 from yjf.victor at foxmail dot com --- It seems that the stack size is unlimited. ``` % limit cputime unlimited filesize unlimited datasize unlimited stacksizeunlimited coredumpsize unlimited vmemoryuse unlimited descriptors 1024 % limit -h cputime unlimited filesize unlimited datasize unlimited stacksizeunlimited coredumpsize unlimited vmemoryuse unlimited descriptors 1024 ``` However, it fails at `alloca()` when it only try to allocate `31 * sizeof(struct mode_data *)` bytes of memory. ``` Breakpoint 1, _Z15calc_wider_modev () at /dev/fs/E/22/gcc/gcc-5.5.0/gcc/genmodes.c:851 851 sortbuf = XALLOCAVEC (struct mode_data *, max_n_modes + 1); (gdb) p max_n_modes $1 = 31 (gdb) n Program received signal SIGSEGV, Segmentation fault. 0x0083ff7a in ?? () (gdb) ```
[Bug bootstrap/19852] Segmentation fault during: build/genmodes -h > tmp-modes.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19852 --- Comment #7 from Andrew Pinski --- (In reply to yjf.victor from comment #6) > According to my debugging on gdb, it failed to allocate the memory via the > `alloca()` function, and therefore resulted in Segmentation fault. If the problem is alloca, then you should be able to increase the stack size limit and have it work. Also i586-pc-interix3 is no longer supported IIRC.
[Bug bootstrap/19852] Segmentation fault during: build/genmodes -h > tmp-modes.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19852 --- Comment #6 from yjf.victor at foxmail dot com --- According to my debugging on gdb, it failed to allocate the memory via the `alloca()` function, and therefore resulted in Segmentation fault. ``` % gdb build/genmodes GNU gdb 2002-11-11-cvs Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-pc-interix3"... .gdbinit:13: Error in sourced command file: /dev/fs/E/22/gcc/gcc-5.5.0/gcc/gdbinit.in:212: Error in sourced command file: Command not implemented yet. (gdb) b genmodes.c:851 Breakpoint 1 at 0x403899: file /dev/fs/E/22/gcc/gcc-5.5.0/gcc/genmodes.c, line 8 51. (gdb) r -h Starting program: /dev/fs/E/22/gcc/bindir/gcc/build/genmodes -h Breakpoint 1, _Z15calc_wider_modev () at /dev/fs/E/22/gcc/gcc-5.5.0/gcc/genmodes.c:851 851 sortbuf = XALLOCAVEC (struct mode_data *, max_n_modes + 1); (gdb) n Program received signal SIGSEGV, Segmentation fault. 0x0083ff7a in ?? () (gdb) ```
[Bug bootstrap/19852] Segmentation fault during: build/genmodes -h > tmp-modes.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19852 --- Comment #5 from yjf.victor at foxmail dot com --- I ran the command directly, and here it show: % build/genmodes -h > tmp-modes.h Segmentation fault (core dumped)
[Bug bootstrap/19852] Segmentation fault during: build/genmodes -h > tmp-modes.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19852 yjf.victor at foxmail dot com changed: What|Removed |Added CC||yjf.victor at foxmail dot com --- Comment #4 from yjf.victor at foxmail dot com --- I have the same problem. ``` make[3]: Entering directory '/dev/fs/E/22/gcc/bindir/gcc' build/genmodes -h > tmp-modes.h Memory fault (core dumped) make[3]: *** [Makefile:2206: s-modes-h] Error 139 make[3]: Leaving directory '/dev/fs/E/22/gcc/bindir/gcc' make[2]: *** [Makefile:4369: all-stage1-gcc] Error 2 make[2]: Leaving directory '/dev/fs/E/22/gcc/bindir' make[1]: *** [Makefile:19210: stage1-bubble] Error 2 make[1]: Leaving directory '/dev/fs/E/22/gcc/bindir' make: *** [Makefile:902: all] Error 2 [ -f stage_final ] || echo stage3 > stage_final make[1]: Entering directory '/dev/fs/E/22/gcc/bindir' make[2]: Entering directory '/dev/fs/E/22/gcc/bindir' make[3]: Entering directory '/dev/fs/E/22/gcc/bindir' ^Cmake[3]: *** [Makefile:19168: stage1-end] Interrupt make[2]: *** [Makefile:19125: stage1-start] Error 130 make[1]: *** [Makefile:19210: stage1-bubble] Error 130 make: *** [Makefile:902: all] Error 130 ```
[Bug bootstrap/19852] Segmentation fault during: build/genmodes -h tmp-modes.h
--- Comment #3 from pinskia at gcc dot gnu dot org 2005-10-24 02:34 --- Works for many other people so closing as works for me. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||WORKSFORME http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19852
[Bug bootstrap/19852] Segmentation fault during: build/genmodes -h tmp-modes.h
--- Additional Comments From georg dot schwarz at freenet dot de 2005-04-23 16:11 --- I am seeing the same problem trying to bootstrap gcc-4.0.0 on IRIX 5.3: ... /bin/ksh /usr/people/schwarz/gcc-4.0.0/gcc/mkconfig.sh bconfig.h cc -c -g -DIN_GCC -DHAVE_CONFIG_H -DGENERATOR_FILE-I. -Ibuild -I/usr/people/schwarz/gcc-4.0.0/gcc -I/usr/people/schwarz/gcc-4.0.0/gcc/build -I/usr/people/schwarz/gcc-4.0.0/gcc/../include -I./../intl -I/usr/people/schwarz/gcc-4.0.0/gcc/../libcpp/include \ -o build/genmodes.o /usr/people/schwarz/gcc-4.0.0/gcc/genmodes.c cc -c -g -DIN_GCC -DHAVE_CONFIG_H -DGENERATOR_FILE-I. -Ibuild -I/usr/people/schwarz/gcc-4.0.0/gcc -I/usr/people/schwarz/gcc-4.0.0/gcc/build -I/usr/people/schwarz/gcc-4.0.0/gcc/../include -I./../intl -I/usr/people/schwarz/gcc-4.0.0/gcc/../libcpp/include \ -o build/errors.o /usr/people/schwarz/gcc-4.0.0/gcc/errors.c cc -g -DIN_GCC -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genmodes \ build/genmodes.o build/errors.o ../build-mips-sgi-irix5.3/libiberty/libiberty.a build/genmodes -h tmp-modes.h gmake[1]: *** [s-modes] Segmentation fault (core dumped) gmake[1]: Leaving directory `/usr/people/schwarz/gcc/gcc' gmake: *** [all-gcc] Error 2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19852
[Bug bootstrap/19852] Segmentation fault during: build/genmodes -h tmp-modes.h
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-12 22:35 --- This works for me and many other people. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19852