summaryrefslogtreecommitdiff
path: root/packaging/0001-Fix-a-PAL-spin-lock-issue.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/0001-Fix-a-PAL-spin-lock-issue.patch')
-rw-r--r--packaging/0001-Fix-a-PAL-spin-lock-issue.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/packaging/0001-Fix-a-PAL-spin-lock-issue.patch b/packaging/0001-Fix-a-PAL-spin-lock-issue.patch
new file mode 100644
index 0000000..4064c91
--- /dev/null
+++ b/packaging/0001-Fix-a-PAL-spin-lock-issue.patch
@@ -0,0 +1,24 @@
+From e4d6f871c0c6a2327c16520c2d8146db5c715c17 Mon Sep 17 00:00:00 2001
+From: Koundinya Veluri <kouvel@microsoft.com>
+Date: Wed, 22 Aug 2018 10:55:49 -0700
+Subject: [PATCH] Fix a PAL spin lock issue
+
+Fixes https://github.com/dotnet/coreclr/issues/18486
+- Lock release needs to be at least volatile
+---
+ src/pal/src/synchobj/mutex.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pal/src/synchobj/mutex.cpp b/src/pal/src/synchobj/mutex.cpp
+index d5f4edd110c7..cf329e6101d0 100644
+--- a/src/pal/src/synchobj/mutex.cpp
++++ b/src/pal/src/synchobj/mutex.cpp
+@@ -804,7 +804,7 @@ void SPINLOCKAcquire (LONG * lock, unsigned int flags)
+
+ void SPINLOCKRelease (LONG * lock)
+ {
+- *lock = 0;
++ VolatileStore(lock, 0);
+ }
+
+ DWORD SPINLOCKTryAcquire (LONG * lock)