Bug 2717 – alloca(0) leaves stack unaligned on OSX

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2009-03-08T20:26:00Z
Last change time
2015-06-09T05:15:07Z
Keywords
wrong-code
Assigned to
lio+bugzilla
Creator
lio+bugzilla

Comments

Comment #0 by lio+bugzilla — 2009-03-08T20:26:26Z
I don't have a Mac so I can't test whether this actually causes problems, but commit 102 to alloca.d in druntime did not fix the condition alloca(0): it will allocate 4 bytes, instead of 16. The fix would be to move the "jnz; mov" into the version blocks.