rt: Add RUST_DEBUG_MEM to rust_env to avoid races

This commit is contained in:
Brian Anderson
2013-03-12 12:23:24 -07:00
parent ebba8b4e35
commit 63d18658c1
7 changed files with 63 additions and 7 deletions

View File

@@ -23,6 +23,7 @@
#define DETAILED_LEAKS "DETAILED_LEAKS"
#define RUST_SEED "RUST_SEED"
#define RUST_POISON_ON_FREE "RUST_POISON_ON_FREE"
#define RUST_DEBUG_MEM "RUST_DEBUG_MEM"
#if defined(__WIN32__)
static int
@@ -128,6 +129,7 @@ load_env(int argc, char **argv) {
env->poison_on_free = getenv(RUST_POISON_ON_FREE) != NULL;
env->argc = argc;
env->argv = argv;
env->debug_mem = getenv(RUST_DEBUG_MEM) != NULL;
return env;
}