diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-30 16:37:41 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-30 16:37:41 -0700 |
| commit | 5c8ca26ad7fd6bbe0e7d4f5ddc10a891b2e74512 (patch) | |
| tree | 35071476a6b4e6b2d4d7899b300cc61d46715bf4 /src/test/codegen/stack-alloc-string-slice.cc | |
| parent | 4288a08e9a640e2b24d2f5974f6785f0ab82694b (diff) | |
| download | rust-5c8ca26ad7fd6bbe0e7d4f5ddc10a891b2e74512.tar.gz rust-5c8ca26ad7fd6bbe0e7d4f5ddc10a891b2e74512.zip | |
std: Always check for EDEADLK in rwlocks on unix
Apparently implementations are allowed to return EDEADLK instead of blocking forever, in which case this can lead to unsafety in the `RwLock` primitive exposed by the standard library. A debug-build of the standard library would have caught this error (due to the debug assert), but we don't ship debug builds right now. This commit adds explicit checks for the EDEADLK error code and triggers a panic to ensure the call does not succeed. Closes #25012
Diffstat (limited to 'src/test/codegen/stack-alloc-string-slice.cc')
0 files changed, 0 insertions, 0 deletions
