On Tue, 4 Aug 2026 07:57:39 GMT, Serguei Spitsyn <[email protected]> wrote:
>> David CARLIER has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Apply feedback: use NATIVE_METHOD_PREFIX naming for the test constant > > test/hotspot/jtreg/serviceability/jvmti/SetNativeMethodPrefix/libPrefixedNativeStackWalk.cpp > line 49: > >> 47: memset(methods, 0, sizeof(methods)); >> 48: >> 49: jint res = jni->RegisterNatives(boot_cls, methods, 0); > > Nit: Could you add a comment why is the definition at line 46 needed? Can we > just replace the `methods` with `nullptr` at line 49? On the method list: jni_RegisterNatives does the caller-class lookup before the index < nMethods loop, so with nMethods == 0 the list is never dereferenced, and checked JNI passes the arguments straight through. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32180#discussion_r3711426972
