[commit: ghc] master: rts: Print correct stack size on stack overflow (7de07eb)
git at git.haskell.org
git at git.haskell.org
Fri Oct 25 14:22:27 UTC 2013
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/7de07eb78c10217c87f0f6a4c12ef2927d044e00/ghc
>---------------------------------------------------------------
commit 7de07eb78c10217c87f0f6a4c12ef2927d044e00
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Sat Sep 7 17:53:34 2013 -0400
rts: Print correct stack size on stack overflow
This requires that stackOverflow() in RtsUtils.c be passed a reference
to the current TSO. This requires a small change in libraries/base.
>---------------------------------------------------------------
7de07eb78c10217c87f0f6a4c12ef2927d044e00
includes/Rts.h | 2 +-
rts/RtsUtils.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/includes/Rts.h b/includes/Rts.h
index 96dc6a5..aca6c49 100644
--- a/includes/Rts.h
+++ b/includes/Rts.h
@@ -250,7 +250,7 @@ void getWin32ProgArgv(int *argc, wchar_t **argv[]);
void setWin32ProgArgv(int argc, wchar_t *argv[]);
#endif
-void stackOverflow(void);
+void stackOverflow(StgTSO* tso);
void stg_exit(int n) GNU_ATTRIBUTE(__noreturn__);
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c
index b06b6af..185f1e8 100644
--- a/rts/RtsUtils.c
+++ b/rts/RtsUtils.c
@@ -114,12 +114,12 @@ stgFree(void* p)
-------------------------------------------------------------------------- */
void
-stackOverflow(void)
+stackOverflow(StgTSO* tso)
{
- StackOverflowHook(RtsFlags.GcFlags.maxStkSize * sizeof(W_));
+ StackOverflowHook(tso->tot_stack_size * sizeof(W_));
#if defined(TICKY_TICKY)
- if (RtsFlags.TickyFlags.showTickyStats) PrintTickyInfo();
+ if (RtsFlags.TickyFlags.showTickyStats) PrintTickyInfo();
#endif
}
More information about the ghc-commits
mailing list