[GHC] #7684: cgrun071 segfaults
GHC
ghc-devs at haskell.org
Fri Sep 6 17:46:00 CEST 2013
#7684: cgrun071 segfaults
----------------------------------+----------------------------------
Reporter: tibbe | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: | 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 rwbarton):
I don't understand how the first 8 or so lines of gdb output are
consistent with the rest, so I'm going to assume that gdb was temporarily
confused. The `info registers` output looks much more plausible.
Replying to [comment:15 simonmar]:
> The native code generator is supposed to emit code to mask out the extra
bits. If it isn't doing that, that's a bug. See commit
085e8145f63c8f42d8bc19cd3cff52b8cd5b6455
Going by leroux's `info registers` output, it sure looks like it isn't
masking them out, since the argument register `rdi` is
`0x98b7fa5e6c84f828`.
From the assembly diff I see that gcc 4.8 outputs code to do the masking
in the callee (`movzbl %dil, %edi`) where gcc 4.2 does not. Oddly the
System V x86_64 ABI doesn't seem to specify whether arguments in registers
that are smaller than the register size should be masked/sign-extended by
the caller, but I gather that we are working under the assumption that
they should be (which is consistent with the 386 ABI).
leroux, could you attach the entire `cgrun071.S` disassembly output? Or
if it's very large, at least the disassembly of the function which calls
`hs_popcnt8`?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7684#comment:29>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list