The problem happens when jni access fields while the last java frame is still 
compiled. The field access/modification events require interp only mode and 
compiled frame is not expected. However,  It might happens if thread switched 
to interponly mode while it is in JNI code. The deoptimization is triggered but 
each frame is really changed only execution returns to it.  So last java frame 
was not executed and thus is still compiled. 

The original example doesn't reproduce issue because of JDK changes but the 
problem exists in JVMTI. So I implemented reliable regression test. 

The location should be zero for JNI access.

-------------

Commit messages:
 - the new test added
 - Merge branch 'master' of https://github.com/openjdk/jdk into 8224852
 - logging fixed
 - minor fixes
 - 8224852: JVM crash on watched field access from native code

Changes: https://git.openjdk.org/jdk/pull/27584/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27584&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8224852
  Stats: 348 lines in 4 files changed: 341 ins; 0 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/27584.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27584/head:pull/27584

PR: https://git.openjdk.org/jdk/pull/27584

Reply via email to