RFR: 8316309: AArch64: VMError::print_native_stack() crashes on Java native method frame [v2]

Patricio Chilano Mateo pchilanomate at openjdk.org
Fri Sep 29 16:35:46 UTC 2023


On Fri, 29 Sep 2023 04:29:34 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Patricio Chilano Mateo has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - add comment to tests
>>  - use driver + @requires vm.flagless
>
> src/hotspot/share/utilities/vmError.cpp line 434:
> 
>> 432:       return invalid;
>> 433:     }
>> 434:     if (fr.is_interpreted_frame() || (fr.cb() != nullptr && fr.cb()->frame_size() > 0)) {
> 
> This part of the fix is unclear to me. How do the old conditions relate to the new ones?

The second part of the condition includes the previous checks for is_compiled_frame(), is_native_frame(), is_runtime_frame() plus any other frame that would use sender_for_compiled_frame() when calling frame::sender(), like the safepoint stub.

> test/hotspot/jtreg/runtime/ErrorHandling/StackWalkNativeToJava.java line 84:
> 
>> 82:         public void callNativeMethod() throws Exception {
>> 83:             Object obj = new Object();
>> 84:             obj.wait();
> 
> Just to be clear, the aim here is to call a native method that will complete by throwing an exception, so you can abort the VM. A comment to that affect would be good. Thanks

Done.

> test/hotspot/jtreg/runtime/ErrorHandling/StackWalkNativeToJava.java line 116:
> 
>> 114:         }
>> 115: 
>> 116:         public void callVMMethod() throws Exception {
> 
> Again a comment outlining how you expect this to abort the VM would be good.

Done.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15972#discussion_r1341496808
PR Review Comment: https://git.openjdk.org/jdk/pull/15972#discussion_r1341496264
PR Review Comment: https://git.openjdk.org/jdk/pull/15972#discussion_r1341496366


More information about the hotspot-dev mailing list