JDK-8257992 : Add a comment to ResetNoHandleMark to explain its usage
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2020-12-09
  • Updated: 2020-12-18
  • Resolved: 2020-12-18
Related Reports
Duplicate :  
Relates :  
Description
LEAF entries include a NoHandleMark, but that is a conservative restriction as such methods must not rely on Handles actually being processed, but can allow code that allocates handles but does not introduce safepoints. Such code can be safely used in both safepoint-friendly entries as well as in LEAF entries, although the latter requires a ResetNoHandleMark.

A comment before that class in handles.hpp should clarify its safe use.
Comments
Only bugs that are associated with changesets should be closed as "Fixed". I've reopened this bug and will reclose it as a duplicate.
18-12-2020

I'll add this comment as part of JDK-8258032.
18-12-2020

I guess this is not strictly a duplicate.
17-12-2020