about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-06-17 17:38:03 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-06-17 17:38:03 -0700
commitfcd99aae0a6312ecd79ce3e814a54c6c1373f165 (patch)
treeb2b761274cd7954838a0ecf87ff146ba0aa7926b /src/libstd/sys/unix/stack_overflow.rs
parent8af39cebc547a946b4ae861854c46c9c9a70a923 (diff)
downloadrust-fcd99aae0a6312ecd79ce3e814a54c6c1373f165.tar.gz
rust-fcd99aae0a6312ecd79ce3e814a54c6c1373f165.zip
rustc_driver: Frob the global PATH less
Environment variables are global state so this can lead to surprising results if
the driver is called in a multithreaded environment (e.g. doctests). There
shouldn't be any memory corruption that's possible, but a lot of the bots have
been failing because they can't find `cc` or `gcc` in the path during doctests,
and I highly suspect that it is due to the compiler modifying `PATH` in a
multithreaded fashion.

This commit moves the logic for appending to `PATH` to only affect the child
process instead of also affecting the parent, at least for the linking stage.
When loading dynamic libraries the compiler still modifies `PATH` on Windows,
but this may be more difficult to fix than spawning off a new process.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions