[GHC] #12110: Windows exception handler change causes segfault with API Monitor

#12110: Windows exception handler change causes segfault with API Monitor ----------------------------------------+---------------------------------- Reporter: enolan | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.1 Keywords: | Operating System: Windows Architecture: Unknown/Multiple | Type of failure: Runtime crash Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: ----------------------------------------+---------------------------------- [http://www.rohitab.com/apimonitor API Monitor] is a debugging tool that intercepts and logs calls to DLLs. It was extremely helpful with debugging #12010 and is broken in recent GHCs. Attaching it to a GHC compiled executable causes the message `Segmentation fault/access violation in generated code` to be printed. Launching one from inside API Monitor doesn't work either, though I can't read the console output before the window closes. Bisect shows the offending commit is 5200bdeb26 - "Replaced SEH handles with VEH handlers which should work uniformly across x86 and x64". I know this is somewhat outside of "standard usage", but there are very few useful debugging tools for stuff like this and I'd really like to not lose this one. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12110 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12110: Windows exception handler change causes segfault with API Monitor -------------------------------------+------------------------------------- Reporter: enolan | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): The Exception handlers shouldn't be the issue. The don't cause the segfault. It only handles them when they happen. It likely has to do with how API monitoring does API hooking. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12110#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12110: Windows exception handler change causes segfault with API Monitor -------------------------------------+------------------------------------- Reporter: enolan | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by enolan): It works before the commit and doesn't after. It may be fair to blame API Monitor's developer, but the exception handlers are definitely involved. Maybe API Monitor method of hooking triggers the exception handler and it's incorrectly interpreted as a segfault? You definitely know more about this than me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12110#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12110: Windows exception handler change causes segfault with API Monitor -------------------------------------+------------------------------------- Reporter: enolan | 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: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3911 Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * status: new => patch * differential: => Phab:D3911 * milestone: => 8.4.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12110#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12110: Windows exception handler change causes segfault with API Monitor
-------------------------------------+-------------------------------------
Reporter: enolan | 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:
| Unknown/Multiple
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3911
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12110: Windows exception handler change causes segfault with API Monitor
-------------------------------------+-------------------------------------
Reporter: enolan | 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:
| Unknown/Multiple
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3911
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12110: Windows exception handler change causes segfault with API Monitor -------------------------------------+------------------------------------- Reporter: enolan | 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: | Unknown/Multiple Type of failure: Runtime crash | 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/12110#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC