#5052: stdcall on OS X is broken
-------------------------+--------------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.2
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: MacOS X | Blocking:
Architecture: x86 | Failure: None/Unknown
-------------------------+--------------------------------------------------
Changes (by batterseapower):
* status: new => patch
Comment:
I've attached a ticket that seems to fix this bug for me. The problem is
that the codegen for foreign calls makes sure the stack is 16-byte aligned
on OS X by pushing some padding. In the case where the foreign call is
cdecl, that padding gets popped after the call, but if the convention is
stdcall then it doesn't generate any popping code at all. However, this is
incorrect because the stdcall only promises to pop the arguments, not the
padding.
The fix is to generate code to pop the padding (if any) on OS X.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5052#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs