
#14758: Retainer profiler can overflow the C stack -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Profiling | Version: 8.6.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15287 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by osa1): * priority: high => normal * keywords: => newcomer * version: 8.4.1-alpha1 => 8.6.1 Comment: Just a status update: we discussed this a few weeks ago in a meeting. This is easy to fix, just replace recursive calls to `retainClosure` (directly or indirectly via `retainStack`) with stack pushes. For this we need to add new stack element types handle those in `retainClosure` (which is where we pop the stack). Not too hard to do. In the end we weren't sure that retainer profiler is too useful in practice, so we did not prioritize this (I'm updating the ticket priority now to reflect this). If you're using retainer profiler for anything useful and suffering from this bug, let us know. Also, this seems like a great newcomer ticket to me. The changes are only in one file (`RetainerProfile.c`) and you only need to know GHC heap object layout and some C. If anyone's interested in working on this let me know and I can give more detailed instructions. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14758#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler