Bug 16109 - gcj segfaults
gcj segfaults
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-08-13 16:08 EDT by mal
Modified: 2007-04-18 12:28 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-01 17:35:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description mal 2000-08-13 16:08:52 EDT
GCC segfaults ob a big program.
 gcj com/polytechnik/predictor/Predictor.java
com/polytechnik/predictor/Predictor.java:2026: warning: Source file for
class `com.polytechnik.utils' is newer than its matching class file. Source
file used instead
gcj: Internal error: Segmentation fault (program jc1)
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.


gdb /usr/lib/gcc-lib/i386-redhat-linux/2.96/jc1
GNU gdb 5.0
Copyright 2000 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 "i386-redhat-linux"...
(no debugging symbols found)...
(gdb) run com/polytechnik/predictor/Predictor.java
-fno-use-divide-subroutine -fasynchronous-exceptions -quiet -dumpbase
Predictor.java -g1 -version 
Starting program: /usr/lib/gcc-lib/i386-redhat-linux/2.96/jc1
com/polytechnik/predictor/Predictor.java -fno-use-divide-subroutine
-fasynchronous-exceptions -quiet -dumpbase Predictor.java -g1 -version
GNU Java version 2.96 20000724 (experimental) (i386-redhat-linux) compiled
by GNU C version 2.96 20000724 (experimental).
com/polytechnik/predictor/Predictor.java:2026: warning: Source file for
class `com.polytechnik.utils' is newer than its matching class file. Source
file used instead

I do not put java source code here 
(the program is pretty big, the source code 
is available upon request),
this is just gdb backtrace.

Program received signal SIGSEGV, Segmentation fault.
0x8056bc1 in strcpy () at ../sysdeps/generic/strcpy.c:31
31	../sysdeps/generic/strcpy.c: No such file or directory.
(gdb) bt
#0  0x8056bc1 in strcpy () at ../sysdeps/generic/strcpy.c:31
#1  0x805c591 in strcpy () at ../sysdeps/generic/strcpy.c:31
#2  0x805a13f in strcpy () at ../sysdeps/generic/strcpy.c:31
#3  0x80597be in strcpy () at ../sysdeps/generic/strcpy.c:31
#4  0x8059740 in strcpy () at ../sysdeps/generic/strcpy.c:31
#5  0x805ce2a in strcpy () at ../sysdeps/generic/strcpy.c:31
#6  0x805c591 in strcpy () at ../sysdeps/generic/strcpy.c:31
#7  0x805ceff in strcpy () at ../sysdeps/generic/strcpy.c:31
#8  0x805c591 in strcpy () at ../sysdeps/generic/strcpy.c:31
#9  0x805d1fc in strcpy () at ../sysdeps/generic/strcpy.c:31
#10 0x805c591 in strcpy () at ../sysdeps/generic/strcpy.c:31
#11 0x805ce7b in strcpy () at ../sysdeps/generic/strcpy.c:31
#12 0x805c591 in strcpy () at ../sysdeps/generic/strcpy.c:31
#13 0x805c74c in strcpy () at ../sysdeps/generic/strcpy.c:31
#14 0x805c591 in strcpy () at ../sysdeps/generic/strcpy.c:31
#15 0x8057e6c in strcpy () at ../sysdeps/generic/strcpy.c:31
#16 0x8057b27 in strcpy () at ../sysdeps/generic/strcpy.c:31
#17 0x80579e6 in strcpy () at ../sysdeps/generic/strcpy.c:31
#18 0x8057998 in strcpy () at ../sysdeps/generic/strcpy.c:31
#19 0x80591a9 in strcpy () at ../sysdeps/generic/strcpy.c:31
#20 0x807942c in strcpy () at ../sysdeps/generic/strcpy.c:31
#21 0x808422c in error ()
#22 0x8087f0e in error ()
---Type <return> to continue, or q <return> to quit---
#23 0x4003b345 in __libc_start_main (main=0x80878a0 <error+18992>, argc=9, 
    ubp_av=0xbffff9e4, init=0x8049374, fini=0x824716c <__umoddi3+572>, 
    rtld_fini=0x4000de14 <_dl_fini>, stack_end=0xbffff9dc)
    at ../sysdeps/generic/libc-start.c:111
(gdb)  
many up commands
#21 0x808422c in error ()
(gdb) list
26	in ../sysdeps/generic/strcpy.c

 up
#23 0x4003b345 in __libc_start_main (main=0x80878a0 <error+18992>, argc=9, 
    ubp_av=0xbffff9e4, init=0x8049374, fini=0x824716c <__umoddi3+572>, 
    rtld_fini=0x4000de14 <_dl_fini>, stack_end=0xbffff9dc)
    at ../sysdeps/generic/libc-start.c:111
111	../sysdeps/generic/libc-start.c: No such file or directory.
(gdb) list
106	in ../sysdeps/generic/libc-start.c
Comment 1 mal 2000-08-21 10:02:55 EDT
rpm -q gcc-java
gcc-java-2.96-53

