about summary refs log tree commit diff
path: root/src/rt/rust_scheduler.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-07-27 14:34:39 -0700
committerBrian Anderson <banderson@mozilla.com>2011-07-28 12:23:01 -0700
commit4ef1ec580aaf9f95d66c1654ce942f5e454a0b4d (patch)
tree39b600f84688f7e49c734285593fbe9911214cd5 /src/rt/rust_scheduler.cpp
parent75985ab75ed216cd8c873c9ef08cd88708f8354f (diff)
downloadrust-4ef1ec580aaf9f95d66c1654ce942f5e454a0b4d.tar.gz
rust-4ef1ec580aaf9f95d66c1654ce942f5e454a0b4d.zip
Do all runtime calls to getenv at initialization
getenv is not threadsafe and (maybe as a result) it's randomly crashing with
CFLAGS=-g and RUST_THREADS=32. Calls from rust code are still on their
own.
Diffstat (limited to 'src/rt/rust_scheduler.cpp')
-rw-r--r--src/rt/rust_scheduler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rt/rust_scheduler.cpp b/src/rt/rust_scheduler.cpp
index 245ee3d5fce..c4987bbd3f1 100644
--- a/src/rt/rust_scheduler.cpp
+++ b/src/rt/rust_scheduler.cpp
@@ -20,7 +20,9 @@ rust_scheduler::rust_scheduler(rust_kernel *kernel,
     cache(this),
     kernel(kernel),
     message_queue(message_queue),
-    id(id)
+    id(id),
+    min_stack_size(kernel->env->min_stack_size),
+    env(kernel->env)
 {
     LOGPTR(this, "new dom", (uintptr_t)this);
     isaac_init(this, &rctx);