Skip to content
Snippets Groups Projects
Commit 7de07eb7 authored by Ben Gamari's avatar Ben Gamari Committed by Austin Seipp
Browse files

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.
parent 72f8b8d6
No related branches found
No related tags found
No related merge requests found
......@@ -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__);
......
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment