
#14346: 8.2.1 regression: heap corruption after safe foreign calls -------------------------------------+------------------------------------- Reporter: andrewchen | Owner: (none) Type: bug | Status: infoneeded Priority: highest | Milestone: Component: Runtime System | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): On looking at this with fresh eyes, it seems that unfortunately my analysis from comment:11 is flawed; the `movq %rbx,$rdi` is completely correct. We spill to the callee-saved `%rbx register before `suspendThread` and then more the value from `%rbx` to `%rdi`, which is where we expect the first argument to reside. The second spill is simply preserving `_u4RH`, which is still alive after the call to `test`. Back to the drawing board. I think now I'll focus on catching the issue earlier in execution; namely, when we first get the `value mismatch` message. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14346#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler