public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/1188: Java executables can abort trying to access a null pointer in a leaf function
@ 2000-12-20 12:22 bryce
  0 siblings, 0 replies; only message in thread
From: bryce @ 2000-12-20 12:22 UTC (permalink / raw)
  To: java-gnats

>Number:         1188
>Category:       java
>Synopsis:       Java executables can abort trying to access a null pointer in a leaf function
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tromey
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:17:18 PST 2000
>Closed-Date:    Mon Jun 05 22:19:52 PDT 2000
>Last-Modified:  Mon Jun  5 22:20:00 PDT 2000
>Originator:     Bryce McKinlay
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
Recent versions of the compiler optimize out exception 
handling data for leaf functions, assuming that an exception
can never be thrown. However, this is not true for Java
where we map SEGV and SIGFPE into exceptions.
Even with the PR gcj/2 fix applied, the following test 
case will fail.
>How-To-Repeat:
Try to run this:

public class NullPointer
{
  private int i = 5;
  
  public static void main(String[] args)
  {
    try
    {
      new NullPointer().foo(null);
    }
    catch (NullPointerException x)
    {
      System.out.println(x);
    }
  }
  
  void foo(NullPointer e)
  {
    e.i += 4;
  };
}
>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR gcj/218


From: bryce@sourceware.cygnus.com
To: java-gnats@sourceware.cygnus.com
Cc:  
Subject: gcj/218
Date: 28 Apr 2000 07:42:27 -0000

 CVSROOT:	/cvs/java
 Module name:	libgcj
 Changes by:	bryce@sourceware.cygnus.com	00/04/28 00:42:27
 
 Modified files:
 	libjava/testsuite: ChangeLog 
 Added files:
 	libjava/testsuite/libjava.lang: PR218.java PR218.out 
 
 Log message:
 	2000-04-28  Bryce McKinlay  <bryce@albatross.co.nz>
 	
 	Test for PR gcj/218:
 	* libjava.lang/PR218.java: New file.
 	* libjava.lang/PR218.out: New file.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/gcc/libjava/testsuite/ChangeLog.diff?cvsroot=java&r1=1.87&r2=1.88
 http://gcc.gnu.org/cgi-bin/gcc/libjava/testsuite/libjava.lang/PR218.java.diff?cvsroot=java&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/gcc/libjava/testsuite/libjava.lang/PR218.out.diff?cvsroot=java&r1=NONE&r2=1.1
 
Responsible-Changed-From-To: apbianco->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Fri Apr 28 09:12:42 2000
Responsible-Changed-Why:
    I fixed it.
State-Changed-From-To: open->feedback
State-Changed-By: tromey
State-Changed-When: Fri Apr 28 09:12:42 2000
State-Changed-Why:
    I checked in a fix for this.
    Can you give it a try & get back to me?

From: tromey@sourceware.cygnus.com
To: java-gnats@sourceware.cygnus.com
Cc:  
Subject: gcj/218
Date: 28 Apr 2000 16:11:57 -0000

 CVSROOT:	/cvs/java
 Module name:	libgcj
 Changes by:	tromey@sourceware.cygnus.com	00/04/28 09:11:57
 
 Modified files:
 	libjava        : ChangeLog libgcj.spec.in 
 
 Log message:
 	* libgcj.spec.in (*jc1): Added -fasynchronous-exceptions.
 	Fix for PR gcj/218.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/gcc/libjava/ChangeLog.diff?cvsroot=java&r1=1.362&r2=1.363
 http://gcc.gnu.org/cgi-bin/gcc/libjava/libgcj.spec.in.diff?cvsroot=java&r1=1.8&r2=1.9
 

From: tromey@cygnus.com
To: apbianco@cygnus.com, bryce@albatross.co.nz,
  java-gnats@sourceware.cygnus.com, tromey@cygnus.com
Cc:  
Subject: Re: gcj/218
Date: 28 Apr 2000 16:12:42 -0000

 Synopsis: Java executables can abort trying to access a null pointer in a leaf function
 
 Responsible-Changed-From-To: apbianco->tromey
 Responsible-Changed-By: tromey
 Responsible-Changed-When: Fri Apr 28 09:12:42 2000
 Responsible-Changed-Why:
     I fixed it.
 State-Changed-From-To: open->feedback
 State-Changed-By: tromey
 State-Changed-When: Fri Apr 28 09:12:42 2000
 State-Changed-Why:
     I checked in a fix for this.
     Can you give it a try & get back to me?
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=218&database=java
State-Changed-From-To: feedback->closed
State-Changed-By: bryce
State-Changed-When: Mon Jun  5 22:19:52 2000
State-Changed-Why:
    The fix is working fine.

From: bryce@albatross.co.nz
To: bryce@albatross.co.nz, java-gnats@sourceware.cygnus.com, tromey@cygnus.com
Cc:  
Subject: Re: gcj/218
Date: 6 Jun 2000 05:19:52 -0000

 Synopsis: Java executables can abort trying to access a null pointer in a leaf function
 
 State-Changed-From-To: feedback->closed
 State-Changed-By: bryce
 State-Changed-When: Mon Jun  5 22:19:52 2000
 State-Changed-Why:
     The fix is working fine.
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=218&database=java
>Unformatted:



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

only message in thread, other threads:[~2000-12-20 12:22 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:22 java/1188: Java executables can abort trying to access a null pointer in a leaf function bryce

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).