On Sun, 11 Oct 2026 03:26:55 GMT, Vladimir Petko <[email protected]> wrote:

>> src/hotspot/os_cpu/linux_s390/javaThread_linux_s390.cpp line 36:
>> 
>>> 34:   address pc = _anchor.last_Java_pc();
>>> 35: 
>>> 36: #ifdef ASSERT
>> 
>> `pc == null` is valid here when a c2 runtime stub called into the vm (I 
>> explained it in this [PR 
>> comment](https://github.com/openjdk/jdk/pull/31441#discussion_r3441548556)). 
>> You have to handle it outside of the `#ifdef ASSERT`.
>
> Hi, 
> 
> Thanks a lot for the review!!! Just to clarify the change here - frame(sp) 
> constructor[1] calls frame(sp, nullptr)[2][3]. It calls setup()[4] that sets 
> the pc from own_abi()->return_pc if it is null[5]. 
> We want to call it out directly, so pass own_abi()->return_pc here to the 
> frame constructor?
> 
> [1] 
> https://github.com/openjdk/jdk/blob/5f92fecdd23672b8b1d2ee7bb0d25b726fb4c0e0/src/hotspot/cpu/s390/frame_s390.inline.hpp#L105
> [2] 
> https://github.com/openjdk/jdk/blob/5f92fecdd23672b8b1d2ee7bb0d25b726fb4c0e0/src/hotspot/cpu/s390/frame_s390.hpp#L499
> [3] 
> https://github.com/openjdk/jdk/blob/5f92fecdd23672b8b1d2ee7bb0d25b726fb4c0e0/src/hotspot/cpu/s390/frame_s390.inline.hpp#L99
> [4] 
> https://github.com/openjdk/jdk/blob/5f92fecdd23672b8b1d2ee7bb0d25b726fb4c0e0/src/hotspot/cpu/s390/frame_s390.inline.hpp#L110
> [5] 
> https://github.com/openjdk/jdk/blob/5f92fecdd23672b8b1d2ee7bb0d25b726fb4c0e0/src/hotspot/cpu/s390/frame_s390.inline.hpp#L39

Sorry, you're absolutely right. I missed that `frame::setup()` will find the pc 
looking at the correct location.
So your last change 
[c1c83d2](https://github.com/openjdk/jdk/pull/33262/commits/c1c83d267e1bd475c7ef7032284c3e3a9545bf99)
 is actually not needed.
Maybe add a small comment instead?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33262#discussion_r4241006280

Reply via email to