• Leszek Swirski's avatar
    [test] Robustify wait in regress-bug-9161 · 70a0baaa
    Leszek Swirski authored
    mjsunit/regress/regress-crbug-9161 had two spinlocks on an atomic:
    
      1. WaitUntil(lock == kStageRunning)
      2. WaitUntil(lock == kStageDone)
    
    But, in theory the worker updating the "lock" could progress all the way
    to kStageDone before the first loop manages to check the lock value
    again.
    
    We can make this more robust by checking:
    
      1. WaitUntil(lock != kStageInit)
      2. WaitUntil(lock == kStageDone)
    
    That way both loops check for _any_ state past the state they want to
    progress past.
    
    Bug: v8:11437
    Change-Id: I5220e61070a305301c678928edb0925c04dae970
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3231339
    Auto-Submit: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#77460}
    70a0baaa
Name
Last commit
Last update
..
benchmarks Loading commit data...
bigint Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
debugging Loading commit data...
fuzzer Loading commit data...
fuzzilli Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...