Strange test failure when referencing a class in a deprivileged module

Peter Firmstone peter.firmstone at zeus.net.au
Thu Jul 7 09:00:04 UTC 2016


Problem solved, even though it didn't occur on Java 8, the potential for it to occur still exists there,  it's simply that Java 9 seems to have hit this execution path, it was a latent bug.

Cheers,

Peter.


Sent from my Samsung device.
 
  Include original message
---- Original message ----
From: Wang Weijun <weijun.wang at oracle.com>
Sent: 07/07/2016 06:55:26 pm
To: Peter Firmstone <peter.firmstone at zeus.net.au>
Cc: SeanMullan <sean.mullan at oracle.com>; jigsaw-dev <jigsaw-dev at openjdk.java.net>; OpenJDK <security-dev at openjdk.java.net>
Subject: Re: Strange test failure when referencing a class in a deprivileged module


> On Jul 7, 2016, at 4:47 PM, Peter Firmstone <peter.firmstone at zeus.net.au> wrote: 
>  
> Sorry, I wasn't clear, I meant, create a new instance of SSL, call its checkPermission method, then make that instance your system security manager. 

That would cure the test too, since it references SQLPermission when checkPermission is called. 

In another reply to Alan, I said a single "new SQLPermission("setLog");" is enough. 

--Max 

>  
> Although the check permission call will be repeated in the test, it will have run while the standard SecurityManager is in force, so the jvm won't lazy load any classes that require permission checks, during the test permission check as that will happen during the first permission check call. 
>  
> Cheers, 
>  
> Peter. 
>  
> Sent from my Samsung device. 
>   
> ---- Original message ---- 
> From: Wang Weijun <weijun.wang at oracle.com> 
> Sent: 07/07/2016 06:27:43 pm 
> To: Peter Firmstone <peter.firmstone at zeus.net.au> 
> Cc: SeanMullan <sean.mullan at oracle.com>; jigsaw-dev <jigsaw-dev at openjdk..java.net>; OpenJDK <security-dev at openjdk.java.net> 
> Subject: Re: Strange test failure when referencing a class in a deprivileged module 
>  
> Like this?  
>  
> https://gist.github.com/wangweij/6992aaf9617b9e2f242ddf9e391ea5f6  
>  
> The horizontal line is printed on line 706 of the gist.  
>  
> --Max  
>  
> > On Jul 7, 2016, at 12:57 PM, Peter Firmstone <peter.firmstone at zeus.net.au> wrote:  
> >   
> > Can you change the test to call checkPermission prior to setting SSL as the system security manager?  
> >   
> > This will just ensure that all necessary classes are loaded prior to SSL becoming the security manager.   
> >   
> > Regards,  
> >       
> > Peter.  
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20160707/82e429ac/attachment.htm>


More information about the security-dev mailing list