Displaying 2 results from an estimated 2 matches for "__dyld_misaligned_stack_error".
2010 Feb 12
3
[LLVMdev] Problems with custom calling convention on Mac OS X
...om the callee saved registers.
This works fine mostly. On Linux, the generated code passes the GHC
testsuite. On Mac however the GHC testsuite fails on any code which uses
the ffi (which is implemented by libffi
[http://sourceware.org/libffi/]). Programs which fail segfault with the
error '__dyld_misaligned_stack_error'. The issue seems to be from my
investigations that the ffi call should be 16-byte aligned as per Mac OS
X's ABI.
I'm hoping someone is able to confirm that my changes would have
introduced this bug and how to go about fixing it.
Another minor issue is that the generated code has a...
2010 Feb 12
0
[LLVMdev] Problems with custom calling convention on Mac OS X
...>
> This works fine mostly. On Linux, the generated code passes the GHC
> testsuite. On Mac however the GHC testsuite fails on any code which uses
> the ffi (which is implemented by libffi
> [http://sourceware.org/libffi/]). Programs which fail segfault with the
> error '__dyld_misaligned_stack_error'. The issue seems to be from my
> investigations that the ffi call should be 16-byte aligned as per Mac OS
> X's ABI.
That's correct. Therefore, when generating code, you must ensure that
the stack is 16-byte aligned, one way or another, if you want to make a
dylib call on Mac O...