Bug 16110 - gcj segfaults when class not found
gcj segfaults when class not found
Status: CLOSED RAWHIDE
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:29 EDT by mal
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-08-21 09:26:21 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:29:05 EDT
If a class not found gcj segfaults
instead of just giving an error message.

gcj  -c com/gromco/sql/*.java
com/gromco/sql/KeywordsInSQL.java:10: Class or interface
`com.gromco.webutils.Search' not found in import.
import com.gromco.webutils.Search;
       ^
com/gromco/sql/KeywordsInSQL.java:137: Type `Search' not found in the
declaration of the argument `addmessagesto' of method `getIN'.
				   Search addmessagesto,
                                   ^
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.

This is a gdb trace
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/gromco/sql/KeywordsInSQL.java -fno-use-divide-subroutine
-fasynchronous-exceptions -quiet -dumpbase KeywordsInSQL.java -g1 -version
-o /tmp/ccel3C6jdd.s
Starting program: /usr/lib/gcc-lib/i386-redhat-linux/2.96/jc1
com/gromco/sql/KeywordsInSQL.java -fno-use-divide-subroutine
-fasynchronous-exceptions -quiet -dumpbase KeywordsInSQL.java -g1 -version
-o /tmp/ccel3C6jdd.s
GNU Java version 2.96 20000724 (experimental) (i386-redhat-linux) compiled
by GNU C version 2.96 20000724 (experimental).
com/gromco/sql/KeywordsInSQL.java:10: Class or interface
`com.gromco.webutils.Search' not found in import.
import com.gromco.webutils.Search;
       ^
com/gromco/sql/KeywordsInSQL.java:137: Type `Search' not found in the
declaration of the argument `addmessagesto' of method `getIN'.
				   Search addmessagesto,
                                   ^

Program received signal SIGSEGV, Segmentation fault.
0x8054c0d in strcpy () at ../sysdeps/generic/strcpy.c:31
31	../sysdeps/generic/strcpy.c: No such file or directory.
(gdb) bt
#0  0x8054c0d in strcpy () at ../sysdeps/generic/strcpy.c:31
#1  0x83de2a4 in ?? ()
#2  0x8054d99 in strcpy () at ../sysdeps/generic/strcpy.c:31
#3  0x807900f in strcpy () at ../sysdeps/generic/strcpy.c:31
#4  0x8079409 in strcpy () at ../sysdeps/generic/strcpy.c:31
#5  0x808422c in error ()
#6  0x8087f0e in error ()
#7  0x4003b345 in __libc_start_main (main=0x80878a0 <error+18992>, argc=11, 
    ubp_av=0xbffff9d4, init=0x8049374, fini=0x824716c <__umoddi3+572>, 
    rtld_fini=0x4000de14 <_dl_fini>, stack_end=0xbffff9cc)
    at ../sysdeps/generic/libc-start.c:111
(gdb) where
#0  0x8054c0d in strcpy () at ../sysdeps/generic/strcpy.c:31
#1  0x83de2a4 in ?? ()
#2  0x8054d99 in strcpy () at ../sysdeps/generic/strcpy.c:31
#3  0x807900f in strcpy () at ../sysdeps/generic/strcpy.c:31
#4  0x8079409 in strcpy ()at ../sysdeps/generic/strcpy.c:31
#5  0x808422c in error ()
#6  0x8087f0e in error ()
#7  0x4003b345 in __libc_start_main (main=0x80878a0 <error+18992>, argc=11, 
    ubp_av=0xbffff9d4, init=0x8049374, fini=0x824716c <__umoddi3+572>, 
    rtld_fini=0x4000de14 <_dl_fini>, stack_end=0xbffff9cc)
    at ../sysdeps/generic/libc-start.c:111
(gdb)
Comment 1 mal 2000-08-13 16:32:19 EDT
This is a test case:
--------------------------------------
cat  Y.java
import a.b.c.d.F;
class Y {
 final a.b.c.d.F x=new a.b.c.d.F();
}
Comment 2 Jakub Jelinek 2000-08-21 03:53:58 EDT
Cannot reproduce it.
Comment 3 mal 2000-08-21 09:25:41 EDT
Fixed in gcc-java-2.96-53
============= 2.96-53
rpm -q gcc-java
gcc-java-2.96-53
[mal@eth0_extrenal tgcc]$ gcj -c Y.java 
Y.java:1: Class or interface `a.b.c.d.F' not found in import.
  import a.b.c.d.F;
         ^
Y.java:3: Type `a.b.c.d.F' not found in declaration of field `x'.
   final a.b.c.d.F x=new a.b.c.d.F();
         ^
2 errors

================== 2.96-46
rpm -q gcc-java
gcc-java-2.96-46
[john@clienthost /tmp]$ gcj -c Y.java 
Y.java:1: Class or interface `a.b.c.d.F' not found in import.
  import a.b.c.d.F;
         ^
Y.java:3: Type `a.b.c.d.F' not found in declaration of field `x'.
   final a.b.c.d.F x=new a.b.c.d.F();
         ^
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.
Comment 4 Jakub Jelinek 2000-08-21 11:44:09 EDT
I'll close it then...

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