[Bug 202766] devel/valgrind: unhandled sysarch cmd 132 (AMD64_GET_XFPUSTATE)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Aug 31 07:41:57 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202766

--- Comment #2 from Julien Nadeau <vedge at hypertriton.com> ---
Comment on attachment 160513
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=160513
Quick workaround

>Index: devel/valgrind/files/patch-coregrind_m_syswrap_syswrap_amd64_freebsd_c
>===================================================================
>--- devel/valgrind/files/patch-coregrind_m_syswrap_syswrap_amd64_freebsd_c	(revision 0)
>+++ devel/valgrind/files/patch-coregrind_m_syswrap_syswrap_amd64_freebsd_c	(working copy)
>@@ -0,0 +1,12 @@
>+--- coregrind/m_syswrap/syswrap-amd64-freebsd.c.orig	2015-08-30 00:08:54.235669000 -0300
>++++ coregrind/m_syswrap/syswrap-amd64-freebsd.c	2015-08-30 00:18:12.597607000 -0300
>+@@ -691,6 +691,16 @@
>+       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:
>++      PRINT("sys_amd64_get_xfpustate ( %#lx )", ARG2);
>++      PRE_REG_READ1(int, "amd64_get_xfpustate", void *, basep)
>++      PRE_MEM_WRITE( "amd64_get_xfpustate(basep)", ARG2, sizeof(void *) );
>++      
>++      /* "do" the syscall ourselves; the kernel never sees it */
>++      tst = VG_(get_ThreadState)(tid);
>++      SET_STATUS_Success2( tst->arch.vex.guest_FPTAG[0], tst->arch.vex.guest_FPTAG[0] );
>++      POST_MEM_WRITE( ARG2, sizeof(void *) );
>++      break;
>+    default:
>+       VG_(message) (Vg_UserMsg, "unhandled sysarch cmd %ld", ARG1);
>+       VG_(unimplemented) ("unhandled sysarch cmd");
>
>Index: devel/valgrind/files/patch-include__vki__vki-freebsd.h
>===================================================================
>--- devel/valgrind/files/patch-include__vki__vki-freebsd.h	(revision 395557)
>+++ devel/valgrind/files/patch-include__vki__vki-freebsd.h	(working copy)
>@@ -8,3 +8,17 @@
>  #include <netinet/tcp.h>
>  
>  #define VKI_TCP_NODELAY  TCP_NODELAY
>+@@ -1888,11 +1889,13 @@
>+ #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
>+ 
>+ //----------------------------------------------------------------------
>+ // From sys/module.h

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list