[Issue 6215] ICE(el.c) DMD segfaults when built on system with XCode 4.2

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 12 05:06:31 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6215



--- Comment #7 from klickverbot <code at klickverbot.at> 2011-08-12 05:06:27 PDT ---
And indeed, __alignof__(*e) gives 16, patching the allocator to 16-byte align
everything is easy:

--- a/src/tk/mem.c
+++ b/src/tk/mem.c
@@ -758,7 +758,7 @@ void *mem_fmalloc(unsigned numbytes)
     if (sizeof(size_t) == 2)
         numbytes = (numbytes + 1) & ~1;         /* word align   */
     else
-        numbytes = (numbytes + 3) & ~3;         /* dword align  */
+        numbytes = (numbytes + 15) & ~15;

     /* This ugly flow-of-control is so that the most common case
        drops straight through.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list