On 6/23/20 3:01 PM, [email protected] wrote:
On 6/23/20 14:57, [email protected] wrote:
Hi Chris,

+    if (!env->ExceptionOccurred()) {
     env->ThrowNew(ex_cls, "DWARF not found");
+    }

Should the !env->ExceptionOccurred() be replaced with env->ExceptionOccurred() ?

Sorry. It is correct as it is is.
But then the question is what happen in the case of env->ExceptionOccurred() ?
We end up throwing whatever exception FindClass left pending rather than throwing the DebuggerException. It's preferable that DebuggerException be thrown, but in reality the FindClass shouldn't ever fail. If it does, then something else is very broken or we are out of memory.

The way around this issue is to do the FindClass in Java_sun_jvm_hotspot_debugger_linux_amd64_DwarfParser_init0 and save it static variable. I could take that approach if you wish.

thanks,

Chris

Thanks,
Serguei


Thanks,
Serguei
 

On 6/23/20 11:38, Chris Plummer wrote:
Hello,

Please review the following:

https://bugs.openjdk.java.net/browse/JDK-8247730
http://cr.openjdk.java.net/~cjplummer/8247730/webrev.00/

There are two locations were we make a JNI call with the possibility of a pending exception. This is new code in JDK 15, so it is being addressed there.

thanks,

Chris



Reply via email to