diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-11-29 22:22:49 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-11-29 22:22:49 -0800 |
| commit | 06f4cb43f6bffe870116f2688dd5d5fc3d0af043 (patch) | |
| tree | 8a3630793afad965791f673badaf3802d6648043 /src/rt/rust_task.cpp | |
| parent | 766e29c0e1c31f26a44e6c9bc9c30f9be758544d (diff) | |
| download | rust-06f4cb43f6bffe870116f2688dd5d5fc3d0af043.tar.gz rust-06f4cb43f6bffe870116f2688dd5d5fc3d0af043.zip | |
rt: Delete the entire stack chain on task destruction
Unwinding through __morestack on 64-bit Linux seems to be no big deal, and all we have to do is free the stacks to make unwinding work with split stacks.
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 3933692f015..6c79ef3264a 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -178,7 +178,10 @@ rust_task::~rust_task() I(sched, ref_count == 0); // || // (ref_count == 1 && this == sched->root_task)); - del_stk(this, stk); + // Delete all the stacks. There may be more than one if the task failed + while (stk != NULL) { + del_stk(this, stk); + } } struct spawn_args { |
