This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

Re: GCJ: Trouble with static initialization


On Mon, 2003-07-14 at 17:41, Craig A. Vanderborgh wrote:
> We need some guidance from the experts.  We are working on porting a
> large Java application to GCJ.  We have encountered an "infant death"
> problem where our application crashes in startup, due (apparently) to
> attempts to access uninitialized static class members that should
> already have been initialized.

Have you tried disabling optimization?  I encountered a similar static
initialization problem with Jetty on Linux when I enabled inlining.  I'm
going to try to generate a small test case.

> The weird thing about it is the failure is stochastic - about half the
> time the program runs to completion, the other half it fails in
> startup. 

Could this simply be because your system doesn't guarantee the value of
your uninitialized data, so, for instance, if it's a boolean it might be
correct some times?

AG

-- 
Anthony Green <green@redhat.com>
Red Hat, Inc.


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