Skip to content

Commit 340b63b

Browse files
committed
---
yaml --- r: 14188 b: refs/heads/try c: c42492e h: refs/heads/master v: v3
1 parent 337e9a5 commit 340b63b

File tree

5 files changed

+11
-17
lines changed

5 files changed

+11
-17
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: dd0ae80e63beed52164eac76bc94b36b73b6c590
5+
refs/heads/try: c42492e6aa481a65e4919b5ab26f4b0936556fc0
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rt/rust_stack.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,8 @@
33
#include "vg/valgrind.h"
44
#include "vg/memcheck.h"
55

6-
// A value that goes at the end of the stack and must not be touched
7-
const uint8_t stack_canary[] = {0xAB, 0xCD, 0xAB, 0xCD,
8-
0xAB, 0xCD, 0xAB, 0xCD,
9-
0xAB, 0xCD, 0xAB, 0xCD,
10-
0xAB, 0xCD, 0xAB, 0xCD};
11-
126
void
13-
config_valgrind_stack(stk_seg *stk) {
7+
register_valgrind_stack(stk_seg *stk) {
148
stk->valgrind_id =
159
VALGRIND_STACK_REGISTER(&stk->data[0],
1610
stk->end);
@@ -25,7 +19,7 @@ config_valgrind_stack(stk_seg *stk) {
2519
}
2620

2721
void
28-
unconfig_valgrind_stack(stk_seg *stk) {
22+
deregister_valgrind_stack(stk_seg *stk) {
2923
VALGRIND_STACK_DEREGISTER(stk->valgrind_id);
3024
}
3125

branches/try/src/rt/rust_stack.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ destroy_stack(T allocer, stk_seg *stk) {
4040
}
4141

4242
void
43-
config_valgrind_stack(stk_seg *stk);
43+
register_valgrind_stack(stk_seg *stk);
4444

4545
void
46-
unconfig_valgrind_stack(stk_seg *stk);
46+
deregister_valgrind_stack(stk_seg *stk);
4747

4848
void
4949
check_stack_canary(stk_seg *stk);

branches/try/src/rt/rust_task.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ rust_task::new_stack(size_t requested_sz) {
567567
LOG(this, mem, "reusing existing stack");
568568
stk = stk->prev;
569569
A(thread, stk->prev == NULL, "Bogus stack ptr");
570-
config_valgrind_stack(stk);
570+
register_valgrind_stack(stk);
571571
return;
572572
} else {
573573
LOG(this, mem, "existing stack is not big enough");
@@ -598,7 +598,7 @@ rust_task::new_stack(size_t requested_sz) {
598598
LOGPTR(thread, "stk end", new_stk->end);
599599

600600
stk = new_stk;
601-
config_valgrind_stack(stk);
601+
register_valgrind_stack(stk);
602602
total_stack_sz += user_stack_size(new_stk);
603603
}
604604

@@ -626,7 +626,7 @@ rust_task::del_stack() {
626626
old_stk->prev = NULL;
627627
}
628628

629-
unconfig_valgrind_stack(old_stk);
629+
deregister_valgrind_stack(old_stk);
630630
if (delete_stack) {
631631
free_stack(old_stk);
632632
A(thread, total_stack_sz == 0, "Stack size should be 0");

branches/try/src/rt/rust_task_thread.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ rust_task_thread::start_main_loop() {
290290

291291
I(this, !extra_c_stack);
292292
if (cached_c_stack) {
293-
unconfig_valgrind_stack(cached_c_stack);
293+
deregister_valgrind_stack(cached_c_stack);
294294
destroy_stack(kernel, cached_c_stack);
295295
cached_c_stack = NULL;
296296
}
@@ -372,14 +372,14 @@ rust_task_thread::prepare_c_stack() {
372372
I(this, !extra_c_stack);
373373
if (!cached_c_stack) {
374374
cached_c_stack = create_stack(kernel, C_STACK_SIZE);
375-
config_valgrind_stack(cached_c_stack);
375+
register_valgrind_stack(cached_c_stack);
376376
}
377377
}
378378

379379
void
380380
rust_task_thread::unprepare_c_stack() {
381381
if (extra_c_stack) {
382-
unconfig_valgrind_stack(extra_c_stack);
382+
deregister_valgrind_stack(extra_c_stack);
383383
destroy_stack(kernel, extra_c_stack);
384384
extra_c_stack = NULL;
385385
}

0 commit comments

Comments
 (0)