diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-27 14:34:39 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-28 12:23:01 -0700 |
| commit | 4ef1ec580aaf9f95d66c1654ce942f5e454a0b4d (patch) | |
| tree | 39b600f84688f7e49c734285593fbe9911214cd5 /src/rt/test/rust_test_runtime.cpp | |
| parent | 75985ab75ed216cd8c873c9ef08cd88708f8354f (diff) | |
| download | rust-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/test/rust_test_runtime.cpp')
| -rw-r--r-- | src/rt/test/rust_test_runtime.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rt/test/rust_test_runtime.cpp b/src/rt/test/rust_test_runtime.cpp index 1e7c10944a7..ad5a018eec8 100644 --- a/src/rt/test/rust_test_runtime.cpp +++ b/src/rt/test/rust_test_runtime.cpp @@ -19,7 +19,8 @@ rust_domain_test::worker::run() { bool rust_domain_test::run() { - rust_srv srv; + rust_env env; + rust_srv srv(&env); rust_kernel kernel(&srv, 1); array_list<worker *> workers; @@ -51,7 +52,8 @@ rust_task_test::worker::run() { bool rust_task_test::run() { - rust_srv srv; + rust_env env; + rust_srv srv(&env); rust_kernel kernel(&srv, 1); array_list<worker *> workers; |
