about summary refs log tree commit diff
path: root/src/test/codegen/stack-alloc-string-slice.cc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-30 16:37:41 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-30 16:37:41 -0700
commit5c8ca26ad7fd6bbe0e7d4f5ddc10a891b2e74512 (patch)
tree35071476a6b4e6b2d4d7899b300cc61d46715bf4 /src/test/codegen/stack-alloc-string-slice.cc
parent4288a08e9a640e2b24d2f5974f6785f0ab82694b (diff)
downloadrust-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