[aarch64-port-dev ] RFR(S): JDK-8203481 Incorrect constraint for unextended_sp in frame:safe_for_sender

Dmitry Samersoff dms at samersoff.net
Wed May 23 07:16:09 UTC 2018


Dan,

Thank you!

I'll re-check what is happening on AArch64 and come back.

-Dmitry


On 21.05.2018 17:28, Daniel D. Daugherty wrote:
> Hi Dmitry,
> 
> I think something else must be going wrong here. The unextended SP
> is typically documented like this:
> 
>   // This is the sp before any possible extension (adapter/locals).
>   intptr_t* unextended_sp = interpreter_frame_sender_sp();
> 
> and like this:
> 
>   // stack frames shouldn't be much larger than max_stack elements
>   // this test requires the use of unextended_sp which is the sp as seen by
>   // the current frame, and not sp which is the "raw" pc which could point
>   // further because of local variables of the callee method inserted after
>   // method arguments
>   if (fp() - unextended_sp() > 1024 +
> m->max_stack()*Interpreter::stackElementSize) {
>     return false;
>   }
> 
> So I think this existing comment and assertion are correct:
> 
>     L72:   // unextended sp must be within the stack and above or equal sp
>     L73:   bool unextended_sp_safe = (unextended_sp <
> thread->stack_base()) &&
>     L74:                             (unextended_sp >= sp);
> 
> Also, your proposed fix only changed this for two platforms. The same
> logic exists on 'arm' and 'sparc' also.
> 
> Dan
> 
> 
> On 5/21/18 9:44 AM, Dmitry Samersoff wrote:
>> Hello Everybody,
>>
>> Please review small fix
>>
>> http://cr.openjdk.java.net/~dsamersoff/JDK-8203481/webrev.01/
>>
>> CR:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8203481
>>
>> Testing:
>>
>> jfr tests that depends to safe_for_sender functionality
>>
>> ./jdk/jdk/jfr/api/consumer/TestRecordedFullStackTrace.java
>> ./jdk/jdk/jfr/event/profiling/TestFullStackTrace.java
>>
>> fails on AARCH64.
>>
>> These tests passed after the fix.
>>
>>
> 


-- 
Dmitry Samersoff
http://devnull.samersoff.net
* There will come soft rains ...



More information about the aarch64-port-dev mailing list