Skip to content

Commit ce324cb

Browse files
committed
Do not perform deep validity check of jmethodid on JDK 26+
1 parent f3e00b1 commit ce324cb

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
@@ -873,6 +873,12 @@ bool VMMethod::check_jmethodID(jmethodID id) {
873873
}
874874

875875
bool VMMethod::check_jmethodID_hotspot(jmethodID id) {
876+
if (VM::hotspot_version() > 25) {
877+
// In https://bugs.openjdk.org/browse/JDK-8268406 the jmethodids are completely reworked
878+
// The assumption that jmethodid can be resolved to Method* is false and we really can
879+
// not do any extra checks here
880+
return true;
881+
}
876882
const char *method_ptr = (const char *)SafeAccess::load((void **)id);
877883
// check for NULL ptr and 'empty' ptr (JNIMethodBlock::_free_method)
878884
if (method_ptr == NULL || (size_t)method_ptr == 55) {

0 commit comments

Comments
 (0)