#2917: alloca and allocaArray do not respect alignment
-------------------------------+--------------------------------------------
    Reporter:  guest           |        Owner:                  
        Type:  bug             |       Status:  new             
    Priority:  high            |    Milestone:  6.10.2          
   Component:  Compiler (FFI)  |      Version:  6.10.1          
    Severity:  normal          |   Resolution:                  
    Keywords:                  |   Difficulty:  Unknown         
    Testcase:                  |           Os:  Unknown/Multiple
Architecture:  x86             |  
-------------------------------+--------------------------------------------
Comment (by guest):

 The mallocAlignment is the alignment returned by C malloc(), the
 allocaAlignment is the alignment for ghc's heap based allocation.  I
 should have spelled that out.
 Those two things should not be numbers, of course, but determined by the
 configure script.

 yes, OS X malloc() works fine, but ghc's internal allocation fails since
 it allocates on 8 byte boundary.

 I don't want to rush this in either.  But the bug makes large parts of the
 FFI library unusable with LLVM, so I'd like some fix.  How about a band
 aid that changes ghc's internal alloca to 16 byte boundary?  That will
 make things work, and we have a chance to test my patch further.

   -- Lennart

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2917#comment:8>
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

Reply via email to