Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-11 Thread serguei.spit...@oracle.com
Hi Brent, The updated webrev looks good to me. At least, I do not see any issues. Thanks, Serguei On 9/5/19 17:09, Brent Christian wrote: Hi, David On 9/5/19 12:52 AM, David Holmes wrote: Good to see this all come together :) :) So to clarify for others any current caller to

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-06 Thread Mandy Chung
On 9/6/19 2:20 PM, Brent Christian wrote: Update webrev is here: http://cr.openjdk.java.net/~bchristi/8212117/webrev11/ with changes to jvm.h, MethodHandles.java, and Class.java. Looks good. Mandy

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-06 Thread Brent Christian
Hi, Mandy On 9/5/19 6:03 PM, Mandy Chung wrote: On 9/5/19 5:09 PM, Brent Christian wrote: jvm.h 349 * Link the 'arg' class (unless ClassForNameDeferLinking is set) I suggest to drop "(unless ...)" phrase because the flag is temporary. Sure, good idea. jni.cpp The implementation of

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-05 Thread Mandy Chung
On 9/5/19 5:09 PM, Brent Christian wrote: Updated webrev: http://cr.openjdk.java.net/~bchristi/8212117/webrev10/ jvm.h 349 * Link the 'arg' class (unless ClassForNameDeferLinking is set) I suggest to drop "(unless ...)" phrase because the flag is temporary. jni.cpp The implementation

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-05 Thread serguei . spitsyn
Hi Brent, Some quick reply below. On 9/5/19 5:09 PM, Brent Christian wrote: Hi, David On 9/5/19 12:52 AM, David Holmes wrote: Good to see this all come together :) :) So to clarify for others any current caller to find_class_from_class_loader that passes true for "init" was already

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-05 Thread Mandy Chung
On 9/4/19 2:12 PM, Brent Christian wrote: There is also a CSR[2] in need of review. The javadoc for Lookup::findClass: "In particular, the method first attempts to load the requested class" I think this sentence is no longer needed together with your change.  What about: /** -

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-05 Thread Brent Christian
Hi, Joe @jls tags added (and as long as we're in Class.java, I added @jls to the 3-arg Class.forName(), which has an equivalent paragraph). Updated webrev: http://cr.openjdk.java.net/~bchristi/8212117/webrev10/ Thanks, -Brent On 9/5/19 3:30 PM, Joe Darcy wrote: Hello, For the doc changes

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-05 Thread Brent Christian
Hi, David On 9/5/19 12:52 AM, David Holmes wrote: Good to see this all come together :) :) So to clarify for others any current caller to find_class_from_class_loader that passes true for "init" was already implicitly asking for a linked class (as you must be linked before you can be

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-05 Thread Joe Darcy
Hello, For the doc changes in MethodHandle, please supplement the paragraph 1937  * 1938  * Note that this method throws errors related to loading and linking as 1939  * specified in Sections 12.2 and 12.3 of The Java Language 1940  * Specification. with @jls

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-05 Thread Daniel D. Daugherty
On 9/5/19 1:36 AM, David Holmes wrote: Hi Dan, With my CSR Group member hat on On 5/09/2019 8:06 am, Daniel D. Daugherty wrote: Brent, You currently have '-XX:+ClassForNameDeferLinking' as a 'product' option, but product options are harder to remove down the road. Would it be better

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-05 Thread David Holmes
Hi Brent, Good to see this all come together :) A couple of comments below. On 5/09/2019 7:12 am, Brent Christian wrote: Hi, Please review my fix for JDK-8212117[1].  The webrev is here: http://cr.openjdk.java.net/~bchristi/8212117/webrev09/ So to clarify for others any current caller to

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-04 Thread David Holmes
Hi Dan, With my CSR Group member hat on On 5/09/2019 8:06 am, Daniel D. Daugherty wrote: Brent, You currently have '-XX:+ClassForNameDeferLinking' as a 'product' option, but product options are harder to remove down the road. Would it be better as a diagnostic option? A diagnostic

Re: RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-04 Thread Daniel D. Daugherty
Brent, You currently have '-XX:+ClassForNameDeferLinking' as a 'product' option, but product options are harder to remove down the road. Would it be better as a diagnostic option? A diagnostic option requires '-XX:+UnlockDiagnosticVMOptions' to be specified before it can be used, e.g.:    

RFR: 8212117 : Class.forName may return a reference to a loaded but not linked Class

2019-09-04 Thread Brent Christian
Hi, Please review my fix for JDK-8212117[1]. The webrev is here: http://cr.openjdk.java.net/~bchristi/8212117/webrev09/ There is also a CSR[2] in need of review. The spec for the 2-arg and 3-arg Class.forName() methods states they will "locate, load, and link" the class, however the linking