diff options
author | Konstantin Baladurin <k.baladurin@samsung.com> | 2019-08-26 16:27:23 +0900 |
---|---|---|
committer | Konstantin Baladurin <k.baladurin@samsung.com> | 2019-08-26 16:46:46 +0900 |
commit | 3779e440c80190d416f91e3f423b590ddf691fa3 (patch) | |
tree | 2dbecc7c715c136a7db9db1b1d5e2370f003ba57 | |
parent | 399653b670d9e14c47cef78c7e4dcdc369f66ed7 (diff) | |
download | coreclr-tizen_4.0_tv.tar.gz coreclr-tizen_4.0_tv.tar.bz2 coreclr-tizen_4.0_tv.zip |
Port 'Fix a PAL spin lock issue'tizen_4.0_tv
https://github.com/dotnet/coreclr/pull/19606
This patch can solve double free issue.
Change-Id: I66948a6b6cbec0f5f79bdae1ff92e09c254e82e0
-rw-r--r-- | packaging/0001-Fix-a-PAL-spin-lock-issue.patch | 24 | ||||
-rw-r--r-- | packaging/coreclr.spec | 4 |
2 files changed, 27 insertions, 1 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 0000000000..4064c912ba --- /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) diff --git a/packaging/coreclr.spec b/packaging/coreclr.spec index e902cdb3a3..894a4c62de 100644 --- a/packaging/coreclr.spec +++ b/packaging/coreclr.spec @@ -23,7 +23,7 @@ Source1000: downloaded_files.tar.gz Source1001: %{name}.manifest Source1002: libicu.tar.gz Source1003: dep_libs.tar.gz -# Gbp-Ignore-Patches: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 +# Gbp-Ignore-Patches: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 Patch0: 0001-Add-project.assets.json-files.patch Patch1: 0001-ARM-Linux-Support-unaligned-struct-read-write-11290.patch Patch2: 0002-x86-Linux-Thread-safe-UMThunkMarshInfo-RunTimeInit-1.patch @@ -70,6 +70,7 @@ Patch42: 0001-Fix-build-with-Asan-15372.patch Patch43: 0002-Fix-asan-false-positive-errors-15563.patch Patch44: 0003-ThrowExceptionFromContextInternal-RtlCaptureContext-.patch Patch45: 0004-ExecuteHandlerOnOriginalStack-handle-case-when-it-is.patch +Patch46: 0001-Fix-a-PAL-spin-lock-issue.patch ExcludeArch: aarch64 @@ -214,6 +215,7 @@ cp %{SOURCE1001} . %patch43 -p1 %patch44 -p1 %patch45 -p1 +%patch46 -p1 %if 0%{skipmscorlib} %else |