JDK-8191467 : NotifyFramePop request is not cleared if JVMTI_EVENT_FRAME_POP is disabled
  • Type: CSR
  • Component: hotspot
  • Sub-Component: jvmti
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 11
  • Submitted: 2017-11-17
  • Updated: 2017-12-05
  • Resolved: 2017-12-01
Related Reports
CSR :  
Description
Summary
-------

A NotifyFramePop request is only cleared if the JVMTI_EVENT_FRAME_POP is enabled but it must be always cleared when the corresponding frame is popped regardless of whether the JVMTI_EVENT_FRAME_POP event is enabled or not.

For reference, see the JVMTI NotifyFramePop spec:
https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#NotifyFramePop

Problem
-------

Current implementation behavior is incorrect and has to be changed.
The problem is that if a NotifyFramePop request is not cleared when the JVMTI_EVENT_FRAME_POP events notification
is disabled then an unrelated FRAME_POP event can be sent after the notification is re-enabled.    

Solution
--------

The solution is to clear the NotifyFramePop request when the specified frame is popped, even if the JVMTI_EVENT_FRAME_POP event is disabled.

The full set of changes can be viewed here:
  http://cr.openjdk.java.net/%7Esspitsyn/webrevs/2017/hotspot/8187289-jvmti-framepop.2/


Specification
-------------

The specification of the  JVMTI NotifyFramePop function is not changed as the expected (correct)  behavior is pretty intuitive.
The full set of changes can be viewed here:
  http://cr.openjdk.java.net/%7Esspitsyn/webrevs/2017/hotspot/8187289-jvmti-framepop.2/

Comments
Thanks a lot, Joe! Yes, I've added a the label release-note=yes and will add a sub-task as well.
01-12-2017

Catching up on reviewing, moving the request to approved. Please consider including a release note for this change.
01-12-2017

Ok, finalized.
17-11-2017

This CSR is small enough that it can be finalized, no need to go through the two step process.
17-11-2017