Skip to content

Commit

Permalink
don't try to save the stack of a task that exited.
Browse files Browse the repository at this point in the history
this is especially helpful in the case of stack overflow, where trying to
copy the stack might cause a segfault.
fixes #1485
  • Loading branch information
JeffBezanson committed Nov 1, 2012
1 parent 5dc8e70 commit 72793ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ jl_jmp_buf * volatile jl_jmp_target;

static void save_stack(jl_task_t *t)
{
if (t->done)
return;
volatile int _x;
size_t nb = (char*)t->stackbase - (char*)&_x;
char *buf;
Expand Down

0 comments on commit 72793ed

Please sign in to comment.