[GHC] #8435: Do not copy stack after stack overflow

#8435: Do not copy stack after stack overflow
------------------------------+--------------------------------------------
Reporter: ezyang | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime | Version: 7.7
System | Operating System: Unknown/Multiple
Keywords: | Type of failure: Runtime performance bug
Architecture: | Test Case:
Unknown/Multiple | Blocking:
Difficulty: Unknown |
Blocked By: |
Related Tickets: |
------------------------------+--------------------------------------------
I am not sure, but I was doing a close reading of `threadStackOverflow`
and noticed that after we throw a stack overflow exception, we fall
through to the code responsible for allocating a new stack and copying the
code over. An old iteration of the stack overflow code (removed in the
commit cited below) did return after throwing the exception, and I did not
see anything in the commit message suggesting the change was intentional.
It seems sound to copy the stack; it will just become dead immediately.
The relevant commit:
{{{
commit f30d527344db528618f64a25250a3be557d9f287
Author: Simon Marlow

#8435: Do not copy stack after stack overflow -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: Runtime System | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by archblob): * owner: simonmar => * status: closed => new * resolution: fixed => * milestone: => 7.10.2 Comment: This change was reverted in d70b19bfb5ed79b22c2ac31e22f46782fc47a117 and is the reason for the difference between 7.10.1 and 7.8.4 outpus in #10445. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8435#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8435: Do not copy stack after stack overflow -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: Runtime System | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D938 -------------------------------------+------------------------------------- Changes (by archblob): * differential: => Phab:D938 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8435#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8435: Do not copy stack after stack overflow -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.10.2 Component: Runtime System | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D938 -------------------------------------+------------------------------------- Changes (by archblob): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8435#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8435: Do not copy stack after stack overflow -------------------------------------+------------------------------------- Reporter: ezyang | Owner: archblob Type: bug | Status: patch Priority: normal | Milestone: 7.10.2 Component: Runtime System | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D938 -------------------------------------+------------------------------------- Changes (by archblob): * owner: => archblob -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8435#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8435: Do not copy stack after stack overflow
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner: archblob
Type: bug | Status: patch
Priority: normal | Milestone: 7.10.2
Component: Runtime System | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions: Phab:D938
-------------------------------------+-------------------------------------
Comment (by Austin Seipp

#8435: Do not copy stack after stack overflow -------------------------------------+------------------------------------- Reporter: ezyang | Owner: archblob Type: bug | Status: merge Priority: normal | Milestone: 7.10.2 Component: Runtime System | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D938 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8435#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8435: Do not copy stack after stack overflow -------------------------------------+------------------------------------- Reporter: ezyang | Owner: archblob Type: bug | Status: closed Priority: normal | Milestone: 7.10.2 Component: Runtime System | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D938 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-7.10`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8435#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC