public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/42811]  New: [4.5 regression] java.lang.ExceptionInInitializerError in ecj1
@ 2010-01-19 23:23 jojelino at gmail dot com
  2010-01-20  5:02 ` [Bug java/42811] " jojelino at gmail dot com
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: jojelino at gmail dot com @ 2010-01-19 23:23 UTC (permalink / raw)
  To: java-prs

configuration

./configure --prefix=/usr --disable-win32-registry --enable-threads=posix
--enable-languages=c,c++,java --with-win32-nlsapi=unicode --enable-tls
--disable-bootstrap --enable-shared --enable-interpreter
--disable-sjlj-exceptions --enable-load-library

testcase

public class java
{ 
  public static void main(String arg[]) 
  { 
    System.out.println("Hello World!"); 
  } 
}

debug session

Reading symbols from /usr/libexec/gcc/i686-pc-cygwin/4.5.0/ecj1.exe...done.
(gdb) set args java.java -g1 -fbootclasspath=./:/usr/share/java/libgcj-4.5.0.j
ar -g1 -fsource=1.5 -ftarget=1.5 -fzip-dependency java.zip -fzip-target java.j
ar
(gdb) directory /tmp/gcc/t/t/t/t
Warning: /tmp/gcc/t/t/t/t: No such file or directory.
Source directories searched: /tmp/gcc/t/t/t/t:$cdir:$cwd
(gdb) start
Temporary breakpoint 1 at 0x40112e: file /cygdrive/d/Temp/cache/ccnRjjtS.i,
line
 11.
Starting program: /usr/libexec/gcc/i686-pc-cygwin/4.5.0/ecj1.exe java.java -g1
-
fbootclasspath=./:/usr/share/java/libgcj-4.5.0.jar -g1 -fsource=1.5
-ftarget=1.5
 -fzip-dependency java.zip -fzip-target java.jar
[New Thread 2040.0x1020]
warning: section .gnu_debuglink not found in /usr/bin/cygwin1.dbg
[New Thread 2040.0x1338]

Temporary breakpoint 1, main (argc=<value optimized out>,
    argv=<value optimized out>) at /cygdrive/d/Temp/cache/ccnRjjtS.i:11
11      /cygdrive/d/Temp/cache/ccnRjjtS.i: No such file or directory.
        in /cygdrive/d/Temp/cache/ccnRjjtS.i
(gdb) disp /i $eip
1: x/i $eip
=> 0x40112e <main+14>:  mov    0xc(%ebp),%eax
(gdb) b Calendar.java:500
Breakpoint 2 at 0x6c1b0ed6: file
../../../.././libjava/classpath/java/util/Calen
dar.java, line 500.
(gdb) c
Continuing.
[New Thread 2040.0x119c]
[New Thread 2040.0x1704]

Breakpoint 2, java.util.Calendar.<clinit>()void ()
    at ../../../.././libjava/classpath/java/util/Calendar.java:500
500         properties = new Properties();
1: x/i $eip
=> 0x6c1b0ed6 <java.util.Calendar.<clinit>()void+6>:
    movl   $0x6c5d0fe0,(%esp)
(gdb) n
503            
properties.load(Calendar.class.getResourceAsStream("weeks.proper
ties"));
1: x/i $eip
=> 0x6c1b0eec <java.util.Calendar.<clinit>()void+28>:   mov    0x6c5d5350,%eax
(gdb) n
500         properties = new Properties();
1: x/i $eip
=> 0x6c1b0ef1 <java.util.Calendar.<clinit>()void+33>:   mov    %ebx,0x6cabc75c
(gdb) n
503            
properties.load(Calendar.class.getResourceAsStream("weeks.proper
ties"));
1: x/i $eip
=> 0x6c1b0ef7 <java.util.Calendar.<clinit>()void+39>:
    movl   $0x6c5c84e0,(%esp)
(gdb) n
Exception in thread "main" java.lang.ExceptionInInitializerError
   at java.lang.Class.initializeClass(Unknown Source)
   at java.util.Calendar.getInstance(Unknown Source)
   at java.util.zip.ZipEntry.getDOSTime(Unknown Source)
   at java.util.zip.ZipOutputStream.putNextEntry(Unknown Source)
   at
org.eclipse.jdt.internal.compiler.batch.GCCMain.getZipOutput(GCCMain.java:
110)
   at
org.eclipse.jdt.internal.compiler.batch.GCCMain.configure(GCCMain.java:459
)
   at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1628)
   at org.eclipse.jdt.internal.compiler.batch.GCCMain.compile(GCCMain.java:481)
   at org.eclipse.jdt.internal.compiler.batch.GCCMain.main(GCCMain.java:498)
Caused by: java.lang.NullPointerException
   at java.io.InputStreamReader.read(Unknown Source)
   at java.io.BufferedReader.fill(Unknown Source)
   at java.io.BufferedReader.readLine(Unknown Source)
   at java.util.Properties.load(Unknown Source)
   at java.util.Properties.load(Unknown Source)
   at java.util.Calendar.<clinit>(Unknown Source)
   at java.lang.Class.initializeClass(Unknown Source)
   ...8 more

Program exited with code 01.
(gdb)

it seems that libgcj-bc is disabled except linux (libjava/configure.host)
but SUPPRESS_LIBGCJ_BC_TRUE is enabled because it is default. and problematic
switches "-fzip-dependency java.zip -fzip-target java.jar" try to load
weeks.properties resource. then it invokes url classloader and find resource in
libgcj-.jar so results exception.

i tried to compile with --disable-libgcj-bc, but it has undefined symbol with
namespace org.xml (showing that there is no choice but to use libgcj-bc)


-- 
           Summary: [4.5 regression] java.lang.ExceptionInInitializerError
                    in ecj1
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jojelino at gmail dot com
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


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


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

end of thread, other threads:[~2010-05-12 22:51 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-19 23:23 [Bug java/42811] New: [4.5 regression] java.lang.ExceptionInInitializerError in ecj1 jojelino at gmail dot com
2010-01-20  5:02 ` [Bug java/42811] " jojelino at gmail dot com
2010-01-20 10:48 ` rguenth at gcc dot gnu dot org
2010-01-21  4:55 ` jojelino at gmail dot com
2010-01-22 23:56 ` rguenth at gcc dot gnu dot org
2010-02-04  3:38 ` davek at gcc dot gnu dot org
2010-02-05 17:44 ` davek at gcc dot gnu dot org
2010-02-20  0:40 ` davek at gcc dot gnu dot org
2010-02-27 17:50 ` davek at gcc dot gnu dot org
2010-03-20 20:02 ` davek at gcc dot gnu dot org
2010-03-20 20:21 ` rguenth at gcc dot gnu dot org
2010-03-20 20:33 ` davek at gcc dot gnu dot org
2010-03-21 19:25 ` [Bug target/42811] " davek at gcc dot gnu dot org
2010-03-21 19:34 ` davek at gcc dot gnu dot org
2010-03-21 19:37 ` davek at gcc dot gnu dot org
2010-03-21 19:41 ` davek at gcc dot gnu dot org
2010-03-21 19:42 ` davek at gcc dot gnu dot org
2010-05-06 16:21 ` davek at gcc dot gnu dot org
2010-05-10 17:01 ` ubizjak at gmail dot com
2010-05-10 20:54 ` davek at gcc dot gnu dot org
2010-05-12  9:46 ` ubizjak at gmail dot com
2010-05-12 16:48 ` davek at gcc dot gnu dot org
2010-05-12 17:39 ` ubizjak at gmail dot com
2010-05-12 17:46 ` ubizjak at gmail dot com
2010-05-12 17:50 ` ubizjak at gmail dot com
2010-05-12 22:20 ` davek at gcc dot gnu dot org
2010-05-12 22:51 ` ubizjak at gmail dot com

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