Strange test failure when referencing a class in a deprivileged module

2016-07-04 Thread Wang Weijun
This test fails: import java.security.Permission; import java.sql.SQLPermission; public class SSL extends SecurityManager { @Override public void checkPermission(Permission perm, Object context) { checkPermission(perm); } public void checkPermission(Permission perm) {

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-05 Thread Wang Weijun
> On Jul 5, 2016, at 11:53 AM, Wang Weijun wrote: > > The exception is at the end of this mail. The test passes if I change X.go() > to calling a method inside this class Update: any call that triggers a permission check will do. For example: import java.security.Permission; import java.sql.

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-05 Thread Alan Bateman
On 05/07/2016 09:22, Wang Weijun wrote: On Jul 5, 2016, at 11:53 AM, Wang Weijun wrote: The exception is at the end of this mail. The test passes if I change X.go() to calling a method inside this class Update: any call that triggers a permission check will do. For example: Yes, tricky iss

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-05 Thread Mandy Chung
> On Jul 5, 2016, at 8:11 AM, Alan Bateman wrote: > > On 05/07/2016 09:22, Wang Weijun wrote: > >>> On Jul 5, 2016, at 11:53 AM, Wang Weijun wrote: >>> >>> The exception is at the end of this mail. The test passes if I change >>> X.go() to calling a method inside this class >> Update: any ca

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-05 Thread Weijun Wang
On 7/5/2016 23:50, Mandy Chung wrote: Max - are you running the test with exploded image (see JDK-8155858 [1])? No. The test also fails with recent promoted builds (ever since java.sql is de-priveleged). --Max

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-06 Thread Alan Bateman
On 06/07/2016 05:32, Weijun Wang wrote: On 7/5/2016 23:50, Mandy Chung wrote: Max - are you running the test with exploded image (see JDK-8155858 [1])? No. The test also fails with recent promoted builds (ever since java.sql is de-priveleged). I assume this is a general issue with security

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-06 Thread Sean Mullan
On 07/06/2016 04:51 AM, Alan Bateman wrote: On 06/07/2016 05:32, Weijun Wang wrote: On 7/5/2016 23:50, Mandy Chung wrote: Max - are you running the test with exploded image (see JDK-8155858 [1])? No. The test also fails with recent promoted builds (ever since java.sql is de-priveleged). I

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-06 Thread Wang Weijun
> On Jul 7, 2016, at 5:04 AM, Sean Mullan wrote: > > Does your SSL code match up with the stack trace? The test only has 27 lines, > but the stack trace says it was called from line 42. My local SSL.java still contains the GPL comments and I didn't paste them here. Line 42 is

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-06 Thread Wang Weijun
n > Cc: jigsaw-dev ; OpenJDK > > Subject: Re: Strange test failure when referencing a class in a deprivileged > module > > > > On Jul 7, 2016, at 5:04 AM, Sean Mullan wrote: > > > > Does your SSL code match up with the stack trace? The test only has 27 >

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-06 Thread Wang Weijun
I run the program directly (not from jtreg) and the result is different: Exception in thread "main" java.lang.BootstrapMethodError: call site initialization exception at SSL.checkPermission(SSL.java:21) at java.lang.SecurityManager.checkPropertyAccess(java.base@9-ea/SecurityManag

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Wang Weijun
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 > wrote: > > Can you change the test to call checkPermission prior to setting SSL as the > system securit

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Alan Bateman
On 07/07/2016 09:27, Wang Weijun wrote: Like this? https://gist.github.com/wangweij/6992aaf9617b9e2f242ddf9e391ea5f6 The horizontal line is printed on line 706 of the gist. I assume the suggestion was to reference SQLPermission before setting the security manager. As regards module loading t

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Wang Weijun
> On Jul 7, 2016, at 4:37 PM, Alan Bateman wrote: > > On 07/07/2016 09:27, Wang Weijun wrote: > >> Like this? >> >> https://gist.github.com/wangweij/6992aaf9617b9e2f242ddf9e391ea5f6 >> >> The horizontal line is printed on line 706 of the gist. >> > I assume the suggestion was to reference SQ

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Wang Weijun
om: Wang Weijun > Sent: 07/07/2016 06:27:43 pm > To: Peter Firmstone > Cc: SeanMullan ; jigsaw-dev > ; OpenJDK > Subject: Re: Strange test failure when referencing a class in a deprivileged > module > > Like this? > > https://gist.github.com/wangweij/6992aa

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Peter Firmstone
6:27:43 pm To: Peter Firmstone Cc: SeanMullan ; jigsaw-dev ; OpenJDK 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. --

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Peter Firmstone
: SeanMullan ; jigsaw-dev ; OpenJDK Subject: Re: Strange test failure when referencing a class in a deprivileged module > On Jul 7, 2016, at 8:19 AM, Peter Firmstone   >wrote: >  > Perhaps the policy provider hasn't been refreshed when the new security  >manager is in

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Peter Firmstone
07/07/2016 09:47:09 am To: Sean Mullan Cc: jigsaw-dev ; OpenJDK Subject: Re: Strange test failure when referencing a class in a deprivileged module > On Jul 7, 2016, at 5:04 AM, Sean Mullan  wrote: >  > Does your SSL code match up with the stack trace? The test only has 27 lines, 

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Peter Firmstone
Yes, that's correct. ;) Sent from my Samsung device.     Include original message Original message From: Alan Bateman Sent: 07/07/2016 06:37:49 pm To: Wang Weijun Cc: jigsaw-dev ; OpenJDK Subject: Re: Strange test failure when referencing a class in a deprivileged module On 

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Peter Firmstone
al message From: Wang Weijun Sent: 07/07/2016 06:55:26 pm To: Peter Firmstone Cc: SeanMullan ; jigsaw-dev ; OpenJDK Subject: Re: Strange test failure when referencing a class in a deprivileged module > On Jul 7, 2016, at 4:47 PM, Peter Firmstone   >wrote: >  > Sorry, I wasn'

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Peter Firmstone
Original message From: Wang Weijun Sent: 07/07/2016 01:45:08 pm To: Peter Firmstone Cc: SeanMullan ; jigsaw-dev ; OpenJDK Subject: Re: Strange test failure when referencing a class in a deprivileged module I run the program directly (not from jtreg) and the result is different: Exception in

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-07 Thread Weijun Wang
Mystery solved or problem solved? Have you fixed it somewhere else? Thanks Max On 7/7/2016 17:00, Peter Firmstone wrote: 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 wa

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-15 Thread Peter Firmstone
jigsaw-dev ; OpenJDK Subject: Re: Strange test failure when referencing a class in a deprivileged module Mystery solved or problem solved? Have you fixed it somewhere else? Thanks Max On 7/7/2016 17:00, Peter Firmstone wrote: > Problem solved, even though it didn't occur on Java 8,

Re: Strange test failure when referencing a class in a deprivileged module

2016-07-15 Thread Peter Firmstone
Sent from my Samsung device.     Include original message Original message From: Peter Firmstone Sent: 08/07/2016 05:53:47 pm To: WeijunWang Cc: jigsaw-dev ; OpenJDK Subject: Re: Strange test failure when referencing a class in a deprivileged module Yes, I've come across this bef