Do not perform deep validity check of jmethodid on JDK 26+#428
Merged
Do not perform deep validity check of jmethodid on JDK 26+#428
Conversation
CI Test ResultsRun: #23361687570 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 32 | Passed: 32 | Failed: 0 Updated: 2026-03-20 20:53:34 UTC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!