diff options
| author | benaryorg <binary@benary.org> | 2019-03-03 15:21:52 +0100 |
|---|---|---|
| committer | benaryorg <binary@benary.org> | 2019-03-03 20:53:50 +0100 |
| commit | 2293d2260a382146fe5ea62ce91580ad7a31178d (patch) | |
| tree | 2b8e0151321cc14443046e40859cdeaa93de03ac /src/rustllvm/RustWrapper.cpp | |
| parent | f565cdd6144a72dc81032081d7790f38a4af26b8 (diff) | |
| download | rust-2293d2260a382146fe5ea62ce91580ad7a31178d.tar.gz rust-2293d2260a382146fe5ea62ce91580ad7a31178d.zip | |
race condition in thread local storage example
The example had a potential race condition that would still pass the test. If the thread which was supposed to modify it's own thread local was slower than the instruction to modify in the main thread, then the test would pass even in case of a failure. This is would be minor if the child thread was waited for since it check using an `assert_eq` for the same thing, but vice versa. However, if the `assert_eq` failed this would trigger a panic, which is not at all caught by the example since the thread is not waited on. Signed-off-by: benaryorg <binary@benary.org>
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
