This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
java/2605: gcj crashes on .java file containing byte.class.getClass()
- To: gcc-gnats at gcc dot gnu dot org
- Subject: java/2605: gcj crashes on .java file containing byte.class.getClass()
- From: Daniel dot Bonniot at inria dot fr
- Date: 21 Apr 2001 12:59:09 -0000
- Reply-To: Daniel dot Bonniot at inria dot fr
>Number: 2605
>Category: java
>Synopsis: gcj crashes on .java file containing byte.class.getClass()
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 21 06:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Daniel Bonniot
>Release: gcc version 3.0 20010416 (prerelease)
>Organization:
>Environment:
>Description:
gcj crashes on this legal java code.
Full output:
Reading specs from /usr/local/opt/gcc/lib/gcc-lib/i586-pc-linux-gnu/3.0/specs
Reading specs from /usr/local/opt/gcc/lib/gcc-lib/i586-pc-linux-gnu/3.0/../../../libgcj.spec
rename spec lib to liborig
rename spec startfile to startfileorig
Configured with: ../gcc/configure --enable-threads=posix --prefix=/usr/local/opt/gcc --enable-shared --enable-languages=java : (reconfigured) ../gcc/configure --enable-threads=posix --prefix=/usr/local/opt/gcc --enable-shared --enable-languages=java
gcc version 3.0 20010416 (prerelease)
/usr/local/opt/gcc/lib/gcc-lib/i586-pc-linux-gnu/3.0/jc1 GetClassBug.java -fno-use-divide-subroutine -fuse-boehm-gc -fasynchronous-exceptions -quiet -dumpbase GetClassBug.java -g1 -version -o /tmp/ccGcCDmO.s
GNU Java version 3.0 20010416 (prerelease) (i586-pc-linux-gnu)
compiled by GNU C version 3.0 20010416 (prerelease).
GetClassBug.java: In class `GetClassBug':
GetClassBug.java: In method `<clinit>()':
GetClassBug.java:7: 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.
>How-To-Repeat:
/usr/local/opt/gcc/bin/gcj -v --main=GetClassBug1 GetClassBug1.java
>Fix:
Using Byte.TYPE instead of byte.class
(comment the buggy line and uncomment the next one)
solve the compile time problem.
However at runtime a NullPointerException occurs in println,
which should not happen.
It does not with Sun tools.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="GetClassBug.java"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="GetClassBug.java"
cHVibGljIGNsYXNzIEdldENsYXNzQnVnCnsKICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJp
bmdbXSBhcmdzKQogIHsKICAgIFN5c3RlbS5vdXQucHJpbnRsbihieXRlQ2xhc3NDbGFzcyk7CiAg
fQogIHN0YXRpYyBDbGFzcyBieXRlQ2xhc3NDbGFzcyA9IGJ5dGUuY2xhc3MuZ2V0Q2xhc3MoKTsK
ICAvL3N0YXRpYyBDbGFzcyBieXRlQ2xhc3NDbGFzcyA9IEJ5dGUuVFlQRS5nZXRDbGFzcygpOwp9
Cg==