summaryrefslogtreecommitdiff
path: root/tests/src
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2017-03-09 14:40:21 -0800
committerPat Gavlin <pagavlin@microsoft.com>2017-03-09 14:40:21 -0800
commit84d5151162a5f50ec06d14a9b3e7c98eea809c19 (patch)
tree12b31e8fe2e4b615bd64c916a67afa2cb753f1fc /tests/src
parent3b36244d78c244b137205b8e81be7346600e7c81 (diff)
downloadcoreclr-84d5151162a5f50ec06d14a9b3e7c98eea809c19.tar.gz
coreclr-84d5151162a5f50ec06d14a9b3e7c98eea809c19.tar.bz2
coreclr-84d5151162a5f50ec06d14a9b3e7c98eea809c19.zip
Fix some cross-thread memory accesses in a JIT test.
This test was concurrently accessing shared memory without using appropriate volatile accesses. This change adds the `volatile.` prefix where necessary. There is a slim change that this will fix #10022.
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/JIT/Methodical/Boxing/misc/concurgc.il3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/src/JIT/Methodical/Boxing/misc/concurgc.il b/tests/src/JIT/Methodical/Boxing/misc/concurgc.il
index ad0abb190e..a497b97446 100644
--- a/tests/src/JIT/Methodical/Boxing/misc/concurgc.il
+++ b/tests/src/JIT/Methodical/Boxing/misc/concurgc.il
@@ -27,6 +27,7 @@
IL_0002: call void [mscorlib]System.GC::Collect()
ldc.i4 100
call void [mscorlib]System.Threading.Thread::Sleep(int32)
+ volatile.
ldsfld bool Test.App::signal
brfalse.s IL_0002
ret
@@ -54,6 +55,7 @@
IL_0014: newobj instance void [mscorlib]System.Threading.Thread::.ctor(class [mscorlib]System.Threading.ThreadStart)
IL_0019: stloc.2
ldc.i4.0
+ volatile.
stsfld bool Test.App::signal
IL_001a: ldloc.2
IL_001b: call instance void [mscorlib]System.Threading.Thread::Start()
@@ -137,6 +139,7 @@
IL_00bf: blt IL_0041
IL_00c1: ldc.i4.1
+ volatile.
IL_00c2: stsfld bool Test.App::signal
IL_00c7: ldstr "**** PASSED ****"
IL_00cc: call void [System.Console]System.Console::WriteLine(class System.String)