Do not perform deep validity check of jmethodid on JDK 26+ by jbachorik · Pull Request #428 · DataDog/java-profiler
What does this PR do?:
Fix completely dysfunctional Java frame symbolication on Java 26
Motivation:
https://bugs.openjdk.org/browse/JDK-8268406 changed how jmethodid was represented in Hotspot JVMs.
Although the original fix for this was provided with async-profiler, another, sneakier issue remained in DD Java profiler - we perform deep validation of jmethodid to avoid surprising crashes due to attempts to access an invalid memory.
However, this validation is completely wrong on JDK 26 and later because jmethodids are now just a monotonically increasing key to a side table and we can not really validate anything.
Additional Notes:
How to test the change?:
Run a test load, capture profile and check the stacktraces. There should be no 'jvmtiError' frames.
For Datadog employees:
- If this PR touches code that signs or publishes builds or packages, or handles
credentials of any kind, I've requested a review from@DataDog/security-design-and-guidance. - This PR doesn't touch any of that.
- JIRA: PROF-14087
Unsure? Have a question? Request a review!