about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index f0ab8c57c35..b540225243f 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -2,8 +2,8 @@
 #include "rust_internal.h"
 #include "rust_cc.h"
 
-#include "valgrind.h"
-#include "memcheck.h"
+#include "vg/valgrind.h"
+#include "vg/memcheck.h"
 
 #ifndef __WIN32__
 #include <execinfo.h>
@@ -131,6 +131,9 @@ rust_task::~rust_task()
     //   (ref_count == 1 && this == sched->root_task));
 
     // Delete all the stacks. There may be more than one if the task failed
+    // FIXME: This is not correct. During unwinding we need to delete
+    // the stacks and record the stack limit, otherwise the stack
+    // stack is corrupted when destructors are running.
     while (stk != NULL) {
         del_stk(this, stk);
     }