about summary refs log tree commit diff
path: root/src/test/codegen/stack-alloc-string-slice.cc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-05-02 02:48:53 +0000
committerbors <bors@rust-lang.org>2015-05-02 02:48:53 +0000
commitb858b7f4ced2acaabcf1d0f59abd4a0c4a62ded3 (patch)
tree1532e270de8b5ddf71a9dd072fe2348dd031e5a7 /src/test/codegen/stack-alloc-string-slice.cc
parentc42c1e7a678a27bb63c24fb1eca2866af4e3ab7a (diff)
parent5c8ca26ad7fd6bbe0e7d4f5ddc10a891b2e74512 (diff)
downloadrust-b858b7f4ced2acaabcf1d0f59abd4a0c4a62ded3.tar.gz
rust-b858b7f4ced2acaabcf1d0f59abd4a0c4a62ded3.zip
Auto merge of #25015 - alexcrichton:rwlock-check-ret, r=aturon
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