From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20970 invoked by alias); 6 Apr 2004 12:15:34 -0000 Mailing-List: contact mauve-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sources.redhat.com Received: (qmail 20955 invoked from network); 6 Apr 2004 12:15:28 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.189) by sources.redhat.com with SMTP; 6 Apr 2004 12:15:28 -0000 Received: from [212.227.126.155] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BApUF-0005xD-00; Tue, 06 Apr 2004 14:15:27 +0200 Received: from [212.126.196.45] (helo=aicas.com) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1BApUF-0007Hp-00; Tue, 06 Apr 2004 14:15:27 +0200 Message-ID: <40729F67.9030309@aicas.com> Date: Tue, 06 Apr 2004 12:15:00 -0000 From: =?ISO-8859-1?Q?Ingo_Pr=F6tel?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 MIME-Version: 1.0 To: mauve-discuss@sources.redhat.com, commit-classpath@gnu.org Subject: Re: Mauve patch References: <200404060330.i363UY1B018067@arch20m.dellroad.org> <20040406115205.3060@smtp.mail.ch.easynet.net> In-Reply-To: <20040406115205.3060@smtp.mail.ch.easynet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:ebd3e0372cc3ac236a2e2611be1a8528 X-SW-Source: 2004-q2/txt/msg00008.txt.bz2 Sascha Brawer wrote: > Archie Cobbs wrote on Mon, 5 Apr 2004 22:30:34 -0500: > > >>Is this the right place to send Mauve patches? If not please point me >>(or the patch) in the right direction. > > > There's a list mauve-discuss@sources.redhat.com (presumably with mostly > the same subscribers as commit-classpath@gnu.org, although there seem to > be also a few non-Classpath people there). > > >>In JC, phantom references are enqueued on the next finalizer run >>after the one that finalizes the object, and finalizer runs only >>happen after a GC cycle, therefore the patch below is required to >>make JC pass the test; ie, the test is being too strict. > > > >>Index: gnu/testlet/java/lang/ref/PhantomReference/phantom.java >>=================================================================== >>RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/ref/PhantomReference/ >>phantom.java,v >>retrieving revision 1.1 >>diff -u -r1.1 phantom.java >>--- gnu/testlet/java/lang/ref/PhantomReference/phantom.java 27 Sep >>2001 15:44:09 -0000 1.1 >>+++ gnu/testlet/java/lang/ref/PhantomReference/phantom.java 6 Apr >>2004 03:28:19 -0000 >>@@ -70,6 +70,8 @@ >> >> PhantomReference wr = try1 (q, harness); >> System.gc (); >>+ Thread.yield(); >>+ System.gc (); >> >> Reference r = null; >> try > > > Does this really guarantee that the finalizer has run? Couldn't this also > lead to any other thread, such as some VM-internal thread, without > running the finalizer? If so, you might want to call Object.notify in the > finalizer and Object.wait at the above code location. > I'm not sure a wait/notify will help. It might also just hang the VM since no garbage collection might occur. Probably the only real solution would be to force an OutOfMemoryError. Before the VM may throw such an error it has to try to clean up memory. But probably not all VMs survive such a test ;-) ingo > -- Sascha > > Sascha Brawer, brawer@dandelis.ch, http://www.dandelis.ch/people/brawer/ > > > -- Ingo Prötel proetel@aicas.com aicas GmbH http://www.aicas.com Haid-und-Neu-Str. 18 phone +49 721 663 968-32 76131 Karlsruhe fax +49 721 663 968-93 Germany