[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: JDK-8198393: Instrumentation.retransformClasses() throws NullPointerException when handling
From:       Chris Plummer <chris.plummer () oracle ! com>
Date:       2018-03-27 0:41:44
Message-ID: 40407803-fc5c-0618-2843-95ed30db29dc () oracle ! com
[Download RAW message or body]

Looks good.

thanks,

Chris

On 3/26/18 4:36 PM, Alex Menkov wrote:
> Hi Serguei,
> 
> updated webrev:
> http://cr.openjdk.java.net/~amenkov/retransformClassesZeroLength/webrev.02/ 
> 
> 
> - updated copyright in th eInstrumentationImpl.java
> - removed inused imports in the test
> 
> 
> On 03/26/2018 14:31, serguei.spitsyn@oracle.com wrote:
> > Hi Alex,
> > 
> > It looks good to me.
> > 
> > A couple of questions:
> > 
> > - How does the test fail with the unfixed code?
> 
> As described in the jira issue:
> stdout: [FATAL ERROR in native method: processing of -javaagent failed
> ];
> stderr: [java.lang.reflect.InvocationTargetException
> at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
> at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.base/java.lang.reflect.Method.invoke(Method.java:564)
> at 
> java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
>  at 
> java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
>  Caused by: java.lang.NullPointerException
> at 
> java.instrument/sun.instrument.InstrumentationImpl.retransformClasses0(Native 
> Method)
> at 
> java.instrument/sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:167)
>  at 
> RetransformClassesZeroLength$Agent.premain(RetransformClassesZeroLength.java:77)
> ... 6 more
> *** java.lang.instrument ASSERTION FAILED ***: "numClasses != 0" at 
> line: 1146
> 
> --alex
> 
> > 
> > - It seems, the following imports in the test are not needed:
> > 
> > 34 import java.io.IOException;
> > . . .
> > 43 import java.util.Arrays;
> > . . .
> > 45 import jdk.test.lib.Utils;
> > 46 import jdk.test.lib.process.ExitCode;
> > 47 import jdk.test.lib.process.OutputAnalyzer;
> > 
> > Thanks,
> > Serguei
> > 
> > 
> > On 3/22/18 16:18, Alex Menkov wrote:
> > > Hi all,
> > > 
> > > Please take a look at a simple fix for
> > > https://bugs.openjdk.java.net/browse/JDK-8198393
> > > webrev: 
> > > http://cr.openjdk.java.net/~amenkov/retransformClassesZeroLength/webrev/ 
> > > 
> > > 
> > > --alex
> > 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic