On Wed, 18 Dec 2024 05:21:55 GMT, Julian Waters <jwat...@openjdk.org> wrote:
>> src/java.base/share/native/libfallbackLinker/fallbackLinker.c line 168: >> >>> 166: // attach thread >>> 167: JNIEnv* env; >>> 168: (*VM)->AttachCurrentThreadAsDaemon(VM, (void**) &env, NULL); >> >> I think the variable should be used! This code should be checking for a >> failed attach! > > Agree with David here. Generally I comment out unused code errors rather than > outright remove them for this very reason. Also fallbackLinker doesn't seem > to be a C++ file? How about the following? jint result = (*VM)->AttachCurrentThreadAsDaemon(VM, (void**) &env, NULL); if (result != JNI_OK) { fprintf(stderr, "do_upcall trying to attach thread returned %d", result); return; } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22799#discussion_r1889755164