public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Olivier Jolly <olivier.jolly@pcedev.com>
To: Jeroen Frijters <jeroen@sumatra.nl>
Cc: mauve-discuss@sources.redhat.com,
	  Mauve Patch List <mauve-patches@sources.redhat.com>
Subject: Re: runFinalization in Classloader.initialize doesn't run on cacao
Date: Sat, 11 Mar 2006 21:26:00 -0000	[thread overview]
Message-ID: <44134075.80902@pcedev.com> (raw)
In-Reply-To: <D92197D0A6547B44A1567814F851FA681805C9@LEMBU.sumatrasoftware.com>

Jeroen Frijters a écrit :

>Olivier Jolly wrote:
>  
>
>>  while wandering around with Classloaders, I found that the teslet
>>gnu.testlet.java.lang.Classloader.initialize wasn't running 
>>with Cacao.
>>It seems that in the beginning of the test method, it creates an
>>anonymous Classloader and then call System.gc() and
>>System.runFinalization() and expects the finalizer to be ran to set a
>>singleton like variable holder.
>>  While this is ok in jamvm and sun jre 1.5.0, cacao doesn't run the
>>finalizer since runFinalization only gives a hint and not a mandatory
>>order, so it is compliant.
>>  My question is whether I'm missing something and this way of doing
>>brings something in this test or it could be rewritten in a 
>>simpler way, more compliant with the various jvm.
>>    
>>
>
>I'm obviously not aware of an easier (or more robust) way to do this, or
>I would have used it. However, this is a very important test (from a
>security pov), so it has to be in. If Cacao can't or won't support
>System.runFinalization(), I suggest skipping this test.
>
>  
>
Ok, I feared something like this. However, the way this test is written
seems very obscure (to me at least). Could you advise me why is the
class loader created with an exception thrown in the constructor and
then the reference to the semi-created instance  is retrieved in the
finalizer. And then I wonder why it then raises SecurityException
instead of ClassFormatError. I reread about the finalizer semantic and
the ClassLoader api without finding a clue.
Thanks a lot in advance

>Regards,
>Jeroen
>
>  
>
Olivier

  reply	other threads:[~2006-03-11 21:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-11 19:07 Jeroen Frijters
2006-03-11 21:26 ` Olivier Jolly [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-03-11 21:58 Jeroen Frijters
2006-03-11 22:18 ` Olivier Jolly
2006-03-11 18:50 Olivier Jolly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44134075.80902@pcedev.com \
    --to=olivier.jolly@pcedev.com \
    --cc=jeroen@sumatra.nl \
    --cc=mauve-discuss@sources.redhat.com \
    --cc=mauve-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).