This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
libgcj/2431: static initializers
- To: gcc-gnats at gcc dot gnu dot org
- Subject: libgcj/2431: static initializers
- From: torsten dot rueger at firsthop dot com
- Date: 30 Mar 2001 08:17:54 -0000
- Reply-To: torsten dot rueger at firsthop dot com
>Number: 2431
>Category: libgcj
>Synopsis: static initializers
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 30 00:26:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: torsten.rueger@firsthop.com
>Release: gcc version 3.0 20010320 (prerelease)
>Organization:
>Environment:
Configured with: ../gcc-20010320/configure --enable-threads=posix --prefix=/tmp/local/ --enable-shared --enable-languages=c++,javaLinux inception 2.2.12-20 #1 Mon Sep 27 10:40:35 EDT 1999 i686 unknown
>Description:
I got some bizzare NullPointer Exception, something like
MyObject o = new MyObject();
o.toString(); // NULL Pointer here
Running from the command I got the nullpointer. Runniing under a debugger I got sigsuspend in the init of the first Thread. So I gave up.
Just by chance I tried removing a static initializer in MyObject, and the problem disapeared.
I mean I move d
static { someCode}
into some other init method, and now all works fine
>How-To-Repeat:
I couldn't make a small case for this.
I have 300 classes here, all gnu, that I could send, Makefile and everything included.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: