[arch-commits] Commit in mono/trunk (PKGBUILD mono_context.patch)

Daniel Isenmann daniel at archlinux.org
Sun Jan 31 12:22:43 UTC 2016


    Date: Sunday, January 31, 2016 @ 13:22:43
  Author: daniel
Revision: 258713

upgpkg: mono 4.2.2.30-2

Fix for FS#47813

Added:
  mono/trunk/mono_context.patch
Modified:
  mono/trunk/PKGBUILD

--------------------+
 PKGBUILD           |    9 +++++---
 mono_context.patch |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-01-31 08:09:27 UTC (rev 258712)
+++ PKGBUILD	2016-01-31 12:22:43 UTC (rev 258713)
@@ -5,7 +5,7 @@
 pkgname=mono
 pkgver=4.2.2.30
 _pkgver=4.2.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Free implementation of the .NET platform including runtime and compiler"
 arch=(i686 x86_64)
 license=('GPL' 'LGPL2.1' 'MPL' 'custom:MITX11')
@@ -19,7 +19,8 @@
         sgen_fix.patch
 	build_fix.patch
 	Microsoft.Portable.Common.targets
-	fix-zlib-helper.patch)
+	fix-zlib-helper.patch
+	mono_context.patch)
 install="${pkgname}.install"
 md5sums=('2c5358041c931b8c1eabf0544565c9a3'
          'b9ef8a65fea497acf176cca16c1e2402'
@@ -26,7 +27,8 @@
          '8a700b94bff7a913f920e95890d2fb4c'
          '30a5af1a4ff50b98f9e73cc2ae554115'
          'acbffadb0ac233c494b40dd5e79209a5'
-         '62912ad289535bf841c140727e5c1165')
+         '62912ad289535bf841c140727e5c1165'
+         '9325e50a3fde354229c507801622b64b')
 
 build() {
   cd "${srcdir}"/${pkgname}-${_pkgver}
@@ -39,6 +41,7 @@
     --disable-quiet-build \
     --disable-system-aot \
     --with-mcs-docs=no 
+  patch -p1 < ../mono_context.patch
   make
 
   # build jay

Added: mono_context.patch
===================================================================
--- mono_context.patch	                        (rev 0)
+++ mono_context.patch	2016-01-31 12:22:43 UTC (rev 258713)
@@ -0,0 +1,54 @@
+From 23e34d77f2fd23ab5d61f6ba4aa905817f57668a Mon Sep 17 00:00:00 2001
+From: Rodrigo Kumpera <kumpera at gmail.com>
+Date: Tue, 22 Sep 2015 15:37:07 -0400
+Subject: [PATCH] [utils] Fix amd64 version of MONO_CONTEXT_GET_CURRENT.
+
+Registers must be saved in MonoContext in the same order as mono_sigctx_to_monoctx.
+
+This caused crashes on linux when unified suspend was enabled.
+---
+ mono/utils/mono-context.h | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/mono/utils/mono-context.h b/mono/utils/mono-context.h
+index a2a0b7e..dc53e85 100644
+--- a/mono/utils/mono-context.h
++++ b/mono/utils/mono-context.h
+@@ -183,11 +183,11 @@ extern void mono_context_get_current (void *);
+ #define MONO_CONTEXT_GET_CURRENT(ctx)	\
+ 	__asm__ __volatile__(	\
+ 		"movq $0x0,  %%nacl:0x00(%%r15, %0, 1)\n"	\
+-		"movq %%rbx, %%nacl:0x08(%%r15, %0, 1)\n"	\
+-		"movq %%rcx, %%nacl:0x10(%%r15, %0, 1)\n"	\
+-		"movq %%rdx, %%nacl:0x18(%%r15, %0, 1)\n"	\
+-		"movq %%rbp, %%nacl:0x20(%%r15, %0, 1)\n"	\
+-		"movq %%rsp, %%nacl:0x28(%%r15, %0, 1)\n"	\
++		"movq %%rcx, %%nacl:0x08(%%r15, %0, 1)\n"	\
++		"movq %%rdx, %%nacl:0x10(%%r15, %0, 1)\n"	\
++		"movq %%rbx, %%nacl:0x18(%%r15, %0, 1)\n"	\
++		"movq %%rsp, %%nacl:0x20(%%r15, %0, 1)\n"	\
++		"movq %%rbp, %%nacl:0x28(%%r15, %0, 1)\n"	\
+ 		"movq %%rsi, %%nacl:0x30(%%r15, %0, 1)\n"	\
+ 		"movq %%rdi, %%nacl:0x38(%%r15, %0, 1)\n"	\
+ 		"movq %%r8,  %%nacl:0x40(%%r15, %0, 1)\n"	\
+@@ -204,14 +204,15 @@ extern void mono_context_get_current (void *);
+ 		: "a" ((int64_t)&(ctx))	\
+ 		: "rdx", "memory")
+ #else
++
+ #define MONO_CONTEXT_GET_CURRENT(ctx)	\
+ 	__asm__ __volatile__(	\
+ 		"movq $0x0,  0x00(%0)\n"	\
+-		"movq %%rbx, 0x08(%0)\n"	\
+-		"movq %%rcx, 0x10(%0)\n"	\
+-		"movq %%rdx, 0x18(%0)\n"	\
+-		"movq %%rbp, 0x20(%0)\n"	\
+-		"movq %%rsp, 0x28(%0)\n"	\
++		"movq %%rcx, 0x08(%0)\n"	\
++		"movq %%rdx, 0x10(%0)\n"	\
++		"movq %%rbx, 0x18(%0)\n"	\
++		"movq %%rsp, 0x20(%0)\n"	\
++		"movq %%rbp, 0x28(%0)\n"	\
+ 		"movq %%rsi, 0x30(%0)\n"	\
+ 		"movq %%rdi, 0x38(%0)\n"	\
+ 		"movq %%r8,  0x40(%0)\n"	\



More information about the arch-commits mailing list