Re: [GHC] #7684: cgrun071 segfaults

#7684: cgrun071 segfaults ----------------------------------+---------------------------------- Reporter: tibbe | Owner: Type: bug | Status: merge Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Difficulty: Unknown Test Case: cgrun071 | Blocked By: Blocking: | Related Tickets: ----------------------------------+---------------------------------- Comment (by simonmar): So I think this fix is ok - it avoids the question of whether the ABI requires the caller to sign/zero-extend or not. My suggestion to cast the argument was based on the type of `hs_popcnt8` taking an `HsInt8`, but I see that wasn't what you intended. FWIW I think gcc probably should be zero-extending in the caller, not the callee, for an 8-bit argument (i.e. gcc 4.2 is correct, 4.9 is wrong). This is what we assume in GHC. I couldn't see anything about this in the ABI spec, but there's a gcc bug open: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46942 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7684#comment:57 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC