aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authordemon <demon@FreeBSD.org>2015-11-13 21:35:02 +0800
committerdemon <demon@FreeBSD.org>2015-11-13 21:35:02 +0800
commit044a007ff7747a273cb24fbcbdc997465f2ffcee (patch)
tree794caf53420b0c53e1a164d73008f3cf0f451e10 /devel
parentb447a67e341d5f5c3d35200dd0b9d3f93ce87bec (diff)
downloadfreebsd-ports-gnome-044a007ff7747a273cb24fbcbdc997465f2ffcee.tar.gz
freebsd-ports-gnome-044a007ff7747a273cb24fbcbdc997465f2ffcee.tar.zst
freebsd-ports-gnome-044a007ff7747a273cb24fbcbdc997465f2ffcee.zip
Add a patch for "unhandled sysarch cmd 132" error.
PR: 202766 Submitted by: Julien Nadeau <vedge@hypertriton.com>
Diffstat (limited to 'devel')
-rw-r--r--devel/valgrind/Makefile2
-rw-r--r--devel/valgrind/files/patch-coregrind-m_syswrap-syswrap-amd64-freebsd.c30
-rw-r--r--devel/valgrind/files/patch-include__vki__vki-freebsd.h30
3 files changed, 58 insertions, 4 deletions
diff --git a/devel/valgrind/Makefile b/devel/valgrind/Makefile
index f48e94bca1aa..4f0d7aaa1eac 100644
--- a/devel/valgrind/Makefile
+++ b/devel/valgrind/Makefile
@@ -4,7 +4,7 @@
PORTNAME= valgrind
DISTVERSIONPREFIX= freebsd-
PORTVERSION= 3.10.0.20150126
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= devel
MASTER_SITES= https://bitbucket.org/${BB_ACCOUNT}/${BB_PROJECT}/get/${BB_COMMIT}.tar.gz?dummy=/ \
diff --git a/devel/valgrind/files/patch-coregrind-m_syswrap-syswrap-amd64-freebsd.c b/devel/valgrind/files/patch-coregrind-m_syswrap-syswrap-amd64-freebsd.c
new file mode 100644
index 000000000000..85a6913d4686
--- /dev/null
+++ b/devel/valgrind/files/patch-coregrind-m_syswrap-syswrap-amd64-freebsd.c
@@ -0,0 +1,30 @@
+--- coregrind/m_syswrap/syswrap-amd64-freebsd.c.orig 2015-01-26 16:17:32.000000000 -0400
++++ coregrind/m_syswrap/syswrap-amd64-freebsd.c 2015-08-31 09:51:17.506396000 -0300
+@@ -691,6 +691,27 @@
+ SET_STATUS_Success2( tst->arch.vex.guest_FS_ZERO, tst->arch.vex.guest_RDX );
+ POST_MEM_WRITE( ARG2, sizeof(void *) );
+ break;
++ case VKI_AMD64_GET_XFPUSTATE:
++ {
++ UChar fpuState[160];
++ struct vki_amd64_get_xfpustate *xfs = (struct vki_amd64_get_xfpustate *)ARG2;
++ int fpuSaveLen;
++
++ PRINT("sys_amd64_get_xfpustate ( %#lx, %d )", (long unsigned int)xfs->addr, xfs->len);
++ tst = VG_(get_ThreadState)(tid);
++
++ if (xfs->len <= sizeof(fpuState)) {
++ amd64g_dirtyhelper_FXSAVE_ALL_EXCEPT_XMM(
++ (VexGuestAMD64State *)&tst->arch.vex,
++ (HWord)fpuState);
++ VG_(memcpy)(xfs->addr, fpuState, xfs->len);
++ POST_MEM_WRITE( xfs->addr, xfs->len );
++ SET_STATUS_Success ( 0 );
++ } else {
++ SET_STATUS_Failure( VKI_EINVAL );
++ }
++ }
++ break;
+ default:
+ VG_(message) (Vg_UserMsg, "unhandled sysarch cmd %ld", ARG1);
+ VG_(unimplemented) ("unhandled sysarch cmd");
diff --git a/devel/valgrind/files/patch-include__vki__vki-freebsd.h b/devel/valgrind/files/patch-include__vki__vki-freebsd.h
index 47d6ba229de7..32d1baaff0a4 100644
--- a/devel/valgrind/files/patch-include__vki__vki-freebsd.h
+++ b/devel/valgrind/files/patch-include__vki__vki-freebsd.h
@@ -1,6 +1,6 @@
---- ./include/vki/vki-freebsd.h.orig 2014-02-08 15:00:31.591069799 -0600
-+++ ./include/vki/vki-freebsd.h 2014-02-08 15:00:39.993068845 -0600
-@@ -681,6 +681,7 @@
+--- include/vki/vki-freebsd.h.orig 2015-01-26 16:17:32.000000000 -0400
++++ include/vki/vki-freebsd.h 2015-08-31 04:55:29.139189000 -0300
+@@ -684,6 +684,7 @@
#define VKI_SOCK_STREAM 1
@@ -8,3 +8,27 @@
#include <netinet/tcp.h>
#define VKI_TCP_NODELAY TCP_NODELAY
+@@ -1888,11 +1889,23 @@
+ #define VKI_I386_SET_FSBASE 8
+ #define VKI_I386_GET_GSBASE 9
+ #define VKI_I386_SET_GSBASE 10
++#define VKI_I386_SET_XFPUSTATE 11
+
+ #define VKI_AMD64_GET_FSBASE 128
+ #define VKI_AMD64_SET_FSBASE 129
+ #define VKI_AMD64_GET_GSBASE 130
+ #define VKI_AMD64_SET_GSBASE 131
++#define VKI_AMD64_GET_XFPUSTATE 132
++
++typedef struct vki_i386_get_xfpustate {
++ unsigned int addr;
++ int len;
++};
++
++typedef struct vki_amd64_get_xfpustate {
++ void *addr;
++ int len;
++};
+
+ //----------------------------------------------------------------------
+ // From sys/module.h