about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-02-15 15:54:29 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-02-15 15:54:29 -0800
commitbea7862d9470c33b7b3e21a552a991e3b948aa29 (patch)
tree3ef409c5db1b192e4a79be224c2cc4600c896ec4 /src/rustllvm/RustWrapper.cpp
parent836ffb528883225e036e506b3a8f112d81e096ff (diff)
downloadrust-bea7862d9470c33b7b3e21a552a991e3b948aa29.tar.gz
rust-bea7862d9470c33b7b3e21a552a991e3b948aa29.zip
Correctly reset steals when hitting MAX_STEALS
The previous code erroneously assumed that 'steals > cnt' was always true, but
that was a false assumption. The code was altered to decrement steals to a
minimum of 0 instead of taking all of cnt into account.

I didn't include the exact test from #12295 because it could run for quite
awhile, and instead set the threshold for MAX_STEALS to much lower during
testing. I found that this triggered the old bug quite frequently when running
without this fix.

Closes #12295
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions