This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

libgcj/2431: static initializers



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


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