[GHC] #8284: freeHaskellFunPtr crashes on iOS

#8284: freeHaskellFunPtr crashes on iOS -------------------------------------------+------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Runtime System | Version: 7.7 Keywords: | Operating System: Other Architecture: arm | Type of failure: Runtime Difficulty: Easy (less than 1 hour) | crash Blocked By: | Test Case: Related Tickets: | Blocking: -------------------------------------------+------------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8284 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8284: freeHaskellFunPtr crashes on iOS -------------------------------------+------------------------------------- Reporter: | Owner: StephenBlackheath | Status: patch Type: bug | Milestone: Priority: high | Version: 7.7 Component: Runtime System | Keywords: Resolution: | Architecture: arm Operating System: Other | Difficulty: Easy (less than 1 Type of failure: Runtime crash | hour) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Changes (by StephenBlackheath): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8284#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8284: freeHaskellFunPtr crashes on iOS -------------------------------------+------------------------------------- Reporter: | Owner: StephenBlackheath | Status: patch Type: bug | Milestone: Priority: high | Version: 7.7 Component: Runtime System | Keywords: Resolution: | Architecture: arm Operating System: Other | Difficulty: Easy (less than 1 Type of failure: Runtime crash | hour) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by rwbarton): I was curious what was going on here and it took me a while to figure it out, maybe a comment or two would be welcome? At the top of the function something like "ptr is an AdjustorExecutable allocated by allocateExec", and in the non-iOS case some comment about how the AdjustorWritable and AdjustorExecutable refer to the same physical memory so that we can just grab the closure data from ptr. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8284#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8284: freeHaskellFunPtr crashes on iOS -------------------------------------+------------------------------------- Reporter: | Owner: StephenBlackheath | Status: patch Type: bug | Milestone: Priority: high | Version: 7.7 Component: Runtime System | Keywords: Resolution: | Architecture: arm Operating System: Other | Difficulty: Easy (less than 1 Type of failure: Runtime crash | hour) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by StephenBlackheath): Hi rwbarton. I've added a new version of the patch with a big comment that explains the (slightly complicated) reasons behind it all. I hope that does the trick. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8284#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8284: freeHaskellFunPtr crashes on iOS -------------------------------------+------------------------------------- Reporter: | Owner: StephenBlackheath | Status: patch Type: bug | Milestone: Priority: high | Version: 7.7 Component: Runtime System | Keywords: Resolution: | Architecture: arm Operating System: Other | Difficulty: Easy (less than 1 Type of failure: Runtime crash | hour) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by rwbarton): Looks good, thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8284#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8284: freeHaskellFunPtr crashes on iOS -------------------------------------+------------------------------------- Reporter: | Owner: StephenBlackheath | Status: patch Type: bug | Milestone: Priority: high | Version: 7.7 Component: Runtime System | Keywords: Resolution: | Architecture: arm Operating System: Other | Difficulty: Easy (less than 1 Type of failure: Runtime crash | hour) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by thoughtpolice): Looks good to me. I'll put this on my queue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8284#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8284: freeHaskellFunPtr crashes on iOS -------------------------------------+------------------------------------- Reporter: | Owner: StephenBlackheath | Status: patch Type: bug | Milestone: Priority: high | Version: 7.7 Component: Runtime System | Keywords: Resolution: | Architecture: arm Operating System: Other | Difficulty: Easy (less than 1 Type of failure: Runtime crash | hour) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by StephenBlackheath): I've added a replacement third version of the patch that improves the accuracy of the comment. This explains why we can't just put the exec pointer at the end of the data structure. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8284#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8284: freeHaskellFunPtr crashes on iOS
-------------------------------------+-------------------------------------
Reporter: | Owner:
StephenBlackheath | Status: closed
Type: bug | Milestone:
Priority: high | Version: 7.7
Component: Runtime System | Keywords:
Resolution: fixed | Architecture: arm
Operating System: Other | Difficulty: Easy (less than 1
Type of failure: Runtime crash | hour)
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+-------------------------------------
Changes (by thoughtpolice):
* status: patch => closed
* resolution: => fixed
Comment:
Merged. Thanks Stephen!
{{{
commit 14677cd514553f6bb661bd046f002b8cfe166edf
Author: Austin Seipp
participants (1)
-
GHC