still segfaults on this program,  but now it prints some error messages
and then segfaults.

gcj -c com/polytechnik/predictor/Predictor.java
com/polytechnik/predictor/Predictor.java: In class
`com.polytechnik.predictor.Predictor':
com/polytechnik/predictor/Predictor.java: In method
`processOneConsequent(int)':com/polytechnik/predictor/Predictor.java:210:
Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

code around line 210:

    private final AllFormulas processOneConsequent(final int consequent_number)
    {

210:      final int [][] tp=getAllTimepointsWhichMayContribute(
          this.data.p_pointToPredict,
          this.data.p_indStart,
          this.data.p_indEnd,
          this.data.consequent[consequent_number].predicateData);
      this.timepointstocontribute=tp[0];
      this.gp_newbasis=tp[1];
      this.nCovered=0;
      this.frequencies=new int
[this.data.consequent[consequent_number].nValues];

gdb /usr/lib/gcc-lib/i386-redhat-linux/2.96/jc1
GNU gdb 5.0
Copyright 2000 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 "i386-redhat-linux"...
(no debugging symbols found)...
(gdb) run com/polytechnik/predictor/Predictor.java -fno-use-divide-subroutine
-fasynchronous-exceptions -quiet -dumpbase Predictor.java -g1 -version -o
/tmp/ccCApRds.dd
Starting program: /usr/lib/gcc-lib/i386-redhat-linux/2.96/jc1
com/polytechnik/predictor/Predictor.java -fno-use-divide-subroutine
-fasynchronous-exceptions -quiet -dumpbase Predictor.java -g1 -version -o
/tmp/ccCApRds.dd
GNU Java version 2.96 20000731 (experimental) (i386-redhat-linux) compiled by
GNU C version 2.96 20000731 (experimental).

Program received signal SIGSEGV, Segmentation fault.
0x8056d11 in strcpy () at ../sysdeps/generic/strcpy.c:31
31	../sysdeps/generic/strcpy.c: No such file or directory.
(gdb) bt
#0  0x8056d11 in strcpy () at ../sysdeps/generic/strcpy.c:31
#1  0x805c701 in strcpy () at ../sysdeps/generic/strcpy.c:31
#2  0x805a2cf in strcpy () at ../sysdeps/generic/strcpy.c:31
#3  0x805993e in strcpy () at ../sysdeps/generic/strcpy.c:31
#4  0x80598c0 in strcpy () at ../sysdeps/generic/strcpy.c:31
#5  0x805cf9a in strcpy () at ../sysdeps/generic/strcpy.c:31
#6  0x805c701 in strcpy () at ../sysdeps/generic/strcpy.c:31
#7  0x805d81c in strcpy () at ../sysdeps/generic/strcpy.c:31
#8  0x805d15d in strcpy () at ../sysdeps/generic/strcpy.c:31
#9  0x805c701 in strcpy () at ../sysdeps/generic/strcpy.c:31
#10 0x805d36c in strcpy () at ../sysdeps/generic/strcpy.c:31
#11 0x805c701 in strcpy () at ../sysdeps/generic/strcpy.c:31
#12 0x805cfeb instrcpy () at ../sysdeps/generic/strcpy.c:31
#13 0x805c701 in strcpy () at ../sysdeps/generic/strcpy.c:31
#14 0x805c8bc in strcpy () at ../sysdeps/generic/strcpy.c:31
#15 0x805c701 in strcpy () at ../sysdeps/generic/strcpy.c:31
#16 0x8057fec in strcpy () at ../sysdeps/generic/strcpy.c:31
#17 0x8057ca7 in strcpy () at ../sysdeps/generic/strcpy.c:31
#18 0x8057b66 in strcpy () at ../sysdeps/generic/strcpy.c:31
#19 0x8057b18 in strcpy () at ../sysdeps/generic/strcpy.c:31
#20 0x8059329 in strcpy () at ../sysdeps/generic/strcpy.c:31
#21 0x807960c in strcpy () at ../sysdeps/generic/strcpy.c:31
#22 0x808442c in error ()
---Type <return> to continue, or q <return> to quit---
#23 0x808813e in error ()
#24 0x4003b345 in __libc_start_main (main=0x8087aa0 <error+19008>, argc=11, 
    ubp_av=0xbffffa74, init=0x804939c, fini=0x8261edc <__umoddi3+572>, 
    rtld_fini=0x4000de14 <_dl_fini>, stack_end=0xbffffa6c)
    at ../sysdeps/generic/libc-start.c:111
(gdb) 
Comment 2 mal 2000-08-21 10:24:30 EDT
This is with non-stripped jc1:

