[commit: ghc] ghc-8.6: Remove explicit recursion in retainer profiling (fixes #14758) (6db7d11)
git at git.haskell.org
git at git.haskell.org
Thu Dec 6 18:31:04 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.6
Link : http://ghc.haskell.org/trac/ghc/changeset/6db7d11eed70b4db7b7698a9dfae94a6abae248a/ghc
>---------------------------------------------------------------
commit 6db7d11eed70b4db7b7698a9dfae94a6abae248a
Author: Alexander Vershilov <alexander.vershilov at gmail.com>
Date: Wed Dec 5 19:47:32 2018 +0300
Remove explicit recursion in retainer profiling (fixes #14758)
Retainer profiling contained a recursion that under
certain circumstances could lead to the stack overflow
in C code.
The idea of the improvement is to keep an explicit stack for the
object, more precise to reuse existing stack, but allow new type of
objects to be stored there.
There is no reliable reproducer that is not a big program
but in some cases foldr (+) 0 [1..10000000] can work.
Reviewers: bgamari, simonmar, erikd, osa1
Reviewed By: bgamari, osa1
Subscribers: osa1, rwbarton, carter
GHC Trac Issues: #14758
Differential Revision: https://phabricator.haskell.org/D5351
(cherry picked from commit 5f1d949ab9e09b8d95319633854b7959df06eb58)
>---------------------------------------------------------------
6db7d11eed70b4db7b7698a9dfae94a6abae248a
rts/RetainerProfile.c | 223 +++++++++++++++++++++++++++++++++-----------------
1 file changed, 146 insertions(+), 77 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 6db7d11eed70b4db7b7698a9dfae94a6abae248a
More information about the ghc-commits
mailing list