Skip to content

Commit 666081b

Browse files
committed
---
yaml --- r: 6790 b: refs/heads/master c: fe683df h: refs/heads/master v: v3
1 parent a82259c commit 666081b

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 00be34608914681e9a0a14611fc5ced6cffa32ec
2+
refs/heads/master: fe683dfb80498fa3336c6f5f96b6b82917ac08b3

trunk/src/rt/rust_task.cpp

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,15 @@
1515

1616
#include "globals.h"
1717

18-
// Each stack gets some guard bytes that valgrind will verify we don't touch
19-
#ifndef NVALGRIND
20-
#define STACK_NOACCESS_SIZE 16
21-
#else
22-
#define STACK_NOACCESS_SIZE 0
23-
#endif
24-
2518
// The amount of extra space at the end of each stack segment, available
2619
// to the rt, compiler and dynamic linker for running small functions
2720
// FIXME: We want this to be 128 but need to slim the red zone calls down
2821
#ifdef __i386__
29-
#define RED_ZONE_SIZE (65536 + STACK_NOACCESS_SIZE)
22+
#define RED_ZONE_SIZE 65536
3023
#endif
3124

3225
#ifdef __x86_64__
33-
#define RED_ZONE_SIZE (65536 + STACK_NOACCESS_SIZE)
26+
#define RED_ZONE_SIZE 65536
3427
#endif
3528

3629
// Stack size
@@ -80,19 +73,11 @@ config_valgrind_stack(stk_seg *stk) {
8073
// caused valgrind to consider the whole thing inaccessible.
8174
size_t sz = stk->end - (uintptr_t)&stk->data[0];
8275
VALGRIND_MAKE_MEM_UNDEFINED(stk->data, sz);
83-
84-
// Establish some guard bytes so valgrind will tell
85-
// us if we run off the end of the stack
86-
VALGRIND_MAKE_MEM_NOACCESS(stk->data, STACK_NOACCESS_SIZE);
8776
#endif
8877
}
8978

9079
static void
9180
unconfig_valgrind_stack(stk_seg *stk) {
92-
#ifndef NVALGRIND
93-
// Make the guard bytes accessible again, but undefined
94-
VALGRIND_MAKE_MEM_UNDEFINED(stk->data, STACK_NOACCESS_SIZE);
95-
#endif
9681
VALGRIND_STACK_DEREGISTER(stk->valgrind_id);
9782
}
9883

0 commit comments

Comments
 (0)