gdb /usr/lib/gcc-lib/i386-redhat-linux/2.96/jc1
GNU gdb 5.0
Copyright 2000 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 "i386-redhat-linux"...
(gdb) run com/polytechnik/predictor/Predictor.java -fno-use-divide-subroutine
-fasynchronous-exceptions -quiet -dumpbase Predictor.java -g1 -version -o
/tmp/ccEMXQh2.sr
Starting program: /usr/lib/gcc-lib/i386-redhat-linux/2.96/jc1
com/polytechnik/predictor/Predictor.java -fno-use-divide-subroutine
-fasynchronous-exceptions -quiet -dumpbase Predictor.java -g1 -version -o
/tmp/ccEMXQh2.sr
GNU Java version 2.96 20000731 (experimental) (i386-redhat-linux) compiled by
GNU C version 2.96 20000731 (experimental).

Program received signal SIGSEGV, Segmentation fault.
0x805d05b in resolve_package (pkg=0x83a6d24, next=0xbfffec04)
    at ../../../gcc/java/parse.y:6713
6713	../../../gcc/java/parse.y: No such file or directory.
(gdb) bt
#0  0x805d05b in resolve_package (pkg=0x83a6d24, next=0xbfffec04)
    at ../../../gcc/java/parse.y:6713
#1  0x8061bfe in resolve_qualified_expression_name (wfl=0x83a6d24, 
    found_decl=0xbfffec6c, where_found=0xbfffec68, type_found=0xbfffec64)
    at ../../../gcc/java/parse.y:9106
#2  0x8060da5 in resolve_field_access (qual_wfl=0x83a6d24, field_decl=0x0, 
    field_type=0x0) at ../../../gcc/java/parse.y:8768
#3  0x8060d25 in resolve_expression_name (id=0x83a6d24, orig=0x0)
    at ../../../gcc/java/parse.y:8733
#4  0x80661b7 in java_complete_lhs (node=0x83a6d24)
    at ../../../gcc/java/parse.y:11110
#5  0x80651cd in java_complete_tree (node=0x83a6d24)
    at ../../../gcc/java/parse.y:10730
#6  0x8067110 in complete_function_arguments (node=0x83a6d7c)
    at ../../../gcc/java/parse.y:11509
#7  0x80664cf in java_complete_lhs (node=0x83a6d7c)
    at ../../../gcc/java/parse.y:11200
#8  0x80651cd in java_complete_tree (node=0x83a6d7c)
    at ../../../gcc/java/parse.y:10730
#9  0x806685a in java_complete_lhs (node=0x83a6d98)
    at ../../../gcc/java/parse.y:11290
#10 0x80651cd in java_complete_tree (node=0x83a6d98)
    at ../../../gcc/java/parse.y:10730
---Type <return> to continue, or q <return> to quit---
#11 0x8066234 in java_complete_lhs (node=0x83a6e2c)
    at ../../../gcc/java/parse.y:11127
#12 0x80651cd in java_complete_tree (node=0x83a6e2c)
    at ../../../gcc/java/parse.y:10730
#13 0x806549c in java_complete_lhs (node=0x83a686c)
    at ../../../gcc/java/parse.y:10835
#14 0x80651cd in java_complete_tree (node=0x83a686c)
    at ../../../gcc/java/parse.y:10730
#15 0x805e9f3 in java_complete_expand_method (mdecl=0x83a6680)
    at ../../../gcc/java/parse.y:7628
#16 0x805e520 in java_complete_expand_methods (class_decl=0x839b2f4)
    at ../../../gcc/java/parse.y:7448
#17 0x805e383 in java_complete_expand_class (outer=0x839b2f4)
    at ../../../gcc/java/parse.y:7375
#18 0x805e322 in java_complete_expand_classes ()
    at ../../../gcc/java/parse.y:7353
#19 0x806058c in java_expand_classes () at ../../../gcc/java/parse.y:8483
#20 0x808f73d in yyparse () at ../../../gcc/java/jcf-parse.c:911
#21 0x809db2c in compile_file (
    name=0xbffffbb5 "com/polytechnik/predictor/Predictor.java")
    at ../../gcc/toplev.c:2296
#22 0x80a2a95 in main (argc=11, argv=0xbffffa74) at ../../gcc/toplev.c:4759
#23 0x4003b345 in __libc_start_main (main=0x80a22e4 <main>, argc=11, 
---Type <return> to continue, or q <return> to quit---
    ubp_av=0xbffffa74, init=0x80494a8 <_init>, fini=0x82dd00c <_fini>, 
    rtld_fini=0x4000de14 <_dl_fini>, stack_end=0xbffffa6c)
    at ../sysdeps/generic/libc-start.c:111
(gdb) 
Comment 3 Alan Cox 2002-12-14 20:04:57 EST
Does this still occur with gcc/gcj 3.x ?
Comment 4 Richard Henderson 2004-10-01 17:35:17 EDT
No test case or pointer to source, and PR is over 4 years old so 
I don't believe NEEDINFO is helpful.

Note You need to log in before you can comment on or make changes to this bug.