Pavel Afremov wrote: > gc.Finalizer and gc PhantomReferenceQueueTest are synthetic test. And can't > be called "normal" (do code review, if you doubt, please). But this test > isn't source of the circularity error. The error can happen for usual > application too. The CL an SM tests just show that source of fake > circularity error exists. It's it.
I reserve my right to have a different opinion on this topic. > I think, this fake error can happen in usual applications. But it can be > masked here or be covered by other issues... I think that running java from vm_hint_finalize() provides a way for spurious ClassCircularityError to affect many applications, and I consider recursion in class loader as highly unlikely to encounter in real application. Accordingly, I think that fixing vm_hint_finalize() will fix most applications without introducing complexities of lazy class resolution in JIT. I would like to request for comments on a possible way of getting rid of java execution from vm_hint_finalize(). The initial patch is attached to HARMONY-1952.