harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Pavlenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4867) [drlvm][gc] System.runFinalization() returns before finishing finalization
Date Thu, 27 Sep 2007 10:15:50 GMT
[drlvm][gc] System.runFinalization() returns before finishing finalization

                 Key: HARMONY-4867
                 URL: https://issues.apache.org/jira/browse/HARMONY-4867
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Andrey Pavlenko

I'm not sure if it's a bug or incorrect test, but it causes an intermittent failure of the
functional test functional.org.apache.harmony.test.func.reg.vm.btest6572. As I can see GC
invokes the method Finalizator.finalize(), but it returns control before the method is finished.
See the following reproducer:

public class Test {

	public static void main(String[] args) throws Exception {
		new Finalizator();

		synchronized (Finalizator.LockObj) {
			if (Finalizator.finalized) {
			} else {
				System.out.println("FAILED: " + Finalizator.b);

	static class Finalizator {
		static Object LockObj = new Object();
		static boolean finalized = false;
		static boolean b;

		protected void finalize() throws Throwable {
			b = true;
			synchronized (LockObj) {
				finalized = true;

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message