PERFORCE change 125155 for review
Poul-Henning Kamp
phk at FreeBSD.org
Tue Aug 14 14:34:03 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=125155
Change 125155 by phk at 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:
More information about the p4-projects
mailing list