This is the mail archive of the java-prs@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcj/184: Some null pointer method invocations cause SIGABRT



>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:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]