Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2007 21:34:02 GMT
From:      Poul-Henning Kamp <phk@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 125155 for review
Message-ID:  <200708142134.l7ELY2MK002787@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125155

Change 125155 by phk@phk_critter on 2007/08/14 21:33:36

	
	sysarch(I386_SET_GSBASE)'s argument is a pointer to the address, not
	the address itself.

Affected files ...

.. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-x86-freebsd.c#4 edit

Differences ...

==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-x86-freebsd.c#4 (text+ko) ====

@@ -511,6 +511,7 @@
 PRE(sys_sysarch)
 {
    ThreadState *tst;
+   void **p;
 
    PRINT("sys_sysarch ( %d, %p )", ARG1, ARG2);
    PRE_REG_READ2(int, "sysarch",
@@ -522,9 +523,10 @@
 
       /* On FreeBSD, the syscall loads the %gs selector for us, so do it now. */
       tst = VG_(get_ThreadState)(tid);
+      p = ARG2;
       tst->arch.vex.guest_GS = (2 << 3) | 3;	/* GSEL(GUGS_SEL, SEL_UPL) */
       /* "do" the syscall ourselves; the kernel never sees it */
-      SET_STATUS_from_SysRes( sys_set_thread_area( tid, 2, (void *)ARG2 ) );
+      SET_STATUS_from_SysRes( sys_set_thread_area( tid, 2, *p ) );
 
       break;
    case VKI_I386_GET_GSBASE:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708142134.l7ELY2MK002787>