From: Ivo Raisr Date: Thu, 16 Feb 2017 18:29:46 +0000 (+0000) Subject: Solaris: Add syscall wrapper for fast trap getlgrp(6) X-Git-Tag: svn/VALGRIND_3_13_0~194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=804686fc2cb0598459c52093a69780ba5f0a88fe;p=thirdparty%2Fvalgrind.git Solaris: Add syscall wrapper for fast trap getlgrp(6) Fixes BZ#376518. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16227 --- diff --git a/NEWS b/NEWS index 8764802ed8..d48f1a99d3 100644 --- a/NEWS +++ b/NEWS @@ -115,6 +115,7 @@ where XXXXXX is the bug number as listed below. for ML_(find_rx_mapping)() 375806 Test helgrind/tests/tc22_exit_w_lock fails with glibc 2.24 376455 Solaris: unhandled syscall lgrpsys(180) +376518 Solaris: unhandled fast trap getlgrp(6) Release 3.12.0 (20 October 2016) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 48fa72b3d3..b5a1f74eca 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -1076,6 +1076,7 @@ DECL_TEMPLATE(solaris, sys_umount2); DECL_TEMPLATE(solaris, fast_gethrtime); DECL_TEMPLATE(solaris, fast_gethrvtime); DECL_TEMPLATE(solaris, fast_gethrestime); +DECL_TEMPLATE(solaris, fast_getlgrp); #if defined(SOLARIS_GETHRT_FASTTRAP) DECL_TEMPLATE(solaris, fast_gethrt); #endif /* SOLARIS_GETHRT_FASTTRAP */ @@ -10674,6 +10675,13 @@ PRE(fast_gethrestime) PRE_REG_READ0(long, "gethrestime"); } +PRE(fast_getlgrp) +{ + /* Fasttrap number shared between gethomelgroup() and getcpuid(). */ + PRINT("fast_getlgrp ( )"); + PRE_REG_READ0(long, "getlgrp"); +} + #if defined(SOLARIS_GETHRT_FASTTRAP) PRE(fast_gethrt) { @@ -11011,7 +11019,8 @@ static SyscallTableEntry syscall_table[] = { static SyscallTableEntry fasttrap_table[] = { SOLX_(__NR_gethrtime, fast_gethrtime), /* 3 */ SOLX_(__NR_gethrvtime, fast_gethrvtime), /* 4 */ - SOLX_(__NR_gethrestime, fast_gethrestime) /* 5 */ + SOLX_(__NR_gethrestime, fast_gethrestime), /* 5 */ + SOLX_(__NR_getlgrp, fast_getlgrp) /* 6 */ #if defined(SOLARIS_GETHRT_FASTTRAP) , SOLXY(__NR_gethrt, fast_gethrt) /* 7 */ diff --git a/include/vki/vki-scnums-solaris.h b/include/vki/vki-scnums-solaris.h index 4422bd401f..eaabe657cd 100644 --- a/include/vki/vki-scnums-solaris.h +++ b/include/vki/vki-scnums-solaris.h @@ -28,7 +28,7 @@ The GNU General Public License is contained in the file COPYING. */ -/* Copyright 2013-2016, Ivo Raisr . */ +/* Copyright 2013-2017, Ivo Raisr . */ /* Copyright 2013, OmniTI Computer Consulting, Inc. All rights reserved. */ @@ -353,10 +353,8 @@ VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRVTIME) #define __NR_gethrestime \ VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRESTIME) -/* #define __NR_getlgrp \ VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETLGRP) -*/ #if defined(SOLARIS_GETHRT_FASTTRAP) #define __NR_gethrt \ VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRT)