You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(11) |
|
2
|
3
|
4
|
5
(4) |
6
(21) |
7
(14) |
8
(14) |
|
9
(16) |
10
(19) |
11
(18) |
12
(17) |
13
(14) |
14
(21) |
15
(15) |
|
16
(10) |
17
(7) |
18
(15) |
19
(20) |
20
(20) |
21
(14) |
22
(7) |
|
23
(2) |
24
(8) |
25
(15) |
26
(11) |
27
(6) |
28
(10) |
|
|
From: <sv...@va...> - 2014-02-24 21:01:24
|
Author: cborntra
Date: Mon Feb 24 21:01:14 2014
New Revision: 13838
Log:
This fixes the shadow validity setup of SP,IA and FPC. The current
code misses a char * cast and thus uses a wrong pointer for memset.
This resulted in corruptions of a thread state for multi threaded
programs. After vex: r2818 the memset did overwrite the tid value
of a thread, making this bug visible.
Lets use the c structures instead of pointer arithmetics.
Modified:
trunk/NEWS
trunk/coregrind/m_initimg/initimg-linux.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Feb 24 21:01:14 2014
@@ -63,6 +63,7 @@
331337 s390x WARNING: unhandled syscall: 326 (dup3)
331380 Syscall param timer_create(evp) points to uninitialised byte(s)
n-i-bz Fix KVM_CREATE_IRQCHIP ioctl handling
+n-i-bz s390x: Fix memory corruption for multithreaded applications
Release 3.9.0 (31 October 2013)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: trunk/coregrind/m_initimg/initimg-linux.c
==============================================================================
--- trunk/coregrind/m_initimg/initimg-linux.c (original)
+++ trunk/coregrind/m_initimg/initimg-linux.c Mon Feb 24 21:01:14 2014
@@ -1078,9 +1078,9 @@
VG_(memset)(&arch->vex_shadow1, 0xFF, sizeof(VexGuestS390XState));
VG_(memset)(&arch->vex_shadow2, 0x00, sizeof(VexGuestS390XState));
/* ... except SP, FPC, and IA */
- VG_(memset)(&arch->vex_shadow1 + VG_O_STACK_PTR, 0x00, 8);
- VG_(memset)(&arch->vex_shadow1 + VG_O_FPC_REG, 0x00, 4);
- VG_(memset)(&arch->vex_shadow1 + VG_O_INSTR_PTR, 0x00, 8);
+ arch->vex_shadow1.guest_SP = 0;
+ arch->vex_shadow1.guest_fpc = 0;
+ arch->vex_shadow1.guest_IA = 0;
/* Put essential stuff into the new state. */
arch->vex.guest_SP = iifii.initial_client_SP;
|
|
From: Christian B. <bor...@de...> - 2014-02-24 20:54:10
|
On 19/02/14 17:38, Florian Krohm wrote:
> On 02/19/2014 12:11 PM, Maran Pakkirisamy wrote:
>
>> The test case fails from VEX r2818. Also the failure is not happening
>> always. Sometimes the testcase passes.
>> If I revert the changes in trunk/pub/libvex_guest_s390x.h, the testcase
>> passes all the time.
>
> Reverting r2818 is not exactly what we want as the problem is s390x
> specific. Can you add this assert somewhere
>
> vassert(sizeof(VexGuestS390XState) == 432);
>
> and see whether it fires? 432 is the expected size of the guest state
> but there is some trickery with a [0] array at the end of the guest
> state. This *should* work according to my reading of the docs but who knows.
The problem is fixed by the following code.
===================================================================
--- coregrind/m_initimg/initimg-linux.c (revision 13837)
+++ coregrind/m_initimg/initimg-linux.c (working copy)
@@ -1078,9 +1078,9 @@
VG_(memset)(&arch->vex_shadow1, 0xFF, sizeof(VexGuestS390XState));
VG_(memset)(&arch->vex_shadow2, 0x00, sizeof(VexGuestS390XState));
/* ... except SP, FPC, and IA */
- VG_(memset)(&arch->vex_shadow1 + VG_O_STACK_PTR, 0x00, 8);
- VG_(memset)(&arch->vex_shadow1 + VG_O_FPC_REG, 0x00, 4);
- VG_(memset)(&arch->vex_shadow1 + VG_O_INSTR_PTR, 0x00, 8);
+ arch->vex_shadow1.guest_SP = 0;
+ arch->vex_shadow1.guest_fpc = 0;
+ arch->vex_shadow1.guest_IA = 0;
/* Put essential stuff into the new state. */
arch->vex.guest_SP = iifii.initial_client_SP;
My current understanding is:
The pointer arithmetic is wrong. So we zeroed out 20 bytes somewhere else
in the VG_(threads) array. With the last changes we hit the tid field, causing
the assert to trigger.
Christian
|
|
From: Petr P. <se...@da...> - 2014-02-24 19:54:01
|
On 19. úno 14 19:42, Lionel Cons wrote: > On 24 May 2012 04:33, Lionel Cons <lio...@go...> wrote: > > On Thu, Sep 8, 2011 at 10:57 PM, Petr Pavlu <se...@da...> wrote: > >> Hello, > >> > >> I would like to inform the list that I started working on a port > >> of Valgrind to Solaris OS. The port aims at x86 architecture and > >> recent Solaris versions (i.e. SunOS 5.11 kernel). Code lives > >> at [1] but it currently doesn't do much. I'm sending this email > >> to make sure nobody already works on it. > >> > >> [1] https://bitbucket.org/setupji/valgrind-solaris > > > > Petr, what's the current status of valgrind on solaris? Is both 32bit > > and 64bit x86 supported? Are you going to support SPARC64? > > Are there any major updates since May 2012? Are you planning to > support the (open-)solaris fork "Illumos" [http://www.illumos.org]? Hello Lionel, There were many changes since May 2012. We added new syscall wrappers, support for the door syscall, coredump support, gdbserver was enabled and many bugs were fixed. Yes, illumos is supported. Petr |
|
From: Florian K. <fl...@ei...> - 2014-02-24 15:14:04
|
On 02/24/2014 03:26 PM, Roland Mainz wrote: > On Mon, Feb 24, 2014 at 11:02 AM, Julian Seward <js...@ac...> wrote: > > Just curious: > Does valgrind have 128bit floating-point support somewhere? If "yes" > ... could core parts of it be adopted/"dumbed down" to do some of the > 80bit parts ? The s390 port supports 128-bit floating point. You could look at that for how it is integrated. But it won't buy you much otherwise. The problem with this task is not that it is difficult. The issue is that it is mostly busy work and the testing part is as unsexy as it is important. Maybe somebody with ties into Intel or AMD can convince them to sponsor a person to do the work.... Florian |
|
From: <sv...@va...> - 2014-02-24 15:09:35
|
Author: mjw
Date: Mon Feb 24 15:09:21 2014
New Revision: 13837
Log:
BZ#331380 cont. Don't crash if evp->sigev_notify is invalid. Fix scalar test.
We check evp.sigev_notify_thread_id only if evp->sigev_notify has
SIGEV_THREAD_ID set. But before checking we need to make sure accessing
evp->sigev_notify is valid.
Fix memcheck/tests/x86-linux/scalar.stderr.exp output.
We now produce separate warnings for the 3 different fields.
Modified:
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/memcheck/tests/x86-linux/scalar.stderr.exp
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c Mon Feb 24 15:09:21 2014
@@ -2183,7 +2183,8 @@
sizeof(int) );
PRE_MEM_READ( "timer_create(evp.sigev_notify)", (Addr)&evp->sigev_notify,
sizeof(int) );
- if ((evp->sigev_notify & VKI_SIGEV_THREAD_ID) != 0)
+ if (ML_(safe_to_deref)(&evp->sigev_notify, sizeof(int))
+ && (evp->sigev_notify & VKI_SIGEV_THREAD_ID) != 0)
PRE_MEM_READ( "timer_create(evp.sigev_notify_thread_id)",
(Addr)&evp->vki_sigev_notify_thread_id, sizeof(int) );
}
Modified: trunk/memcheck/tests/x86-linux/scalar.stderr.exp
==============================================================================
--- trunk/memcheck/tests/x86-linux/scalar.stderr.exp (original)
+++ trunk/memcheck/tests/x86-linux/scalar.stderr.exp Mon Feb 24 15:09:21 2014
@@ -3602,7 +3602,17 @@
...
by 0x........: main (scalar.c:1158)
-Syscall param timer_create(evp) points to unaddressable byte(s)
+Syscall param timer_create(evp.sigev_value) points to unaddressable byte(s)
+ ...
+ by 0x........: main (scalar.c:1158)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param timer_create(evp.sigev_signo) points to unaddressable byte(s)
+ ...
+ by 0x........: main (scalar.c:1158)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param timer_create(evp.sigev_notify) points to unaddressable byte(s)
...
by 0x........: main (scalar.c:1158)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
|
From: <sv...@va...> - 2014-02-24 15:06:23
|
Author: tom
Date: Mon Feb 24 15:06:06 2014
New Revision: 13836
Log:
Handle IPv6 addresses when reporting open file descriptors.
Based on a patch from Roger Light on BZ#175819.
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Feb 24 15:06:06 2014
@@ -35,6 +35,7 @@
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed below.
+175819 Support for ipv6 socket reporting with --track-fds
308729 vex x86->IR: unhandled instruction bytes 0xf 0x5 (syscall)
325714 Empty vgcore but RLIMIT_CORE is big enough (too big)
325856 Make SGCheck fail gracefully on unsupported platforms
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c Mon Feb 24 15:06:06 2014
@@ -608,7 +608,7 @@
}
static
-HChar *unix2name(struct vki_sockaddr_un *sa, UInt len, HChar *name)
+HChar *unix_to_name(struct vki_sockaddr_un *sa, UInt len, HChar *name)
{
if (sa == NULL || len == 0 || sa->sun_path[0] == '\0') {
VG_(sprintf)(name, "<unknown>");
@@ -620,20 +620,80 @@
}
static
-HChar *inet2name(struct vki_sockaddr_in *sa, UInt len, HChar *name)
+HChar *inet_to_name(struct vki_sockaddr_in *sa, UInt len, HChar *name)
{
if (sa == NULL || len == 0) {
VG_(sprintf)(name, "<unknown>");
+ } else if (sa->sin_port == 0) {
+ VG_(sprintf)(name, "<unbound>");
} else {
UInt addr = VG_(ntohl)(sa->sin_addr.s_addr);
- if (addr == 0) {
- VG_(sprintf)(name, "<unbound>");
- } else {
- VG_(sprintf)(name, "%u.%u.%u.%u:%u",
- (addr>>24) & 0xFF, (addr>>16) & 0xFF,
- (addr>>8) & 0xFF, addr & 0xFF,
- VG_(ntohs)(sa->sin_port));
+ VG_(sprintf)(name, "%u.%u.%u.%u:%u",
+ (addr>>24) & 0xFF, (addr>>16) & 0xFF,
+ (addr>>8) & 0xFF, addr & 0xFF,
+ VG_(ntohs)(sa->sin_port));
+ }
+
+ return name;
+}
+
+static
+void inet6_format(HChar *s, const UChar ip[16])
+{
+ static const unsigned char V4mappedprefix[12] = {0,0,0,0,0,0,0,0,0,0,0xff,0xff};
+
+ if (!VG_(memcmp)(ip, V4mappedprefix, 12)) {
+ struct vki_in_addr *sin_addr = (struct vki_in_addr *)(ip + 12);
+ UInt addr = VG_(ntohl)(sin_addr->s_addr);
+
+ VG_(sprintf)(s, "::ffff:%u.%u.%u.%u",
+ (addr>>24) & 0xFF, (addr>>16) & 0xFF,
+ (addr>>8) & 0xFF, addr & 0xFF);
+ } else {
+ Bool compressing = False;
+ Bool compressed = False;
+ Int len = 0;
+ Int i;
+
+ for (i = 0; i < 16; i += 2) {
+ UInt word = ((UInt)ip[i] << 8) | (UInt)ip[i+1];
+ if (word == 0 && !compressed) {
+ compressing = True;
+ } else {
+ if (compressing) {
+ compressing = False;
+ compressed = True;
+ s[len++] = ':';
+ }
+ if (i > 0) {
+ s[len++] = ':';
+ }
+ len += VG_(sprintf)(s + len, "%x", word);
+ }
+ }
+
+ if (compressing) {
+ s[len++] = ':';
+ s[len++] = ':';
}
+
+ s[len++] = 0;
+ }
+
+ return;
+}
+
+static
+HChar *inet6_to_name(struct vki_sockaddr_in6 *sa, UInt len, HChar *name)
+{
+ if (sa == NULL || len == 0) {
+ VG_(sprintf)(name, "<unknown>");
+ } else if (sa->sin6_port == 0) {
+ VG_(sprintf)(name, "<unbound>");
+ } else {
+ char addr[128];
+ inet6_format(addr, (void *)&(sa->sin6_addr));
+ VG_(sprintf)(name, "[%s]:%u", addr, VG_(ntohs)(sa->sin6_port));
}
return name;
@@ -648,6 +708,7 @@
union u {
struct vki_sockaddr a;
struct vki_sockaddr_in in;
+ struct vki_sockaddr_in6 in6;
struct vki_sockaddr_un un;
} laddr;
Int llen;
@@ -665,18 +726,34 @@
if (VG_(getpeername)(fd, (struct vki_sockaddr *)&paddr, &plen) != -1) {
VG_(message)(Vg_UserMsg, "Open AF_INET socket %d: %s <-> %s\n", fd,
- inet2name(&(laddr.in), llen, lname),
- inet2name(&paddr, plen, pname));
+ inet_to_name(&(laddr.in), llen, lname),
+ inet_to_name(&paddr, plen, pname));
} else {
VG_(message)(Vg_UserMsg, "Open AF_INET socket %d: %s <-> unbound\n",
- fd, inet2name(&(laddr.in), llen, lname));
+ fd, inet_to_name(&(laddr.in), llen, lname));
+ }
+ return;
+ }
+ case VKI_AF_INET6: {
+ static char lname[128];
+ static char pname[128];
+ struct vki_sockaddr_in6 paddr;
+ Int plen = sizeof(struct vki_sockaddr_in6);
+
+ if (VG_(getpeername)(fd, (struct vki_sockaddr *)&paddr, &plen) != -1) {
+ VG_(message)(Vg_UserMsg, "Open AF_INET6 socket %d: %s <-> %s\n", fd,
+ inet6_to_name(&(laddr.in6), llen, lname),
+ inet6_to_name(&paddr, plen, pname));
+ } else {
+ VG_(message)(Vg_UserMsg, "Open AF_INET6 socket %d: %s <-> unbound\n",
+ fd, inet6_to_name(&(laddr.in6), llen, lname));
}
return;
}
case VKI_AF_UNIX: {
static char lname[256];
VG_(message)(Vg_UserMsg, "Open AF_UNIX socket %d: %s\n", fd,
- unix2name(&(laddr.un), llen, lname));
+ unix_to_name(&(laddr.un), llen, lname));
return;
}
default:
|
|
From: Roland M. <rol...@nr...> - 2014-02-24 14:26:19
|
On Mon, Feb 24, 2014 at 11:02 AM, Julian Seward <js...@ac...> wrote: > >>>> But of course, we all agree it would be nice to have 80 bits floats >>>> properly supported by Valgrind. > > To support this for 64-bit processes would require, roughly: > > * add an F80 (80-bit floating point) type to IR > * add relevant 80-bit equivalents of the relevant IROps > (AddF80, SubF80, SinF80, etc) > * change the front end (guest_amd64_toIR.c) to generate > IR that uses those new IROps > * change the back end (host_amd64_isel.c) to generate 80 > bit FP instructions from that IR. > > Much of the back end stuff could be imported from the x86 (32-bit) > compilation pipeline. That already has machinery to generate > x87 code and in particular to deal with the x87 register-stack > wierdness. > > That would get a baseline simulator (--tool=none) that works OK, > Getting Memcheck to work requires extra steps: [snip] Just curious: Does valgrind have 128bit floating-point support somewhere? If "yes" ... could core parts of it be adopted/"dumbed down" to do some of the 80bit parts ? ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) rol...@nr... \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) |
|
From: <sv...@va...> - 2014-02-24 10:39:02
|
Author: mjw
Date: Mon Feb 24 10:38:45 2014
New Revision: 13835
Log:
BZ#331380 Syscall param timer_create(evp) points to uninitialised byte(s)
Only check struct sigevent actually used by the kernel. If SIGEV_THREAD_ID
is set check sigev_notify_thread_id, otherwise don't.
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/include/vki/vki-linux.h
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Feb 24 10:38:45 2014
@@ -60,6 +60,7 @@
331257 Fix type of jump buffer in test none/tests/faultstatus
331305 configure uses bash specific syntax
331337 s390x WARNING: unhandled syscall: 326 (dup3)
+331380 Syscall param timer_create(evp) points to uninitialised byte(s)
n-i-bz Fix KVM_CREATE_IRQCHIP ioctl handling
Release 3.9.0 (31 October 2013)
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c Mon Feb 24 10:38:45 2014
@@ -2175,8 +2175,18 @@
PRE_REG_READ3(long, "timer_create",
vki_clockid_t, clockid, struct sigevent *, evp,
vki_timer_t *, timerid);
- if (ARG2 != 0)
- PRE_MEM_READ( "timer_create(evp)", ARG2, sizeof(struct vki_sigevent) );
+ if (ARG2 != 0) {
+ struct vki_sigevent *evp = (struct vki_sigevent *) ARG2;
+ PRE_MEM_READ( "timer_create(evp.sigev_value)", (Addr)&evp->sigev_value,
+ sizeof(vki_sigval_t) );
+ PRE_MEM_READ( "timer_create(evp.sigev_signo)", (Addr)&evp->sigev_signo,
+ sizeof(int) );
+ PRE_MEM_READ( "timer_create(evp.sigev_notify)", (Addr)&evp->sigev_notify,
+ sizeof(int) );
+ if ((evp->sigev_notify & VKI_SIGEV_THREAD_ID) != 0)
+ PRE_MEM_READ( "timer_create(evp.sigev_notify_thread_id)",
+ (Addr)&evp->vki_sigev_notify_thread_id, sizeof(int) );
+ }
PRE_MEM_WRITE( "timer_create(timerid)", ARG3, sizeof(vki_timer_t) );
}
POST(sys_timer_create)
Modified: trunk/include/vki/vki-linux.h
==============================================================================
--- trunk/include/vki/vki-linux.h (original)
+++ trunk/include/vki/vki-linux.h Mon Feb 24 10:38:45 2014
@@ -544,6 +544,9 @@
#define VKI_SIGEV_PAD_SIZE ((VKI_SIGEV_MAX_SIZE - VKI___ARCH_SIGEV_PREAMBLE_SIZE) \
/ sizeof(int))
+/* This is the flag the kernel handles, userspace/glibc handles SEGEV_THEAD. */
+#define VKI_SIGEV_THREAD_ID 4
+
typedef struct vki_sigevent {
vki_sigval_t sigev_value;
int sigev_signo;
@@ -559,6 +562,8 @@
} _sigev_un;
} vki_sigevent_t;
+#define vki_sigev_notify_thread_id _sigev_un._tid
+
//----------------------------------------------------------------------
// From elsewhere...
//----------------------------------------------------------------------
|