GCJ: Trouble with static initialization

Anthony Green green@redhat.com
Tue Jul 15 12:19:00 GMT 2003


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.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /