This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCJ: Trouble with static initialization
- From: Anthony Green <green at redhat dot com>
- To: "Craig A. Vanderborgh" <craigv at voxware dot com>
- Cc: java at gcc dot gnu dot org
- Date: 15 Jul 2003 05:19:07 -0700
- Subject: Re: GCJ: Trouble with static initialization
- Organization: Red Hat, Inc.
- References: <1058229682.1102.162.camel@zetar>
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.