public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/1293: gcj -c breaks class initialization
@ 2000-12-20 12:24 osk
  0 siblings, 0 replies; only message in thread
From: osk @ 2000-12-20 12:24 UTC (permalink / raw)
  To: java-gnats

>Number:         1293
>Category:       java
>Synopsis:       gcj -c breaks class initialization
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:18:46 PST 2000
>Closed-Date:    Thu Jul 06 17:48:51 PDT 2000
>Last-Modified:  Thu Jul  6 17:49:59 PDT 2000
>Originator:     Oskar Liljeblad
>Release:        unknown-1.0
>Organization:
>Environment:
Debian GNU/Linux
GNU libc 2.1.3
gcc 2.96 snapshot 20000612
libgcj snapshot 2000-06-18
>Description:
Subject: gcj -c breaks class initialization

Classes with static initialization compiled with 'gcj -c' aren't
generated correctly. For example:

$ cat >Test.java
class Test {
  static { }
  public static void main(String[] args) { }
}
$ gcj -C Test.java
$ gcj -c Test.class
Test.java: In class `Test':
Test.java: In method `<clinit>()':
Test.java:0: verification error at PC=0
Test.java:0: PC not at instruction start
$ java Test
SIGSEGV received at bffff448 in /usr/local/jdk-1.1.8-ibm/lib/linux/native_threads/libjava.so. Processing terminated
Writing stack trace to javacore25284.txt ... OK
Segmentation fault
$

Oskar Liljeblad (osk@hem.passagen.se)
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR gcj/272

State-Changed-From-To: open->feedback
State-Changed-By: apbianco
State-Changed-When: Sat Jul  1 22:19:32 2000
State-Changed-Why:
    I posted a patch.

From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: osk@hem.passagen.se
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/272: gcj -c breaks class initialization
Date: Sat, 1 Jul 2000 22:18:45 -0700 (PDT)

 osk@hem.passagen.se writes:
 
 > Test.java: In method `<clinit>()':
 > Test.java:0: verification error at PC=0
 > Test.java:0: PC not at instruction start
 
 This is a regression because of a modification made to fix a problem
 unraveled by ENABLE_TREE_CHECKING:
 
   http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00737.html
 
 Here's a fix.
 
 ./A
 
 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
         debugable statement with empty_stmt_node.
 
 Index: parse.y
 ===================================================================
 RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
 retrieving revision 1.188
 diff -u -p -r1.188 parse.y
 --- parse.y     2000/06/30 02:22:15     1.188
 +++ parse.y     2000/07/02 05:06:26
 @@ -7461,7 +7461,7 @@ maybe_generate_pre_expand_clinit (class_
        /* We build the assignment expression that will initialize the
          field to its value. There are strict rules on static
          initializers (8.5). FIXME */
 -      if (TREE_CODE (stmt) != BLOCK)
 +      if (TREE_CODE (stmt) != BLOCK && stmt != empty_stmt_node)
         stmt = build_debugable_stmt (EXPR_WFL_LINECOL (stmt), stmt);
        java_method_add_stmt (mdecl, stmt);
      }
 

From: apbianco@cygnus.com
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, osk@hem.passagen.se
Cc:  
Subject: Re: gcj/272
Date: 2 Jul 2000 05:19:32 -0000

 Synopsis: gcj -c breaks class initialization
 
 State-Changed-From-To: open->feedback
 State-Changed-By: apbianco
 State-Changed-When: Sat Jul  1 22:19:32 2000
 State-Changed-Why:
     I posted a patch.
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=272&database=java
State-Changed-From-To: feedback->closed
State-Changed-By: apbianco
State-Changed-When: Thu Jul  6 17:48:51 2000
State-Changed-Why:
    I checked in the following patch:
    
      http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00179.html

From: apbianco@cygnus.com
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, osk@hem.passagen.se
Cc:  
Subject: Re: gcj/272
Date: 7 Jul 2000 00:48:51 -0000

 Synopsis: gcj -c breaks class initialization
 
 State-Changed-From-To: feedback->closed
 State-Changed-By: apbianco
 State-Changed-When: Thu Jul  6 17:48:51 2000
 State-Changed-Why:
     I checked in the following patch:
     
       http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00179.html
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=272&database=java
>Unformatted:



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-20 12:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:24 java/1293: gcj -c breaks class initialization osk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).