JDK-4111593 : class finalizer called on unconstructed object
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 1998-02-11
  • Updated: 1998-02-11
  • Resolved: 1998-02-11
Related Reports
Duplicate :  
Relates :  
Description
The finalize() method is invoked on an instance for which the constructor has not been invoked.  (The reason the constructor hasn't been invoked is probably because an OutOfMemory condition caused an exception to be thrown by the memory allocator).  This is non-intuitive for the programmer and probably inconsistent with the language spec.

This is a side-effect observed with the test cases provided for Bug 4109815.

Jar files are attached along with a script jb.sh to run the programs that provoke the problem.