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

Daniel D. Daugherty daniel.daugherty at oracle.com
Mon May 21 14:28:56 UTC 2018


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.
>
>



More information about the aarch64-port-dev mailing list