From: Philippe Waroquiers Date: Sun, 21 Oct 2012 21:49:33 +0000 (+0000) Subject: Follow-up to sys_ipc restructuration X-Git-Tag: svn/VALGRIND_3_9_0~589 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e344ae06dd35d9c39e3b79244fbcc914c1929844;p=thirdparty%2Fvalgrind.git Follow-up to sys_ipc restructuration Rev 13078 removed a PRE call (for SEMCTL) in the POST(sys_ipc). This commit adds the correct POST call for SEMCTL in POST(sys_ipc). (note: some tests are missing in this area, as removing PRE and adding POST did not cause any test result to change). This is the last patch to restructure the sys_ipc code. After this patch, should be able to do the real fix for 23837 (semctl GETVAL false positive) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13079 --- diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 28a12b4377..afd4c2e6fc 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -3303,7 +3303,8 @@ static Addr deref_Addr ( ThreadId tid, Addr a, Char* s ) PRE(sys_ipc) { - PRINT("sys_ipc ( %ld, %ld, %ld, %ld, %#lx, %ld )", ARG1,ARG2,ARG3,ARG4,ARG5,ARG6); + PRINT("sys_ipc ( %ld, %ld, %ld, %ld, %#lx, %ld )", + ARG1,ARG2,ARG3,ARG4,ARG5,ARG6); // XXX: this is simplistic -- some args are not used in all circumstances. PRE_REG_READ6(int, "ipc", vki_uint, call, int, first, int, second, int, third, @@ -3387,8 +3388,13 @@ POST(sys_ipc) switch (ARG1 /* call */) { case VKI_SEMOP: case VKI_SEMGET: + break; case VKI_SEMCTL: + { + UWord arg = deref_Addr( tid, ARG5, "semctl(arg)" ); + ML_(generic_POST_sys_semctl)( tid, RES, ARG2, ARG3, ARG4, arg ); break; + } case VKI_SEMTIMEDOP: case VKI_MSGSND: break;