Skip to content

Commit 416d62c

Browse files
authored
Do not perform deep validity check of jmethodid on JDK 26+ (#428)
1 parent abe43f3 commit 416d62c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ddprof-lib/src/main/cpp/vmStructs.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,12 @@ bool VMMethod::check_jmethodID(jmethodID id) {
879879
}
880880

881881
bool VMMethod::check_jmethodID_hotspot(jmethodID id) {
882+
if (VM::hotspot_version() > 25) {
883+
// In https://bugs.openjdk.org/browse/JDK-8268406 the jmethodids are completely reworked
884+
// The assumption that jmethodid can be resolved to Method* is false and we really can
885+
// not do any extra checks here
886+
return true;
887+
}
882888
const char *method_ptr = (const char *)SafeAccess::load((void **)id);
883889
// check for NULL ptr and 'empty' ptr (JNIMethodBlock::_free_method)
884890
if (method_ptr == NULL || (size_t)method_ptr == 55) {

0 commit comments

Comments
 (0)