RFR: 8346132: fallbacklinker.cpp failed compilation due to unused variable
Calvin Cheung
ccheung at openjdk.org
Wed Dec 18 16:18:36 UTC 2024
On Wed, 18 Dec 2024 11:58:37 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> 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;
>> }
>
> We can not return to native code here in case of an error. We should terminate the process instead.
>
> The same should really also be done in case the call to `CallStaticVoidMethod` below throws an exception. This was a leftover from the initial implementation of this code that apparently fell through the cracks.
>
> Ideally we should also add a test for that so... I suggest just removing the unused variable in this PR for now, to get this to compile, and then I can file a followup issue to address the lack of error handling.
Thanks @JornVernee. The current change is just removing the unused variable. Could you approve it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22799#discussion_r1890502976
More information about the core-libs-dev
mailing list