Skip to content

Commit 43c8aaf

Browse files
committed
---
yaml --- r: 14189 b: refs/heads/try c: 3406da4 h: refs/heads/master i: 14187: 337e9a5 v: v3
1 parent 340b63b commit 43c8aaf

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: c42492e6aa481a65e4919b5ab26f4b0936556fc0
5+
refs/heads/try: 3406da49d98c93b54c8497310d7a7aeb7e9991b0
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rt/rust_stack.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ register_valgrind_stack(stk_seg *stk) {
88
stk->valgrind_id =
99
VALGRIND_STACK_REGISTER(&stk->data[0],
1010
stk->end);
11+
}
12+
13+
void
14+
prepare_valgrind_stack(stk_seg *stk) {
1115
#ifndef NVALGRIND
1216
// Establish that the stack is accessible. This must be done when reusing
1317
// old stack segments, since the act of popping the stack previously

branches/try/src/rt/rust_stack.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ destroy_stack(T allocer, stk_seg *stk) {
4242
void
4343
register_valgrind_stack(stk_seg *stk);
4444

45+
void
46+
prepare_valgrind_stack(stk_seg *stk);
47+
4548
void
4649
deregister_valgrind_stack(stk_seg *stk);
4750

branches/try/src/rt/rust_task.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ rust_task::new_stack(size_t requested_sz) {
568568
stk = stk->prev;
569569
A(thread, stk->prev == NULL, "Bogus stack ptr");
570570
register_valgrind_stack(stk);
571+
prepare_valgrind_stack(stk);
571572
return;
572573
} else {
573574
LOG(this, mem, "existing stack is not big enough");
@@ -599,6 +600,7 @@ rust_task::new_stack(size_t requested_sz) {
599600

600601
stk = new_stk;
601602
register_valgrind_stack(stk);
603+
prepare_valgrind_stack(stk);
602604
total_stack_sz += user_stack_size(new_stk);
603605
}
604606

branches/try/src/rt/rust_task_thread.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ rust_task_thread::prepare_c_stack() {
373373
if (!cached_c_stack) {
374374
cached_c_stack = create_stack(kernel, C_STACK_SIZE);
375375
register_valgrind_stack(cached_c_stack);
376+
prepare_valgrind_stack(cached_c_stack);
376377
}
377378
}
378379

0 commit comments

Comments
 (0)