nsrip-dd opened a new pull request, #984:
URL: https://github.com/apache/arrow-go/pull/984

   ### Rationale for this change
   
   The arm64 NEON assembly code in this library incorrectly manipulates the 
stack pointer. In the mechanically-translated portion of the code, there are 
instructions to set up and restore a call frame for the function, e.g.
   
        WORD $0xa9bf7bfd // stp    x29, x30, [sp, #-16]!
   
   But the assembler doesn't decode WORD directives and thus doesn't see the 
stack pointer manipulation. As a result, the spdelta table entries for these 
functions are incorrect. This table is used by the Go runtime for stack 
unwinding, to find the next frame based on the program counter and current 
stack pointer. In typical cases this means that the CPU profiler will just stop 
unwinding when it hits this function, and in some cases we can get 
non-truncated but incorrect tracebacks.
   
   See #983
   
   ### What changes are included in this PR?
   
   Fix this by removing the unnecssary frame setup for functions which don't 
otherwise use the stack, and by changing functions which do need a stack frame 
to include their frame size in the function declaration, which the assembler 
takes into account.
   
   ### Are these changes tested?
   
   Yes, by the existing unit tests, and manually by running the CPU profiler as 
described in #983
   
   ### Are there any user-facing changes?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to