Menu

#449 Make sure functions with SSE instructions maintain their own properly aligned stack

Compatibility
closed-accepted
nobody
None
5
2017-08-08
2015-06-10
No

Author: Fabian Greffrath fabian@debian.org
Subject: Make sure functions with SSE instructions maintain their own properly aligned stack
Operands in SSE instructions must be aligned on 16-byte boundaries. In the
init_xrpow_core_sse() function these operands are variables on the stack.
However, when the code is called from the ocaml bindings, the stack is
allocated by ocaml which does not adhere to the 16-byte boundary rule and thus
causes the code to crash with a general protection error.
What is needed is a means for the functions calling SSE instructions to
maintain their own properly aligned stack. The "force_align_arg_pointer"
attribute does exactly this, see
https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html.
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786438
Last-Update: 2015-06-10

1 Attachments

Discussion

  • Robert Hegemann

    Robert Hegemann - 2017-08-08
    • status: open --> closed-accepted
     
  • Robert Hegemann

    Robert Hegemann - 2017-08-08

    Thanks!

     

Log in to post a comment.

MongoDB Logo MongoDB