public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/20338] New: Program compiled with gcj crashes when accessing private static method from nested class
@ 2005-03-06 19:50 zbigniew at chyla dot homeip dot net
  2005-03-06 19:50 ` [Bug java/20338] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: zbigniew at chyla dot homeip dot net @ 2005-03-06 19:50 UTC (permalink / raw)
  To: java-prs

Here's very simple example of class that compiles fine but crashes during
execution. It has something to do with "private" modifier in method of nested
class - after removing "private" the problem disappears.

$ cat Outer.java
public class Outer {
    public static void main(String[] args) {
        Nested.test();
    }

    static class Nested {
        private static void test() {
            System.out.println("test");
        }
    }
}
$ gcj-4.0 -o outer --main=Outer Outer.java
$ ./outer
Exception in thread "main" java.lang.NullPointerException
   at gnu.gcj.convert.Output_8859_1.write(java.lang.String, int, int, char[])
(/usr/lib/libgcj.so.6.0.0)
   at java.io.PrintStream.writeChars(java.lang.String, int, int)
(/usr/lib/libgcj.so.6.0.0)
   at java.io.PrintStream.print(java.lang.String, boolean)
(/usr/lib/libgcj.so.6.0.0)
   at java.io.PrintStream.println(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
   at Outer$Nested.test() (Unknown Source)
   at Outer.main(java.lang.String[]) (Unknown Source)

-- 
           Summary: Program compiled with gcj crashes when accessing private
                    static method from nested class
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zbigniew at chyla dot homeip dot net
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20338


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-10-05 19:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-20338-10222@http.gcc.gnu.org/bugzilla/>
2005-10-05 19:35 ` [Bug java/20338] Program compiled with gcj crashes when accessing private static method from nested class cvs-commit at gcc dot gnu dot org
2005-10-05 19:40 ` pinskia at gcc dot gnu dot org
2005-03-06 19:50 [Bug java/20338] New: " zbigniew at chyla dot homeip dot net
2005-03-06 19:50 ` [Bug java/20338] " pinskia at gcc dot gnu dot org
2005-03-09 14:51 ` rmathew at gcc dot gnu dot org
2005-03-09 17:48 ` rmathew at gcc dot gnu dot org
2005-03-09 18:52 ` mckinlay at redhat dot com
2005-03-09 21:21 ` cvs-commit at gcc dot gnu dot org
2005-03-10 13:10 ` rmathew at gcc dot gnu dot org
2005-03-10 13:30 ` mckinlay at redhat dot com
2005-03-10 18:40 ` rmathew at gcc dot gnu dot org

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