RFR: 8328679: Improve comment for UNSAFE_ENTRY_SCOPED in unsafe.cpp

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Mar 21 11:09:26 UTC 2024


This small PR is an attempt at improving the comment in the UNSAFE_ENTRY_SCOPED macro.
I found that the comment contained some duplicated claims, did not properly introduced the concepts it referred to, and some of its claims were not explained in full.

As this is a delicate part of how FFM ensures the "no use after free" guarantee, I think it would be a good idea for this comment to better reflect what the expectations are.

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

Commit messages:
 - Tweak UNSAFE_ENTRY_SCOPED comment

Changes: https://git.openjdk.org/jdk/pull/18429/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18429&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8328679
  Stats: 20 lines in 1 file changed: 3 ins; 2 del; 15 mod
  Patch: https://git.openjdk.org/jdk/pull/18429.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18429/head:pull/18429

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


More information about the hotspot-dev mailing list