Bug 31719

Summary: gcj crashes compiling simple .class file output by Rhino js->.class compiler
Product: gcc Reporter: Bill Trost <billt>
Component: javaAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED WONTFIX    
Severity: normal CC: gcc-bugs, java-prs
Priority: P3    
Version: 4.1.1   
Target Milestone: ---   
Host: powerpc-unknown-linux-gnu Target: powerpc-unknown-linux-gnu
Build: powerpc-unknown-linux-gnu Known to work:
Known to fail: Last reconfirmed: 2007-04-27 17:45:00

Description Bill Trost 2007-04-26 22:49:31 UTC
I'm trying to compile a .class file generated from the following Javascript program using Rhino 1_6R5 (Mozilla's Javascript compiler):

  print("Hello, world");

When I do so from within Rhino's src/ directory (so that gcj can find the Rhino java files to satisfy dependencies), I get a simple error:

  jc1: internal compiler error: Segmentation fault
  Please submit a full bug report,...

"uname -a" says:
  Linux cpxa03b 2.4.25-rm02.mcp820 #17 Wed Sep 14 09:20:59 PDT 2005 ppc unknown

I can attach a .class file if that would be useful.

Bill Trost
btrost@motorola.com
Comment 1 Tom Tromey 2007-04-26 22:52:24 UTC
Yes, please attach the .class file.
Thanks.
Comment 2 btrost@motorola.com 2007-04-26 23:20:02 UTC
Subject: RE:  gcj crashes compiling simple .class file output by Rhino js->.class compiler

Uh....


GCC Bugzilla has suffered an internal error. Please save this page and send it to dberlin@gcc.gnu.org with details of what you were doing at the time this message appeared.

URL: http://gcc.gnu.org/bugzilla/attachment.cgi
undef error - Undefined subroutine Fh::slice at data/template/template/en/default/global/hidden-fields.html.tmpl line 58



From: tromey at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org]
Sent: Thursday, April 26, 2007 2:52 PM


Yes, please attach the .class file.
Thanks.
Comment 3 Tom Tromey 2007-04-27 00:08:58 UTC
Sorry about that.  I forwarded it to our bugzilla maintainer.

Can you email me the class file instead?
Thanks.
Comment 4 Tom Tromey 2007-04-27 17:44:59 UTC
Dan Berlin said if you log in first you should be able to attach things.

I downloaded rhino 1_6r5 from: http://www.mozilla.org/rhino/download.html
Then I tried the .class you sent me.  I tried with gcj 4.1 (from the 4.1
branch), the FC6 gcj, and svn trunk.  All worked.  I did this:

gcj -c -I rhino1_6R5/js.jar lame.class


I did get an ICE when running from rhino1_6R5/src:

opsy. gcj -c ../../lame.class 
./org/mozilla/javascript/Context.java:565: warning: The class ‘org.mozilla.javascript.ContextListener’ has been deprecated.
    public static void addContextListener(ContextListener listener)
                                             ^
./org/mozilla/javascript/Context.java:594: warning: The class ‘org.mozilla.javascript.ContextListener’ has been deprecated.
    public static void removeContextListener(ContextListener listener)
                                                ^
jc1: internal compiler error: Segmentation fault

... but it is really better to use the -I method from the first example,
especially since trunk can't readily compile class files whose dependencies
only exist as .java files.

ICEing here is still bad of course.  We should emit a sensible error and
exit cleanly instead.
Comment 5 Andrew Pinski 2016-09-30 22:51:35 UTC
Closing as won't fix as the Java front-end has been removed from the trunk.