diff options
| author | bors <bors@rust-lang.org> | 2015-11-06 00:56:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-06 00:56:08 +0000 |
| commit | 41308a05203c342ae0899d80b1bc3657de7fec8b (patch) | |
| tree | d68ab0a72705855be5943a891e9b75c708110c8d /src/rustllvm/RustWrapper.cpp | |
| parent | 1dac3adc34a85670d81f86345054ec58e658b68b (diff) | |
| parent | 4b43e07af90558d7d3c0eafd08776909d542b7d7 (diff) | |
| download | rust-41308a05203c342ae0899d80b1bc3657de7fec8b.tar.gz rust-41308a05203c342ae0899d80b1bc3657de7fec8b.zip | |
Auto merge of #29305 - alexcrichton:bad-getenv, r=brson
As discovered in #29298, `env::set_var("", "")` will panic, but it turns out
that it *also* deadlocks on Unix systems. This happens because if a panic
happens while holding the environment lock, we then go try to read
RUST_BACKTRACE, grabbing the environment lock, causing a deadlock.
Specifically, the changes made here are:
* The environment lock is pushed into `std::sys` instead of `std::env`. This
also only puts it in the Unix implementation, not Windows where the functions
are already threadsafe.
* The `std::sys` implementation now returns `io::Result` so panics are
explicitly at the `std::env` level.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
