This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
gcj/184: Some null pointer method invocations cause SIGABRT
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/184: Some null pointer method invocations cause SIGABRT
- From: rolfwr at ii dot uib dot no
- Date: 28 Mar 2000 15:37:32 -0000
- Reply-To: rolfwr at ii dot uib dot no
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, rolfwr@ii.uib.no
>Number: 184
>Category: gcj
>Synopsis: Some null pointer method invocations cause SIGABRT
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 28 07:40:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Rolf W. Rasmussen <rolfwr@ii.uib.no>
>Release: gcc version 2.96 20000327 (experimental)
>Organization:
>Environment:
i586-pc-linux-gnu (Debian)
>Description:
Some methods when invoced using a null pointer, will generate
a SIGABRT, instead of the NullPointerException one would
expect.
The problem seems only to occur with simple methods such as
Integer.intValue(), String.length(), Vector.size().
>How-To-Repeat:
Compile and run
--------
public class NullPointerExceptionTest {
public static void main(String[] args) {
((Integer) null).intValue();
}
}
--------
Other one-liners that trigger the same problem:
((String) null).length();
((java.util.Vector) null).size();
Boolean ref = null; ref.booleanValue();
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: