Fix concurrency issues in the regression test b426654 (#2211)
authorTomáš Rylek <trylek@microsoft.com>
Mon, 27 Jan 2020 22:04:44 +0000 (23:04 +0100)
committerGitHub <noreply@github.com>
Mon, 27 Jan 2020 22:04:44 +0000 (23:04 +0100)
commit1ce5ec8a9a6f02a8f922aa6f8e3c23358f069e7c
tree1941f29bd2c81f8decf07e7df321f6eb9f075448
parent992a295f631f40508cd54f48010ebe9553fadd6b
Fix concurrency issues in the regression test b426654 (#2211)

After fixing the interruptible ranges by aligning intrinsics
inlined by Crossgen1 / 2 I have verified that the concurrency and
rooting fixes suggested by Kount finally fix the Crossgen2 build
of the test. I have made the following changes:

1) I have shortened the test to 5 seconds and I changed the add
instruction to xor so that the test cannot randomly start
overflowing again on some future faster HW.

2) I have changed the synchronization static s_timeUp to a volatile.
This probably doesn't matter on Intel but will most likely matter
a lot on ARM.

3) I have added a call to Dispose for the timeout timer to make
sure it remains rooted for the duration of the test.

Thanks

Tomas
src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b426654/b426654.il