[GHC] #13911: GHC RTS VEH swallowing exceptions

#13911: GHC RTS VEH swallowing exceptions --------------------------------------+---------------------------------- Reporter: tim-m89 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.1 Keywords: | Operating System: Windows Architecture: x86_64 (amd64) | Type of failure: Runtime crash Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: --------------------------------------+---------------------------------- On ticket #6079, a top level VEH handler was implemented which effectively means there is no uncaught exceptions for those it catches. #13108 improved things a little by giving some basic info upon segfaults, but otherwise left everything as is. Rather than trying to catch all exceptions, I think it would be more worthwhile to leave them uncaught, and let current & future tools have an eyes open approach to debugging. If something needs to go in the place of the global handler, perhaps SetUnhandledExceptionFilter is of use? VEH overrides all other exception handlers as far as I'm aware (C++, SEH, .NET), so trying to interop with any other code that wants to handle it's own exceptions won't work unless said code is also using VEH. This is causing an issue for some code I've been working on, and I've documented similar to this bug report there also: https://gitlab.com/tim-m89/clr-haskell/issues/25#note_33960203 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13911 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13911: GHC RTS VEH swallowing exceptions -------------------------------------+------------------------------------- Reporter: tim-m89 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.4.1 Component: Runtime System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * failure: Runtime crash => Incorrect result at runtime * architecture: x86_64 (amd64) => Unknown/Multiple * milestone: => 8.4.1 Comment: We do want to handle unhandled exceptions internally because of the interpreter. Code faulting during runtime linker handling leaves the application in an indeterminate state. Especially if it happened during e.g. processing of relocation. The problem with `SetUnhandledExceptionFilter` is that it replaces any existing top level filter. So it again interacts badly with your interop scenario, though maybe to a lesser extend. I think using a `VCH` instead of a `VEH` should work since those would be the last to be called instead of the first. I'll get this changed for `8.4` when I make the crash output more useful. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13911#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13911: GHC RTS VEH swallowing exceptions -------------------------------------+------------------------------------- Reporter: tim-m89 | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.4.1 Component: Runtime System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3911 Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * status: new => patch * differential: => Phab:D3911 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13911#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13911: GHC RTS VEH swallowing exceptions
-------------------------------------+-------------------------------------
Reporter: tim-m89 | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.4.1
Component: Runtime System | Version: 8.0.1
Resolution: | Keywords:
Operating System: Windows | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3911
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#13911: GHC RTS VEH swallowing exceptions
-------------------------------------+-------------------------------------
Reporter: tim-m89 | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.4.1
Component: Runtime System | Version: 8.0.1
Resolution: | Keywords:
Operating System: Windows | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3911
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#13911: GHC RTS VEH swallowing exceptions -------------------------------------+------------------------------------- Reporter: tim-m89 | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.4.1 Component: Runtime System | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Windows | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3911 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: The double-commit was to fix erroneous authorship information. Sorry for the noise. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13911#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC