harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4867) [drlvm][gc] System.runFinalization() returns before finishing finalization
Date Wed, 07 Nov 2007 08:37:50 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540700
] 

Xiao-Feng Li commented on HARMONY-4867:
---------------------------------------

Yes. Please close it as invalid. RI has intermittent failures as well actually. 

> [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
>            Assignee: Xiao-Feng Li
>
> 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();
> 		System.gc();
> 		System.runFinalization();
> 		synchronized (Finalizator.LockObj) {
> 			if (Finalizator.finalized) {
> 				System.out.println("PASSED");
> 			} 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;
> 			System.runFinalization();
> 			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.


Mime
View raw message