Skip to content

Commit

Permalink
rts: Print correct stack size on stack overflow
Browse files Browse the repository at this point in the history
This requires that stackOverflow() in RtsUtils.c be passed a reference
to the current TSO. This requires a small change in libraries/base.
  • Loading branch information
bgamari committed Sep 17, 2013
1 parent eec7630 commit 871b193
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion includes/Rts.h
Expand Up @@ -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__);

Expand Down
6 changes: 3 additions & 3 deletions rts/RtsUtils.c
Expand Up @@ -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
}

Expand Down

0 comments on commit 871b193

Please sign in to comment.