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
(8) |
2
(8) |
3
(15) |
4
(14) |
5
(12) |
6
(40) |
7
(9) |
|
8
(5) |
9
(12) |
10
(9) |
11
(13) |
12
(7) |
13
(7) |
14
(19) |
|
15
(18) |
16
(13) |
17
(16) |
18
(8) |
19
(16) |
20
(16) |
21
(12) |
|
22
(21) |
23
(39) |
24
(27) |
25
(33) |
26
(41) |
27
(17) |
28
(15) |
|
From: <sv...@va...> - 2009-02-17 23:13:12
|
Author: njn Date: 2009-02-17 21:53:19 +0000 (Tue, 17 Feb 2009) New Revision: 9196 Log: Fix a typo that prevented it building on amd64-darwin. Modified: branches/DARWIN/Makefile.flags.am Modified: branches/DARWIN/Makefile.flags.am =================================================================== --- branches/DARWIN/Makefile.flags.am 2009-02-17 07:03:15 UTC (rev 9195) +++ branches/DARWIN/Makefile.flags.am 2009-02-17 21:53:19 UTC (rev 9196) @@ -89,8 +89,8 @@ AM_FLAG_M3264_AMD64_DARWIN = -arch x86_64 AM_CPPFLAGS_AMD64_DARWIN = $(AM_CPPFLAGS_COMMON) \ -DVGA_amd64=1 \ - -DVGO_linux=1 \ - -DVGP_amd64_linux=1 + -DVGO_darwin=1 \ + -DVGP_amd64_darwin=1 AM_CFLAGS_AMD64_DARWIN = $(WERROR) -arch x86_64 $(AM_CFLAGS_BASE) \ -mmacosx-version-min=10.5 -fno-stack-protector # GrP fixme -O0 for debugging goes here |
|
From: <sv...@va...> - 2009-02-17 07:03:25
|
Author: njn
Date: 2009-02-17 07:03:15 +0000 (Tue, 17 Feb 2009)
New Revision: 9195
Log:
Merge r9194 (filter fdleak_* tests more aggressively) from the trunk.
Removed:
branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp2
branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp3
branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp4
branches/DARWIN/none/tests/fdleak_creat.stderr.exp2
branches/DARWIN/none/tests/fdleak_creat.stderr.exp3
branches/DARWIN/none/tests/fdleak_dup.stderr.exp2
branches/DARWIN/none/tests/fdleak_dup.stderr.exp3
branches/DARWIN/none/tests/fdleak_dup2.stderr.exp2
branches/DARWIN/none/tests/fdleak_dup2.stderr.exp3
branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp2
branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp3
branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp4
branches/DARWIN/none/tests/fdleak_ipv4.stderr.exp2
branches/DARWIN/none/tests/fdleak_open.stderr.exp2
branches/DARWIN/none/tests/fdleak_pipe.stderr.exp2
branches/DARWIN/none/tests/fdleak_socketpair.stderr.exp2
Modified:
branches/DARWIN/none/tests/Makefile.am
branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp
branches/DARWIN/none/tests/fdleak_creat.c
branches/DARWIN/none/tests/fdleak_creat.stderr.exp
branches/DARWIN/none/tests/fdleak_dup.stderr.exp
branches/DARWIN/none/tests/fdleak_dup2.stderr.exp
branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp
branches/DARWIN/none/tests/fdleak_ipv4.stderr.exp
branches/DARWIN/none/tests/fdleak_open.stderr.exp
branches/DARWIN/none/tests/fdleak_pipe.stderr.exp
branches/DARWIN/none/tests/fdleak_socketpair.stderr.exp
branches/DARWIN/none/tests/filter_fdleak
Modified: branches/DARWIN/none/tests/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/Makefile.am 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/Makefile.am 2009-02-17 07:03:15 UTC (rev 9195)
@@ -59,26 +59,16 @@
execve.vgtest execve.stdout.exp execve.stderr.exp \
faultstatus.vgtest faultstatus.stderr.exp \
fcntl_setown.vgtest fcntl_setown.stdout.exp fcntl_setown.stderr.exp \
- fdleak_cmsg.stderr.exp fdleak_cmsg.stderr.exp2 \
- fdleak_cmsg.stderr.exp3 fdleak_cmsg.stderr.exp4 \
- fdleak_cmsg.vgtest \
- fdleak_creat.stderr.exp fdleak_creat.stderr.exp2 \
- fdleak_creat.stderr.exp3 fdleak_creat.vgtest \
- fdleak_dup.stderr.exp fdleak_dup.stderr.exp2 \
- fdleak_dup.stderr.exp3 fdleak_dup.vgtest \
- fdleak_dup2.stderr.exp fdleak_dup2.stderr.exp2 \
- fdleak_dup2.stderr.exp3 fdleak_dup2.vgtest \
- fdleak_fcntl.stderr.exp fdleak_fcntl.stderr.exp2 \
- fdleak_fcntl.stderr.exp3 fdleak_fcntl.stderr.exp4 \
- fdleak_fcntl.vgtest \
- fdleak_ipv4.stderr.exp fdleak_ipv4.stderr.exp2 \
- fdleak_ipv4.stdout.exp fdleak_ipv4.vgtest \
- fdleak_open.stderr.exp fdleak_open.stderr.exp2 fdleak_open.vgtest \
- fdleak_pipe.stderr.exp fdleak_pipe.stderr.exp2 fdleak_pipe.vgtest \
- fdleak_socketpair.stderr.exp fdleak_socketpair.stderr.exp2 \
- fdleak_socketpair.vgtest \
- floored.stderr.exp floored.stdout.exp \
- floored.vgtest \
+ fdleak_cmsg.stderr.exp fdleak_cmsg.vgtest \
+ fdleak_creat.stderr.exp fdleak_creat.vgtest \
+ fdleak_dup.stderr.exp fdleak_dup.vgtest \
+ fdleak_dup2.stderr.exp fdleak_dup2.vgtest \
+ fdleak_fcntl.stderr.exp fdleak_fcntl.vgtest \
+ fdleak_ipv4.stderr.exp fdleak_ipv4.stdout.exp fdleak_ipv4.vgtest \
+ fdleak_open.stderr.exp fdleak_open.vgtest \
+ fdleak_pipe.stderr.exp fdleak_pipe.vgtest \
+ fdleak_socketpair.stderr.exp fdleak_socketpair.vgtest \
+ floored.stderr.exp floored.stdout.exp floored.vgtest \
fork.stderr.exp fork.stdout.exp fork.vgtest \
fucomip.stderr.exp fucomip.vgtest \
gxx304.stderr.exp gxx304.vgtest \
Modified: branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp 2009-02-17 07:03:15 UTC (rev 9195)
@@ -2,22 +2,16 @@
FILE DESCRIPTORS: 7 open at exit.
Open AF_UNIX socket .: /tmp/sock
- at 0x........: accept (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:64)
- by 0x........: main (fdleak_cmsg.c:174)
+ ...
Open AF_UNIX socket .: /tmp/sock
- at 0x........: socket (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:33)
- by 0x........: main (fdleak_cmsg.c:174)
+ ...
Open file descriptor .: /tmp/data2
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:174)
+ ...
Open file descriptor .: /tmp/data1
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:174)
+ ...
Open file descriptor .: .
<inherited from parent>
@@ -32,19 +26,13 @@
FILE DESCRIPTORS: 6 open at exit.
Open file descriptor .: /tmp/data2
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:131)
- by 0x........: main (fdleak_cmsg.c:178)
+ ...
Open file descriptor .: /tmp/data1
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:131)
- by 0x........: main (fdleak_cmsg.c:178)
+ ...
Open AF_UNIX socket .: <unknown>
- at 0x........: socket (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:110)
- by 0x........: main (fdleak_cmsg.c:178)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp2
===================================================================
--- branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp2 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,60 +0,0 @@
-
-
-FILE DESCRIPTORS: 7 open at exit.
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: accept (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:64)
- by 0x........: main (fdleak_cmsg.c:174)
-
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: socket (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:33)
- by 0x........: main (fdleak_cmsg.c:174)
-
-Open file descriptor .: /tmp/data2
- at 0x........: open (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:27)
- by 0x........: main (fdleak_cmsg.c:174)
-
-Open file descriptor .: /tmp/data1
- at 0x........: open (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:21)
- by 0x........: main (fdleak_cmsg.c:174)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
-
-FILE DESCRIPTORS: 6 open at exit.
-Open file descriptor .: /tmp/data2
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:131)
- by 0x........: main (fdleak_cmsg.c:178)
-
-Open file descriptor .: /tmp/data1
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:131)
- by 0x........: main (fdleak_cmsg.c:178)
-
-Open AF_UNIX socket .: <unknown>
- at 0x........: socket (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:110)
- by 0x........: main (fdleak_cmsg.c:178)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp3
===================================================================
--- branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp3 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp3 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,53 +0,0 @@
-
-
-FILE DESCRIPTORS: 7 open at exit.
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: accept (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: socket (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: /tmp/data2
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: /tmp/data1
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
-
-FILE DESCRIPTORS: 6 open at exit.
-Open file descriptor .: /tmp/data2
- at 0x........: recvmsg (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open file descriptor .: /tmp/data1
- at 0x........: recvmsg (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open AF_UNIX socket .: <unknown>
- at 0x........: socket (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp4
===================================================================
--- branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp4 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_cmsg.stderr.exp4 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,60 +0,0 @@
-
-
-FILE DESCRIPTORS: 7 open at exit.
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: accept (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:85)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: socket (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:54)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: /tmp/data2
- at 0x........: open (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:48)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: /tmp/data1
- at 0x........: open (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:42)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
-
-FILE DESCRIPTORS: 6 open at exit.
-Open file descriptor .: /tmp/data2
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:152)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open file descriptor .: /tmp/data1
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:152)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open AF_UNIX socket .: <unknown>
- at 0x........: socket (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:131)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: branches/DARWIN/none/tests/fdleak_creat.c
===================================================================
--- branches/DARWIN/none/tests/fdleak_creat.c 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_creat.c 2009-02-17 07:03:15 UTC (rev 9195)
@@ -14,7 +14,7 @@
CLOSE_INHERITED_FDS;
- sprintf(filename, "/tmp/file.%d\n", getpid());
+ sprintf(filename, "/tmp/file.%d", getpid());
creat(filename, 0);
unlink(filename);
return 0;
Modified: branches/DARWIN/none/tests/fdleak_creat.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/fdleak_creat.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_creat.stderr.exp 2009-02-17 07:03:15 UTC (rev 9195)
@@ -2,10 +2,8 @@
FILE DESCRIPTORS: 4 open at exit.
Open file descriptor .: /tmp/file
+ ...
- at 0x........: creat (in /...libc...)
- by 0x........: (below main)
-
Open file descriptor .: .
<inherited from parent>
Deleted: branches/DARWIN/none/tests/fdleak_creat.stderr.exp2
===================================================================
--- branches/DARWIN/none/tests/fdleak_creat.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_creat.stderr.exp2 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,18 +0,0 @@
-
-
-FILE DESCRIPTORS: 4 open at exit.
-Open file descriptor .: /tmp/file
-
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_creat.c:18)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: branches/DARWIN/none/tests/fdleak_creat.stderr.exp3
===================================================================
--- branches/DARWIN/none/tests/fdleak_creat.stderr.exp3 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_creat.stderr.exp3 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,18 +0,0 @@
-
-
-FILE DESCRIPTORS: 4 open at exit.
-Open file descriptor .: /tmp/file
-
- at 0x........: creat (in /...libc...)
- by 0x........: main (fdleak_creat.c:18)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: branches/DARWIN/none/tests/fdleak_dup.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/fdleak_dup.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_dup.stderr.exp 2009-02-17 07:03:15 UTC (rev 9195)
@@ -2,12 +2,10 @@
FILE DESCRIPTORS: 5 open at exit.
Open file descriptor .: /dev/null
- at 0x........: dup (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: branches/DARWIN/none/tests/fdleak_dup.stderr.exp2
===================================================================
--- branches/DARWIN/none/tests/fdleak_dup.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_dup.stderr.exp2 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,21 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: dup (in /...libc...)
- by 0x........: (below main)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_dup.c:16)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: branches/DARWIN/none/tests/fdleak_dup.stderr.exp3
===================================================================
--- branches/DARWIN/none/tests/fdleak_dup.stderr.exp3 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_dup.stderr.exp3 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,21 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: dup (in /...libc...)
- by 0x........: main (fdleak_dup.c:17)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_dup.c:16)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: branches/DARWIN/none/tests/fdleak_dup2.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/fdleak_dup2.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_dup2.stderr.exp 2009-02-17 07:03:15 UTC (rev 9195)
@@ -2,16 +2,13 @@
FILE DESCRIPTORS: 6 open at exit.
Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: branches/DARWIN/none/tests/fdleak_dup2.stderr.exp2
===================================================================
--- branches/DARWIN/none/tests/fdleak_dup2.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_dup2.stderr.exp2 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,25 +0,0 @@
-
-
-FILE DESCRIPTORS: 6 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: (below main)
-
-Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: (below main)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_dup2.c:17)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: branches/DARWIN/none/tests/fdleak_dup2.stderr.exp3
===================================================================
--- branches/DARWIN/none/tests/fdleak_dup2.stderr.exp3 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_dup2.stderr.exp3 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,25 +0,0 @@
-
-
-FILE DESCRIPTORS: 6 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: main (fdleak_dup2.c:20)
-
-Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: main (fdleak_dup2.c:21)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_dup2.c:17)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp 2009-02-17 07:03:15 UTC (rev 9195)
@@ -2,12 +2,10 @@
FILE DESCRIPTORS: 5 open at exit.
Open file descriptor .: /dev/null
- at 0x........: fcntl (in /...libc...)
- by 0x........: main (fdleak_fcntl.c:18)
+ ...
Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp2
===================================================================
--- branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp2 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,22 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: fcntl (in /...libc...)
- by 0x........: fcntl (in /...libc...)
- by 0x........: main (fdleak_fcntl.c:18)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp3
===================================================================
--- branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp3 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp3 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,22 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: do_fcntl (in /...libc...)
- by 0x........: fcntl (in /...libc...)
- by 0x........: main (fdleak_fcntl.c:18)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp4
===================================================================
--- branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp4 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_fcntl.stderr.exp4 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,21 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: fcntl (in /...libc...)
- by 0x........: main (fdleak_fcntl.c:18)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_fcntl.c:17)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: branches/DARWIN/none/tests/fdleak_ipv4.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/fdleak_ipv4.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_ipv4.stderr.exp 2009-02-17 07:03:15 UTC (rev 9195)
@@ -2,14 +2,10 @@
FILE DESCRIPTORS: 5 open at exit.
Open AF_INET socket 4: 127.0.0.1:... <-> 127.0.0.1:...
- at 0x........: accept (in /...libc...)
- by 0x........: server (fdleak_ipv4.c:44)
- by 0x........: main (fdleak_ipv4.c:100)
+ ...
Open AF_INET socket 3: 127.0.0.1:... <-> unbound
- at 0x........: socket (in /...libc...)
- by 0x........: server (fdleak_ipv4.c:21)
- by 0x........: main (fdleak_ipv4.c:100)
+ ...
Open file descriptor .: .
<inherited from parent>
@@ -24,9 +20,7 @@
FILE DESCRIPTORS: 4 open at exit.
Open AF_INET socket 3: 127.0.0.1:... <-> 127.0.0.1:...
- at 0x........: socket (in /...libc...)
- by 0x........: client (fdleak_ipv4.c:60)
- by 0x........: main (fdleak_ipv4.c:104)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: branches/DARWIN/none/tests/fdleak_ipv4.stderr.exp2
===================================================================
--- branches/DARWIN/none/tests/fdleak_ipv4.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_ipv4.stderr.exp2 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,37 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open AF_INET socket 4: 127.0.0.1:... <-> 127.0.0.1:...
- at 0x........: accept (in /...libc...)
- by 0x........: main (fdleak_ipv4.c:100)
-
-Open AF_INET socket 3: 127.0.0.1:... <-> unbound
- at 0x........: socket (in /...libc...)
- by 0x........: main (fdleak_ipv4.c:100)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
-
-FILE DESCRIPTORS: 4 open at exit.
-Open AF_INET socket 3: 127.0.0.1:... <-> 127.0.0.1:...
- at 0x........: socket (in /...libc...)
- by 0x........: main (fdleak_ipv4.c:104)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: branches/DARWIN/none/tests/fdleak_open.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/fdleak_open.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_open.stderr.exp 2009-02-17 07:03:15 UTC (rev 9195)
@@ -2,8 +2,7 @@
FILE DESCRIPTORS: 4 open at exit.
Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: branches/DARWIN/none/tests/fdleak_open.stderr.exp2
===================================================================
--- branches/DARWIN/none/tests/fdleak_open.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_open.stderr.exp2 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,17 +0,0 @@
-
-
-FILE DESCRIPTORS: 4 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_open.c:13)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: branches/DARWIN/none/tests/fdleak_pipe.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/fdleak_pipe.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_pipe.stderr.exp 2009-02-17 07:03:15 UTC (rev 9195)
@@ -2,12 +2,10 @@
FILE DESCRIPTORS: 5 open at exit.
Open file descriptor .:
- at 0x........: pipe (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .:
- at 0x........: pipe (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: branches/DARWIN/none/tests/fdleak_pipe.stderr.exp2
===================================================================
--- branches/DARWIN/none/tests/fdleak_pipe.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_pipe.stderr.exp2 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,21 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .:
- at 0x........: pipe (in /...libc...)
- by 0x........: main (fdleak_pipe.c:15)
-
-Open file descriptor .:
- at 0x........: pipe (in /...libc...)
- by 0x........: main (fdleak_pipe.c:15)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: branches/DARWIN/none/tests/fdleak_socketpair.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/fdleak_socketpair.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_socketpair.stderr.exp 2009-02-17 07:03:15 UTC (rev 9195)
@@ -2,12 +2,10 @@
FILE DESCRIPTORS: 5 open at exit.
Open AF_UNIX socket .: <unknown>
- at 0x........: socketpair (in /...libc...)
- by 0x........: (below main)
+ ...
Open AF_UNIX socket .: <unknown>
- at 0x........: socketpair (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: branches/DARWIN/none/tests/fdleak_socketpair.stderr.exp2
===================================================================
--- branches/DARWIN/none/tests/fdleak_socketpair.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/fdleak_socketpair.stderr.exp2 2009-02-17 07:03:15 UTC (rev 9195)
@@ -1,21 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open AF_UNIX socket .: <unknown>
- at 0x........: socketpair (in /...libc...)
- by 0x........: main (fdleak_socketpair.c:15)
-
-Open AF_UNIX socket .: <unknown>
- at 0x........: socketpair (in /...libc...)
- by 0x........: main (fdleak_socketpair.c:15)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: branches/DARWIN/none/tests/filter_fdleak
===================================================================
--- branches/DARWIN/none/tests/filter_fdleak 2009-02-17 06:55:10 UTC (rev 9194)
+++ branches/DARWIN/none/tests/filter_fdleak 2009-02-17 07:03:15 UTC (rev 9195)
@@ -9,4 +9,15 @@
sed s/"^Open \(AF_UNIX socket\|file descriptor\) [0-9]*: \/tmp\/\(sock\|data1\|data2\|file\)\.[0-9]*/Open \\1 .: \/tmp\/\\2/" |
sed s/"^Open file descriptor [0-9]*: .*/Open file descriptor .: ./" |
sed s/"^Open file descriptor [0-9]*:$/Open file descriptor .:/" |
-sed s/"127.0.0.1:[0-9]*/127.0.0.1:.../g"
+sed s/"127.0.0.1:[0-9]*/127.0.0.1:.../g" |
+
+# Stack traces showing where fds were created have lots of variations:
+# different numbers of entries, line numbers or not depending on whether
+# libc debug info is present, 'main' vs. '(below main)', etc.
+#
+# So we just cut out the entire stack trace. It's coarse but effective;
+# before we did this we had a plethora of expected outputs, with only
+# painfully minor variations between them.
+perl -p -0 -e 's/(Open[^\n]*)\n( (at|by)[^\n]*\n)+/$1\n ...\n/gs'
+
+
|
|
From: <sv...@va...> - 2009-02-17 06:55:16
|
Author: njn
Date: 2009-02-17 06:55:10 +0000 (Tue, 17 Feb 2009)
New Revision: 9194
Log:
For the fdleak_* tests, completely remove the stack traces showing where
file descriptors came into existence, because there's too much variation and
all the expected outputs are a pain. This allows 16 fdleak_*.exp[234] files
to be removed.
Also remove an unnecessary newline in a tmp filename in fdleak_creat.c.
Removed:
trunk/none/tests/fdleak_cmsg.stderr.exp2
trunk/none/tests/fdleak_cmsg.stderr.exp3
trunk/none/tests/fdleak_cmsg.stderr.exp4
trunk/none/tests/fdleak_creat.stderr.exp2
trunk/none/tests/fdleak_creat.stderr.exp3
trunk/none/tests/fdleak_dup.stderr.exp2
trunk/none/tests/fdleak_dup.stderr.exp3
trunk/none/tests/fdleak_dup2.stderr.exp2
trunk/none/tests/fdleak_dup2.stderr.exp3
trunk/none/tests/fdleak_fcntl.stderr.exp2
trunk/none/tests/fdleak_fcntl.stderr.exp3
trunk/none/tests/fdleak_fcntl.stderr.exp4
trunk/none/tests/fdleak_ipv4.stderr.exp2
trunk/none/tests/fdleak_open.stderr.exp2
trunk/none/tests/fdleak_pipe.stderr.exp2
trunk/none/tests/fdleak_socketpair.stderr.exp2
Modified:
trunk/none/tests/Makefile.am
trunk/none/tests/fdleak_cmsg.stderr.exp
trunk/none/tests/fdleak_creat.c
trunk/none/tests/fdleak_creat.stderr.exp
trunk/none/tests/fdleak_dup.stderr.exp
trunk/none/tests/fdleak_dup2.stderr.exp
trunk/none/tests/fdleak_fcntl.stderr.exp
trunk/none/tests/fdleak_ipv4.stderr.exp
trunk/none/tests/fdleak_open.stderr.exp
trunk/none/tests/fdleak_pipe.stderr.exp
trunk/none/tests/fdleak_socketpair.stderr.exp
trunk/none/tests/filter_fdleak
Modified: trunk/none/tests/Makefile.am
===================================================================
--- trunk/none/tests/Makefile.am 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/Makefile.am 2009-02-17 06:55:10 UTC (rev 9194)
@@ -56,26 +56,16 @@
execve.vgtest execve.stdout.exp execve.stderr.exp \
faultstatus.vgtest faultstatus.stderr.exp \
fcntl_setown.vgtest fcntl_setown.stdout.exp fcntl_setown.stderr.exp \
- fdleak_cmsg.stderr.exp fdleak_cmsg.stderr.exp2 \
- fdleak_cmsg.stderr.exp3 fdleak_cmsg.stderr.exp4 \
- fdleak_cmsg.vgtest \
- fdleak_creat.stderr.exp fdleak_creat.stderr.exp2 \
- fdleak_creat.stderr.exp3 fdleak_creat.vgtest \
- fdleak_dup.stderr.exp fdleak_dup.stderr.exp2 \
- fdleak_dup.stderr.exp3 fdleak_dup.vgtest \
- fdleak_dup2.stderr.exp fdleak_dup2.stderr.exp2 \
- fdleak_dup2.stderr.exp3 fdleak_dup2.vgtest \
- fdleak_fcntl.stderr.exp fdleak_fcntl.stderr.exp2 \
- fdleak_fcntl.stderr.exp3 fdleak_fcntl.stderr.exp4 \
- fdleak_fcntl.vgtest \
- fdleak_ipv4.stderr.exp fdleak_ipv4.stderr.exp2 \
- fdleak_ipv4.stdout.exp fdleak_ipv4.vgtest \
- fdleak_open.stderr.exp fdleak_open.stderr.exp2 fdleak_open.vgtest \
- fdleak_pipe.stderr.exp fdleak_pipe.stderr.exp2 fdleak_pipe.vgtest \
- fdleak_socketpair.stderr.exp fdleak_socketpair.stderr.exp2 \
- fdleak_socketpair.vgtest \
- floored.stderr.exp floored.stdout.exp \
- floored.vgtest \
+ fdleak_cmsg.stderr.exp fdleak_cmsg.vgtest \
+ fdleak_creat.stderr.exp fdleak_creat.vgtest \
+ fdleak_dup.stderr.exp fdleak_dup.vgtest \
+ fdleak_dup2.stderr.exp fdleak_dup2.vgtest \
+ fdleak_fcntl.stderr.exp fdleak_fcntl.vgtest \
+ fdleak_ipv4.stderr.exp fdleak_ipv4.stdout.exp fdleak_ipv4.vgtest \
+ fdleak_open.stderr.exp fdleak_open.vgtest \
+ fdleak_pipe.stderr.exp fdleak_pipe.vgtest \
+ fdleak_socketpair.stderr.exp fdleak_socketpair.vgtest \
+ floored.stderr.exp floored.stdout.exp floored.vgtest \
fork.stderr.exp fork.stdout.exp fork.vgtest \
fucomip.stderr.exp fucomip.vgtest \
gxx304.stderr.exp gxx304.vgtest \
Modified: trunk/none/tests/fdleak_cmsg.stderr.exp
===================================================================
--- trunk/none/tests/fdleak_cmsg.stderr.exp 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_cmsg.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
@@ -2,22 +2,16 @@
FILE DESCRIPTORS: 7 open at exit.
Open AF_UNIX socket .: /tmp/sock
- at 0x........: accept (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:64)
- by 0x........: main (fdleak_cmsg.c:174)
+ ...
Open AF_UNIX socket .: /tmp/sock
- at 0x........: socket (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:33)
- by 0x........: main (fdleak_cmsg.c:174)
+ ...
Open file descriptor .: /tmp/data2
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:174)
+ ...
Open file descriptor .: /tmp/data1
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:174)
+ ...
Open file descriptor .: .
<inherited from parent>
@@ -32,19 +26,13 @@
FILE DESCRIPTORS: 6 open at exit.
Open file descriptor .: /tmp/data2
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:131)
- by 0x........: main (fdleak_cmsg.c:178)
+ ...
Open file descriptor .: /tmp/data1
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:131)
- by 0x........: main (fdleak_cmsg.c:178)
+ ...
Open AF_UNIX socket .: <unknown>
- at 0x........: socket (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:110)
- by 0x........: main (fdleak_cmsg.c:178)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: trunk/none/tests/fdleak_cmsg.stderr.exp2
===================================================================
--- trunk/none/tests/fdleak_cmsg.stderr.exp2 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_cmsg.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,60 +0,0 @@
-
-
-FILE DESCRIPTORS: 7 open at exit.
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: accept (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:64)
- by 0x........: main (fdleak_cmsg.c:174)
-
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: socket (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:33)
- by 0x........: main (fdleak_cmsg.c:174)
-
-Open file descriptor .: /tmp/data2
- at 0x........: open (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:27)
- by 0x........: main (fdleak_cmsg.c:174)
-
-Open file descriptor .: /tmp/data1
- at 0x........: open (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:21)
- by 0x........: main (fdleak_cmsg.c:174)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
-
-FILE DESCRIPTORS: 6 open at exit.
-Open file descriptor .: /tmp/data2
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:131)
- by 0x........: main (fdleak_cmsg.c:178)
-
-Open file descriptor .: /tmp/data1
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:131)
- by 0x........: main (fdleak_cmsg.c:178)
-
-Open AF_UNIX socket .: <unknown>
- at 0x........: socket (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:110)
- by 0x........: main (fdleak_cmsg.c:178)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: trunk/none/tests/fdleak_cmsg.stderr.exp3
===================================================================
--- trunk/none/tests/fdleak_cmsg.stderr.exp3 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_cmsg.stderr.exp3 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,53 +0,0 @@
-
-
-FILE DESCRIPTORS: 7 open at exit.
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: accept (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: socket (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: /tmp/data2
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: /tmp/data1
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
-
-FILE DESCRIPTORS: 6 open at exit.
-Open file descriptor .: /tmp/data2
- at 0x........: recvmsg (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open file descriptor .: /tmp/data1
- at 0x........: recvmsg (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open AF_UNIX socket .: <unknown>
- at 0x........: socket (in /...libc...)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: trunk/none/tests/fdleak_cmsg.stderr.exp4
===================================================================
--- trunk/none/tests/fdleak_cmsg.stderr.exp4 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_cmsg.stderr.exp4 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,60 +0,0 @@
-
-
-FILE DESCRIPTORS: 7 open at exit.
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: accept (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:85)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open AF_UNIX socket .: /tmp/sock
- at 0x........: socket (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:54)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: /tmp/data2
- at 0x........: open (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:48)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: /tmp/data1
- at 0x........: open (in /...libc...)
- by 0x........: server (fdleak_cmsg.c:42)
- by 0x........: main (fdleak_cmsg.c:195)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
-
-FILE DESCRIPTORS: 6 open at exit.
-Open file descriptor .: /tmp/data2
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:152)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open file descriptor .: /tmp/data1
- at 0x........: recvmsg (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:152)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open AF_UNIX socket .: <unknown>
- at 0x........: socket (in /...libc...)
- by 0x........: client (fdleak_cmsg.c:131)
- by 0x........: main (fdleak_cmsg.c:199)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: trunk/none/tests/fdleak_creat.c
===================================================================
--- trunk/none/tests/fdleak_creat.c 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_creat.c 2009-02-17 06:55:10 UTC (rev 9194)
@@ -14,7 +14,7 @@
CLOSE_INHERITED_FDS;
- sprintf(filename, "/tmp/file.%d\n", getpid());
+ sprintf(filename, "/tmp/file.%d", getpid());
creat(filename, 0);
unlink(filename);
return 0;
Modified: trunk/none/tests/fdleak_creat.stderr.exp
===================================================================
--- trunk/none/tests/fdleak_creat.stderr.exp 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_creat.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
@@ -2,10 +2,8 @@
FILE DESCRIPTORS: 4 open at exit.
Open file descriptor .: /tmp/file
+ ...
- at 0x........: creat (in /...libc...)
- by 0x........: (below main)
-
Open file descriptor .: .
<inherited from parent>
Deleted: trunk/none/tests/fdleak_creat.stderr.exp2
===================================================================
--- trunk/none/tests/fdleak_creat.stderr.exp2 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_creat.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,18 +0,0 @@
-
-
-FILE DESCRIPTORS: 4 open at exit.
-Open file descriptor .: /tmp/file
-
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_creat.c:18)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: trunk/none/tests/fdleak_creat.stderr.exp3
===================================================================
--- trunk/none/tests/fdleak_creat.stderr.exp3 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_creat.stderr.exp3 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,18 +0,0 @@
-
-
-FILE DESCRIPTORS: 4 open at exit.
-Open file descriptor .: /tmp/file
-
- at 0x........: creat (in /...libc...)
- by 0x........: main (fdleak_creat.c:18)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: trunk/none/tests/fdleak_dup.stderr.exp
===================================================================
--- trunk/none/tests/fdleak_dup.stderr.exp 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_dup.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
@@ -2,12 +2,10 @@
FILE DESCRIPTORS: 5 open at exit.
Open file descriptor .: /dev/null
- at 0x........: dup (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: trunk/none/tests/fdleak_dup.stderr.exp2
===================================================================
--- trunk/none/tests/fdleak_dup.stderr.exp2 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_dup.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,21 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: dup (in /...libc...)
- by 0x........: (below main)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_dup.c:16)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: trunk/none/tests/fdleak_dup.stderr.exp3
===================================================================
--- trunk/none/tests/fdleak_dup.stderr.exp3 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_dup.stderr.exp3 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,21 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: dup (in /...libc...)
- by 0x........: main (fdleak_dup.c:17)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_dup.c:16)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: trunk/none/tests/fdleak_dup2.stderr.exp
===================================================================
--- trunk/none/tests/fdleak_dup2.stderr.exp 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_dup2.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
@@ -2,16 +2,13 @@
FILE DESCRIPTORS: 6 open at exit.
Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: trunk/none/tests/fdleak_dup2.stderr.exp2
===================================================================
--- trunk/none/tests/fdleak_dup2.stderr.exp2 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_dup2.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,25 +0,0 @@
-
-
-FILE DESCRIPTORS: 6 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: (below main)
-
-Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: (below main)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_dup2.c:17)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: trunk/none/tests/fdleak_dup2.stderr.exp3
===================================================================
--- trunk/none/tests/fdleak_dup2.stderr.exp3 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_dup2.stderr.exp3 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,25 +0,0 @@
-
-
-FILE DESCRIPTORS: 6 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: main (fdleak_dup2.c:20)
-
-Open file descriptor .: /dev/null
- at 0x........: dup2 (in /...libc...)
- by 0x........: main (fdleak_dup2.c:21)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_dup2.c:17)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: trunk/none/tests/fdleak_fcntl.stderr.exp
===================================================================
--- trunk/none/tests/fdleak_fcntl.stderr.exp 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_fcntl.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
@@ -2,12 +2,10 @@
FILE DESCRIPTORS: 5 open at exit.
Open file descriptor .: /dev/null
- at 0x........: fcntl (in /...libc...)
- by 0x........: main (fdleak_fcntl.c:18)
+ ...
Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: trunk/none/tests/fdleak_fcntl.stderr.exp2
===================================================================
--- trunk/none/tests/fdleak_fcntl.stderr.exp2 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_fcntl.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,22 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: fcntl (in /...libc...)
- by 0x........: fcntl (in /...libc...)
- by 0x........: main (fdleak_fcntl.c:18)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: trunk/none/tests/fdleak_fcntl.stderr.exp3
===================================================================
--- trunk/none/tests/fdleak_fcntl.stderr.exp3 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_fcntl.stderr.exp3 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,22 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: do_fcntl (in /...libc...)
- by 0x........: fcntl (in /...libc...)
- by 0x........: main (fdleak_fcntl.c:18)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Deleted: trunk/none/tests/fdleak_fcntl.stderr.exp4
===================================================================
--- trunk/none/tests/fdleak_fcntl.stderr.exp4 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_fcntl.stderr.exp4 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,21 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: fcntl (in /...libc...)
- by 0x........: main (fdleak_fcntl.c:18)
-
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_fcntl.c:17)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: trunk/none/tests/fdleak_ipv4.stderr.exp
===================================================================
--- trunk/none/tests/fdleak_ipv4.stderr.exp 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_ipv4.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
@@ -2,14 +2,10 @@
FILE DESCRIPTORS: 5 open at exit.
Open AF_INET socket 4: 127.0.0.1:... <-> 127.0.0.1:...
- at 0x........: accept (in /...libc...)
- by 0x........: server (fdleak_ipv4.c:44)
- by 0x........: main (fdleak_ipv4.c:100)
+ ...
Open AF_INET socket 3: 127.0.0.1:... <-> unbound
- at 0x........: socket (in /...libc...)
- by 0x........: server (fdleak_ipv4.c:21)
- by 0x........: main (fdleak_ipv4.c:100)
+ ...
Open file descriptor .: .
<inherited from parent>
@@ -24,9 +20,7 @@
FILE DESCRIPTORS: 4 open at exit.
Open AF_INET socket 3: 127.0.0.1:... <-> 127.0.0.1:...
- at 0x........: socket (in /...libc...)
- by 0x........: client (fdleak_ipv4.c:60)
- by 0x........: main (fdleak_ipv4.c:104)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: trunk/none/tests/fdleak_ipv4.stderr.exp2
===================================================================
--- trunk/none/tests/fdleak_ipv4.stderr.exp2 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_ipv4.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,37 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open AF_INET socket 4: 127.0.0.1:... <-> 127.0.0.1:...
- at 0x........: accept (in /...libc...)
- by 0x........: main (fdleak_ipv4.c:100)
-
-Open AF_INET socket 3: 127.0.0.1:... <-> unbound
- at 0x........: socket (in /...libc...)
- by 0x........: main (fdleak_ipv4.c:100)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
-
-FILE DESCRIPTORS: 4 open at exit.
-Open AF_INET socket 3: 127.0.0.1:... <-> 127.0.0.1:...
- at 0x........: socket (in /...libc...)
- by 0x........: main (fdleak_ipv4.c:104)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: trunk/none/tests/fdleak_open.stderr.exp
===================================================================
--- trunk/none/tests/fdleak_open.stderr.exp 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_open.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
@@ -2,8 +2,7 @@
FILE DESCRIPTORS: 4 open at exit.
Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: trunk/none/tests/fdleak_open.stderr.exp2
===================================================================
--- trunk/none/tests/fdleak_open.stderr.exp2 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_open.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,17 +0,0 @@
-
-
-FILE DESCRIPTORS: 4 open at exit.
-Open file descriptor .: /dev/null
- at 0x........: open (in /...libc...)
- by 0x........: main (fdleak_open.c:13)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: trunk/none/tests/fdleak_pipe.stderr.exp
===================================================================
--- trunk/none/tests/fdleak_pipe.stderr.exp 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_pipe.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
@@ -2,12 +2,10 @@
FILE DESCRIPTORS: 5 open at exit.
Open file descriptor .:
- at 0x........: pipe (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .:
- at 0x........: pipe (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: trunk/none/tests/fdleak_pipe.stderr.exp2
===================================================================
--- trunk/none/tests/fdleak_pipe.stderr.exp2 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_pipe.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,21 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open file descriptor .:
- at 0x........: pipe (in /...libc...)
- by 0x........: main (fdleak_pipe.c:15)
-
-Open file descriptor .:
- at 0x........: pipe (in /...libc...)
- by 0x........: main (fdleak_pipe.c:15)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: trunk/none/tests/fdleak_socketpair.stderr.exp
===================================================================
--- trunk/none/tests/fdleak_socketpair.stderr.exp 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_socketpair.stderr.exp 2009-02-17 06:55:10 UTC (rev 9194)
@@ -2,12 +2,10 @@
FILE DESCRIPTORS: 5 open at exit.
Open AF_UNIX socket .: <unknown>
- at 0x........: socketpair (in /...libc...)
- by 0x........: (below main)
+ ...
Open AF_UNIX socket .: <unknown>
- at 0x........: socketpair (in /...libc...)
- by 0x........: (below main)
+ ...
Open file descriptor .: .
<inherited from parent>
Deleted: trunk/none/tests/fdleak_socketpair.stderr.exp2
===================================================================
--- trunk/none/tests/fdleak_socketpair.stderr.exp2 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/fdleak_socketpair.stderr.exp2 2009-02-17 06:55:10 UTC (rev 9194)
@@ -1,21 +0,0 @@
-
-
-FILE DESCRIPTORS: 5 open at exit.
-Open AF_UNIX socket .: <unknown>
- at 0x........: socketpair (in /...libc...)
- by 0x........: main (fdleak_socketpair.c:15)
-
-Open AF_UNIX socket .: <unknown>
- at 0x........: socketpair (in /...libc...)
- by 0x........: main (fdleak_socketpair.c:15)
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: .
- <inherited from parent>
-
-Open file descriptor .: /dev/null
- <inherited from parent>
-
-
Modified: trunk/none/tests/filter_fdleak
===================================================================
--- trunk/none/tests/filter_fdleak 2009-02-17 04:31:18 UTC (rev 9193)
+++ trunk/none/tests/filter_fdleak 2009-02-17 06:55:10 UTC (rev 9194)
@@ -9,4 +9,15 @@
sed s/"^Open \(AF_UNIX socket\|file descriptor\) [0-9]*: \/tmp\/\(sock\|data1\|data2\|file\)\.[0-9]*/Open \\1 .: \/tmp\/\\2/" |
sed s/"^Open file descriptor [0-9]*: .*/Open file descriptor .: ./" |
sed s/"^Open file descriptor [0-9]*:$/Open file descriptor .:/" |
-sed s/"127.0.0.1:[0-9]*/127.0.0.1:.../g"
+sed s/"127.0.0.1:[0-9]*/127.0.0.1:.../g" |
+
+# Stack traces showing where fds were created have lots of variations:
+# different numbers of entries, line numbers or not depending on whether
+# libc debug info is present, 'main' vs. '(below main)', etc.
+#
+# So we just cut out the entire stack trace. It's coarse but effective;
+# before we did this we had a plethora of expected outputs, with only
+# painfully minor variations between them.
+perl -p -0 -e 's/(Open[^\n]*)\n( (at|by)[^\n]*\n)+/$1\n ...\n/gs'
+
+
|
Author: njn
Date: 2009-02-17 04:31:18 +0000 (Tue, 17 Feb 2009)
New Revision: 9193
Log:
In the core, include malloc_usable_size() as one of the functions that must
be replaced if malloc() et al are replaced by a tool. This is because
different tools implement the function in different ways.
Add an appropriate malloc_usable_size() replacement to each of Memcheck,
Helgrind, DRD, Ptrcheck, Massif.
Update memcheck/tests/malloc_usable and add massif/tests/malloc_usable.
Merged from the DARWIN branch.
Added:
trunk/massif/tests/malloc_usable.c
trunk/massif/tests/malloc_usable.stderr.exp
trunk/massif/tests/malloc_usable.vgtest
Modified:
trunk/coregrind/m_mallocfree.c
trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_tooliface.c
trunk/coregrind/pub_core_mallocfree.h
trunk/coregrind/pub_core_replacemalloc.h
trunk/coregrind/pub_core_tooliface.h
trunk/drd/drd_malloc_wrappers.c
trunk/exp-ptrcheck/h_main.c
trunk/exp-ptrcheck/h_main.h
trunk/exp-ptrcheck/pc_main.c
trunk/helgrind/hg_main.c
trunk/include/pub_tool_tooliface.h
trunk/massif/ms_main.c
trunk/massif/tests/Makefile.am
trunk/memcheck/mc_include.h
trunk/memcheck/mc_main.c
trunk/memcheck/mc_malloc_wrappers.c
trunk/memcheck/tests/malloc_usable.c
Modified: trunk/coregrind/m_mallocfree.c
===================================================================
--- trunk/coregrind/m_mallocfree.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/coregrind/m_mallocfree.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -1664,8 +1664,7 @@
}
-// The ThreadId doesn't matter, it's not used.
-SizeT VG_(arena_payload_szB) ( ThreadId tid, ArenaId aid, void* ptr )
+SizeT VG_(arena_malloc_usable_size) ( ArenaId aid, void* ptr )
{
Arena* a = arenaId_to_ArenaP(aid);
Block* b = get_payload_block(a, ptr);
@@ -1853,7 +1852,7 @@
// Useful for querying user blocks.
SizeT VG_(malloc_usable_size) ( void* p )
{
- return VG_(arena_payload_szB)(VG_INVALID_THREADID, VG_AR_CLIENT, p);
+ return VG_(arena_malloc_usable_size)(VG_AR_CLIENT, p);
}
Modified: trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
===================================================================
--- trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -559,8 +559,7 @@
if (NULL == p) \
return 0; \
\
- pszB = (SizeT)VALGRIND_NON_SIMD_CALL2( info.arena_payload_szB, \
- VG_AR_CLIENT, p ); \
+ pszB = (SizeT)VALGRIND_NON_SIMD_CALL1( info.tl_malloc_usable_size, p ); \
MALLOC_TRACE(" = %llu", (ULong)pszB ); \
\
return pszB; \
Modified: trunk/coregrind/m_scheduler/scheduler.c
===================================================================
--- trunk/coregrind/m_scheduler/scheduler.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/coregrind/m_scheduler/scheduler.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -1372,8 +1372,8 @@
info->tl_free = VG_(tdict).tool_free;
info->tl___builtin_delete = VG_(tdict).tool___builtin_delete;
info->tl___builtin_vec_delete = VG_(tdict).tool___builtin_vec_delete;
+ info->tl_malloc_usable_size = VG_(tdict).tool_malloc_usable_size;
- info->arena_payload_szB = VG_(arena_payload_szB);
info->mallinfo = VG_(mallinfo);
info->clo_trace_malloc = VG_(clo_trace_malloc);
Modified: trunk/coregrind/m_tooliface.c
===================================================================
--- trunk/coregrind/m_tooliface.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/coregrind/m_tooliface.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -298,6 +298,7 @@
void (*__builtin_delete) ( ThreadId, void* ),
void (*__builtin_vec_delete) ( ThreadId, void* ),
void* (*realloc) ( ThreadId, void*, SizeT ),
+ SizeT (*malloc_usable_size) ( ThreadId, void* ),
SizeT client_malloc_redzone_szB
)
{
@@ -311,6 +312,7 @@
VG_(tdict).tool___builtin_delete = __builtin_delete;
VG_(tdict).tool___builtin_vec_delete = __builtin_vec_delete;
VG_(tdict).tool_realloc = realloc;
+ VG_(tdict).tool_malloc_usable_size = malloc_usable_size;
VG_(tdict).tool_client_redzone_szB = client_malloc_redzone_szB;
}
Modified: trunk/coregrind/pub_core_mallocfree.h
===================================================================
--- trunk/coregrind/pub_core_mallocfree.h 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/coregrind/pub_core_mallocfree.h 2009-02-17 04:31:18 UTC (rev 9193)
@@ -100,6 +100,8 @@
// Nb: The ThreadId doesn't matter, it's not used.
extern SizeT VG_(arena_payload_szB) ( ThreadId tid, ArenaId aid, void* payload );
+extern SizeT VG_(arena_malloc_usable_size) ( ArenaId aid, void* payload );
+
extern void VG_(mallinfo) ( ThreadId tid, struct vg_mallinfo* mi );
extern void VG_(sanity_check_malloc_all) ( void );
Modified: trunk/coregrind/pub_core_replacemalloc.h
===================================================================
--- trunk/coregrind/pub_core_replacemalloc.h 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/coregrind/pub_core_replacemalloc.h 2009-02-17 04:31:18 UTC (rev 9193)
@@ -49,7 +49,7 @@
void (*tl___builtin_delete) (ThreadId tid, void* p);
void (*tl___builtin_vec_delete)(ThreadId tid, void* p);
void* (*tl_realloc) (ThreadId tid, void* p, SizeT size);
- SizeT (*arena_payload_szB) (ThreadId tid, ArenaId aid, void* payload);
+ SizeT (*tl_malloc_usable_size) (ThreadId tid, void* payload);
void (*mallinfo) (ThreadId tid, struct vg_mallinfo* mi);
Bool clo_trace_malloc;
};
Modified: trunk/coregrind/pub_core_tooliface.h
===================================================================
--- trunk/coregrind/pub_core_tooliface.h 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/coregrind/pub_core_tooliface.h 2009-02-17 04:31:18 UTC (rev 9193)
@@ -155,6 +155,7 @@
void (*tool___builtin_delete) (ThreadId, void*);
void (*tool___builtin_vec_delete)(ThreadId, void*);
void* (*tool_realloc) (ThreadId, void*, SizeT);
+ SizeT (*tool_malloc_usable_size) (ThreadId, void*);
SizeT tool_client_redzone_szB;
// VG_(needs).final_IR_tidy_pass
Modified: trunk/drd/drd_malloc_wrappers.c
===================================================================
--- trunk/drd/drd_malloc_wrappers.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/drd/drd_malloc_wrappers.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -243,6 +243,15 @@
DRD_(handle_free)(tid, (Addr)p);
}
+static SizeT DRD_(malloc_usable_size) ( ThreadId tid, void* p )
+{
+ DRD_Chunk *mc = VG_(HT_lookup)( DRD_(s_malloc_list), (UWord)p );
+
+ // There may be slop, but pretend there isn't because only the asked-for
+ // area will have been shadowed properly.
+ return ( mc ? mc->size : 0 );
+}
+
void DRD_(register_malloc_wrappers)(const StartUsingMem start_callback,
const StopUsingMem stop_callback)
{
@@ -264,6 +273,7 @@
DRD_(__builtin_delete),
DRD_(__builtin_vec_delete),
DRD_(realloc),
+ DRD_(malloc_usable_size),
0);
}
Modified: trunk/exp-ptrcheck/h_main.c
===================================================================
--- trunk/exp-ptrcheck/h_main.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/exp-ptrcheck/h_main.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -999,7 +999,16 @@
}
}
+SizeT h_replace_malloc_usable_size ( ThreadId tid, void* p )
+{
+ Seg* seg = find_Seg_by_addr( (Addr)p );
+ // There may be slop, but pretend there isn't because only the asked-for
+ // area will have been shadowed properly.
+ return ( seg ? seg->szB : 0 );
+}
+
+
/*------------------------------------------------------------*/
/*--- Memory events ---*/
/*------------------------------------------------------------*/
Modified: trunk/exp-ptrcheck/h_main.h
===================================================================
--- trunk/exp-ptrcheck/h_main.h 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/exp-ptrcheck/h_main.h 2009-02-17 04:31:18 UTC (rev 9193)
@@ -65,6 +65,7 @@
void h_replace___builtin_delete ( ThreadId tid, void* p );
void h_replace___builtin_vec_delete ( ThreadId tid, void* p );
void* h_replace_realloc ( ThreadId tid, void* p_old, SizeT new_size );
+SizeT h_replace_malloc_usable_size ( ThreadId tid, void* p );
void h_new_mem_startup( Addr a, SizeT len,
Bool rr, Bool ww, Bool xx, ULong di_handle );
Modified: trunk/exp-ptrcheck/pc_main.c
===================================================================
--- trunk/exp-ptrcheck/pc_main.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/exp-ptrcheck/pc_main.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -166,6 +166,7 @@
h_replace___builtin_delete,
h_replace___builtin_vec_delete,
h_replace_realloc,
+ h_replace_malloc_usable_size,
0 /* no need for client heap redzones */ );
VG_(needs_var_info) ();
Modified: trunk/helgrind/hg_main.c
===================================================================
--- trunk/helgrind/hg_main.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/helgrind/hg_main.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -3475,7 +3475,16 @@
}
}
+static SizeT hg_cli_malloc_usable_size ( ThreadId tid, void* p )
+{
+ MallocMeta *md = VG_(HT_lookup)( hg_mallocmeta_table, (UWord)p );
+ // There may be slop, but pretend there isn't because only the asked-for
+ // area will have been shadowed properly.
+ return ( md ? md->szB : 0 );
+}
+
+
/*--------------------------------------------------------------*/
/*--- Instrumentation ---*/
/*--------------------------------------------------------------*/
@@ -4222,6 +4231,7 @@
hg_cli____builtin_delete,
hg_cli____builtin_vec_delete,
hg_cli__realloc,
+ hg_cli_malloc_usable_size,
HG_CLI__MALLOC_REDZONE_SZB );
/* 21 Dec 08: disabled this; it mostly causes H to start more
Modified: trunk/include/pub_tool_tooliface.h
===================================================================
--- trunk/include/pub_tool_tooliface.h 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/include/pub_tool_tooliface.h 2009-02-17 04:31:18 UTC (rev 9193)
@@ -433,6 +433,7 @@
void (*p__builtin_delete) ( ThreadId tid, void* p ),
void (*p__builtin_vec_delete) ( ThreadId tid, void* p ),
void* (*prealloc) ( ThreadId tid, void* p, SizeT new_size ),
+ SizeT (*pmalloc_usable_size) ( ThreadId tid, void* p),
SizeT client_malloc_redzone_szB
);
Modified: trunk/massif/ms_main.c
===================================================================
--- trunk/massif/ms_main.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/massif/ms_main.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -1687,7 +1687,13 @@
return renew_block(tid, p_old, new_szB);
}
+static SizeT ms_malloc_usable_size ( ThreadId tid, void* p )
+{
+ HP_Chunk* hc = VG_(HT_lookup)( malloc_list, (UWord)p );
+ return ( hc ? hc->req_szB + hc->slop_szB : 0 );
+}
+
//------------------------------------------------------------//
//--- Stacks ---//
//------------------------------------------------------------//
@@ -2225,6 +2231,7 @@
ms___builtin_delete,
ms___builtin_vec_delete,
ms_realloc,
+ ms_malloc_usable_size,
0 );
// HP_Chunks
Modified: trunk/massif/tests/Makefile.am
===================================================================
--- trunk/massif/tests/Makefile.am 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/massif/tests/Makefile.am 2009-02-17 04:31:18 UTC (rev 9193)
@@ -21,6 +21,7 @@
ignoring.post.exp ignoring.stderr.exp ignoring.vgtest \
long-names.post.exp long-names.stderr.exp long-names.vgtest \
long-time.post.exp long-time.stderr.exp long-time.vgtest \
+ malloc_usable.stderr.exp malloc_usable.vgtest \
new-cpp.post.exp new-cpp.stderr.exp new-cpp.vgtest \
no-stack-no-heap.post.exp no-stack-no-heap.stderr.exp no-stack-no-heap.vgtest \
null.post.exp null.stderr.exp null.vgtest \
@@ -57,6 +58,7 @@
insig \
long-names \
long-time \
+ malloc_usable \
new-cpp \
null \
one \
Copied: trunk/massif/tests/malloc_usable.c (from rev 9188, trunk/memcheck/tests/malloc_usable.c)
===================================================================
--- trunk/massif/tests/malloc_usable.c (rev 0)
+++ trunk/massif/tests/malloc_usable.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -0,0 +1,21 @@
+#include <assert.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(void)
+{
+ // Because our allocations are in multiples of 8 or 16, 99 will round up
+ // to 104 or 112.
+ int* x = malloc(99);
+
+ // XXX: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
+# if !defined(_AIX)
+ assert(104 == malloc_usable_size(x) ||
+ 112 == malloc_usable_size(x));
+ assert( 0 == malloc_usable_size(NULL));
+ assert( 0 == malloc_usable_size((void*)0xdeadbeef));
+# endif
+
+ return 0;
+}
Property changes on: trunk/massif/tests/malloc_usable.c
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/massif/tests/malloc_usable.stderr.exp (from rev 9188, trunk/memcheck/tests/malloc_usable.stderr.exp)
===================================================================
Property changes on: trunk/massif/tests/malloc_usable.stderr.exp
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/massif/tests/malloc_usable.vgtest (from rev 9188, trunk/memcheck/tests/malloc_usable.vgtest)
===================================================================
--- trunk/massif/tests/malloc_usable.vgtest (rev 0)
+++ trunk/massif/tests/malloc_usable.vgtest 2009-02-17 04:31:18 UTC (rev 9193)
@@ -0,0 +1,2 @@
+prog: malloc_usable
+vgopts: -q
Property changes on: trunk/massif/tests/malloc_usable.vgtest
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/memcheck/mc_include.h
===================================================================
--- trunk/memcheck/mc_include.h 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/memcheck/mc_include.h 2009-02-17 04:31:18 UTC (rev 9193)
@@ -121,6 +121,7 @@
void MC_(__builtin_delete) ( ThreadId tid, void* p );
void MC_(__builtin_vec_delete) ( ThreadId tid, void* p );
void* MC_(realloc) ( ThreadId tid, void* p, SizeT new_size );
+SizeT MC_(malloc_usable_size) ( ThreadId tid, void* p );
/*------------------------------------------------------------*/
Modified: trunk/memcheck/mc_main.c
===================================================================
--- trunk/memcheck/mc_main.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/memcheck/mc_main.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -5711,6 +5711,7 @@
MC_(__builtin_delete),
MC_(__builtin_vec_delete),
MC_(realloc),
+ MC_(malloc_usable_size),
MC_MALLOC_REDZONE_SZB );
VG_(needs_xml_output) ();
Modified: trunk/memcheck/mc_malloc_wrappers.c
===================================================================
--- trunk/memcheck/mc_malloc_wrappers.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/memcheck/mc_malloc_wrappers.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -483,6 +483,15 @@
return p_new;
}
+SizeT MC_(malloc_usable_size) ( ThreadId tid, void* p )
+{
+ MC_Chunk* mc = VG_(HT_lookup) ( MC_(malloc_list), (UWord)p );
+
+ // There may be slop, but pretend there isn't because only the asked-for
+ // area will be marked as addressable.
+ return ( mc ? mc->szB : 0 );
+}
+
/* Memory pool stuff. */
void MC_(create_mempool)(Addr pool, UInt rzB, Bool is_zeroed)
Modified: trunk/memcheck/tests/malloc_usable.c
===================================================================
--- trunk/memcheck/tests/malloc_usable.c 2009-02-17 04:23:54 UTC (rev 9192)
+++ trunk/memcheck/tests/malloc_usable.c 2009-02-17 04:31:18 UTC (rev 9193)
@@ -5,10 +5,16 @@
int main(void)
{
- // Since our allocations are in multiples of 8, 99 will round up to 104.
+ // Because Memcheck marks any slop as inaccessible, it doesn't round up
+ // sizes for malloc_usable_size().
int* x = malloc(99);
+
+ // DDD: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
# if !defined(_AIX)
- assert(104 == malloc_usable_size(x));
+ assert(99 == malloc_usable_size(x));
+ assert( 0 == malloc_usable_size(NULL));
+ assert( 0 == malloc_usable_size((void*)0xdeadbeef));
# endif
+
return 0;
}
|
|
From: <sv...@va...> - 2009-02-17 04:24:06
|
Author: njn
Date: 2009-02-17 04:23:54 +0000 (Tue, 17 Feb 2009)
New Revision: 9192
Log:
Remove an unnecessary comment.
Modified:
branches/DARWIN/memcheck/mc_malloc_wrappers.c
Modified: branches/DARWIN/memcheck/mc_malloc_wrappers.c
===================================================================
--- branches/DARWIN/memcheck/mc_malloc_wrappers.c 2009-02-17 04:12:46 UTC (rev 9191)
+++ branches/DARWIN/memcheck/mc_malloc_wrappers.c 2009-02-17 04:23:54 UTC (rev 9192)
@@ -484,8 +484,6 @@
return p_new;
}
-// Memcheck's allocator always gives the client exactly as much
-// memory as they asked for, with no additional alignment padding.
SizeT MC_(malloc_usable_size) ( ThreadId tid, void* p )
{
MC_Chunk* mc = VG_(HT_lookup) ( MC_(malloc_list), (UWord)p );
|
|
From: <sv...@va...> - 2009-02-17 04:12:51
|
Author: njn
Date: 2009-02-17 04:12:46 +0000 (Tue, 17 Feb 2009)
New Revision: 9191
Log:
Make these compile on Darwin.
Modified:
branches/DARWIN/massif/tests/malloc_usable.c
branches/DARWIN/memcheck/tests/malloc_usable.c
Modified: branches/DARWIN/massif/tests/malloc_usable.c
===================================================================
--- branches/DARWIN/massif/tests/malloc_usable.c 2009-02-17 04:00:35 UTC (rev 9190)
+++ branches/DARWIN/massif/tests/malloc_usable.c 2009-02-17 04:12:46 UTC (rev 9191)
@@ -14,7 +14,7 @@
int* x = malloc(99);
// DDD: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
-# if !defined(_AIX)
+# if !defined(_AIX) && !defined(__APPLE__)
assert(104 == malloc_usable_size(x) ||
112 == malloc_usable_size(x));
assert( 0 == malloc_usable_size(NULL));
Modified: branches/DARWIN/memcheck/tests/malloc_usable.c
===================================================================
--- branches/DARWIN/memcheck/tests/malloc_usable.c 2009-02-17 04:00:35 UTC (rev 9190)
+++ branches/DARWIN/memcheck/tests/malloc_usable.c 2009-02-17 04:12:46 UTC (rev 9191)
@@ -14,7 +14,7 @@
int* x = malloc(99);
// DDD: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
-# if !defined(_AIX)
+# if !defined(_AIX) && !defined(__APPLE__)
assert(99 == malloc_usable_size(x));
assert( 0 == malloc_usable_size(NULL));
assert( 0 == malloc_usable_size((void*)0xdeadbeef));
|
|
From: <sv...@va...> - 2009-02-17 04:01:08
|
Author: njn
Date: 2009-02-17 04:00:35 +0000 (Tue, 17 Feb 2009)
New Revision: 9190
Log:
Defined VG_MIN_MALLOC_SZB on a platform-by-platform basis.
Added malloc_usable_size replacements for DRD, Ptrcheck and Massif. tweaked
those for already present for Helgrind and Memcheck.
Fixed the relevant test for Memcheck, added one for Massif.
Added:
branches/DARWIN/massif/tests/malloc_usable.c
branches/DARWIN/massif/tests/malloc_usable.stderr.exp
branches/DARWIN/massif/tests/malloc_usable.vgtest
Modified:
branches/DARWIN/coregrind/pub_core_mallocfree.h
branches/DARWIN/drd/drd_malloc_wrappers.c
branches/DARWIN/exp-ptrcheck/h_main.c
branches/DARWIN/exp-ptrcheck/h_main.h
branches/DARWIN/exp-ptrcheck/pc_main.c
branches/DARWIN/helgrind/hg_main.c
branches/DARWIN/massif/ms_main.c
branches/DARWIN/massif/tests/Makefile.am
branches/DARWIN/massif/tests/toobig-allocs.vgtest
branches/DARWIN/memcheck/mc_malloc_wrappers.c
branches/DARWIN/memcheck/tests/malloc_usable.c
Modified: branches/DARWIN/coregrind/pub_core_mallocfree.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_mallocfree.h 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/coregrind/pub_core_mallocfree.h 2009-02-17 04:00:35 UTC (rev 9190)
@@ -69,10 +69,20 @@
// This is both the minimum payload size of a malloc'd block, and its
// minimum alignment. Must be a power of 2 greater than 4, and should be
// greater than 8.
-#if defined(VGO_darwin)
+#if defined(VGP_x86_linux) || \
+ defined(VGP_ppc32_linux) || \
+ defined(VGP_ppc32_aix5)
+# define VG_MIN_MALLOC_SZB 8
+// Nb: We always use 16 bytes for Darwin, even on 32-bits, so it can be used
+// for any AltiVec- or SSE-related type.
+#elif defined(VGP_amd64_linux) || \
+ defined(VGP_ppc64_linux) || \
+ defined(VGP_ppc64_aix5) || \
+ defined(VGP_x86_darwin) || \
+ defined(VGP_amd64_darwin)
# define VG_MIN_MALLOC_SZB 16
#else
-# define VG_MIN_MALLOC_SZB 8
+# error Unknown platform
#endif
/* This struct definition MUST match the system one. */
Modified: branches/DARWIN/drd/drd_malloc_wrappers.c
===================================================================
--- branches/DARWIN/drd/drd_malloc_wrappers.c 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/drd/drd_malloc_wrappers.c 2009-02-17 04:00:35 UTC (rev 9190)
@@ -243,6 +243,15 @@
DRD_(handle_free)(tid, (Addr)p);
}
+static SizeT DRD_(malloc_usable_size) ( ThreadId tid, void* p )
+{
+ DRD_Chunk *mc = VG_(HT_lookup)( DRD_(s_malloc_list), (UWord)p );
+
+ // There may be slop, but pretend there isn't because only the asked-for
+ // area will have been shadowed properly.
+ return ( mc ? mc->size : 0 );
+}
+
void DRD_(register_malloc_wrappers)(const StartUsingMem start_callback,
const StopUsingMem stop_callback)
{
@@ -264,7 +273,7 @@
DRD_(__builtin_delete),
DRD_(__builtin_vec_delete),
DRD_(realloc),
- NULL, // DDD: malloc_usable_size
+ DRD_(malloc_usable_size),
0);
}
Modified: branches/DARWIN/exp-ptrcheck/h_main.c
===================================================================
--- branches/DARWIN/exp-ptrcheck/h_main.c 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/exp-ptrcheck/h_main.c 2009-02-17 04:00:35 UTC (rev 9190)
@@ -999,7 +999,16 @@
}
}
+SizeT h_replace_malloc_usable_size ( ThreadId tid, void* p )
+{
+ Seg* seg = find_Seg_by_addr( (Addr)p );
+ // There may be slop, but pretend there isn't because only the asked-for
+ // area will have been shadowed properly.
+ return ( seg ? seg->szB : 0 );
+}
+
+
/*------------------------------------------------------------*/
/*--- Memory events ---*/
/*------------------------------------------------------------*/
Modified: branches/DARWIN/exp-ptrcheck/h_main.h
===================================================================
--- branches/DARWIN/exp-ptrcheck/h_main.h 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/exp-ptrcheck/h_main.h 2009-02-17 04:00:35 UTC (rev 9190)
@@ -65,6 +65,7 @@
void h_replace___builtin_delete ( ThreadId tid, void* p );
void h_replace___builtin_vec_delete ( ThreadId tid, void* p );
void* h_replace_realloc ( ThreadId tid, void* p_old, SizeT new_size );
+SizeT h_replace_malloc_usable_size ( ThreadId tid, void* p );
void h_new_mem_startup( Addr a, SizeT len,
Bool rr, Bool ww, Bool xx, ULong di_handle );
Modified: branches/DARWIN/exp-ptrcheck/pc_main.c
===================================================================
--- branches/DARWIN/exp-ptrcheck/pc_main.c 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/exp-ptrcheck/pc_main.c 2009-02-17 04:00:35 UTC (rev 9190)
@@ -166,7 +166,7 @@
h_replace___builtin_delete,
h_replace___builtin_vec_delete,
h_replace_realloc,
- NULL, // DDD: malloc_usable_size
+ h_replace_malloc_usable_size,
0 /* no need for client heap redzones */ );
VG_(needs_var_info) ();
Modified: branches/DARWIN/helgrind/hg_main.c
===================================================================
--- branches/DARWIN/helgrind/hg_main.c 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/helgrind/hg_main.c 2009-02-17 04:00:35 UTC (rev 9190)
@@ -3468,16 +3468,11 @@
static SizeT hg_cli_malloc_usable_size ( ThreadId tid, void* p )
{
- MallocMeta *md;
+ MallocMeta *md = VG_(HT_lookup)( hg_mallocmeta_table, (UWord)p );
- /* First try and find the block. */
- md = (MallocMeta*) VG_(HT_lookup)( hg_mallocmeta_table, (UWord)p );
-
- if (md == NULL) {
- return 0;
- }
-
- return md->szB;
+ // There may be slop, but pretend there isn't because only the asked-for
+ // area will have been shadowed properly.
+ return ( md ? md->szB : 0 );
}
Modified: branches/DARWIN/massif/ms_main.c
===================================================================
--- branches/DARWIN/massif/ms_main.c 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/massif/ms_main.c 2009-02-17 04:00:35 UTC (rev 9190)
@@ -1561,10 +1561,8 @@
static __inline__
void die_block ( void* p, Bool custom_free )
{
- HP_Chunk* hc;
-
// Remove HP_Chunk from malloc_list
- hc = VG_(HT_remove)(malloc_list, (UWord)p);
+ HP_Chunk* hc = VG_(HT_remove)(malloc_list, (UWord)p);
if (NULL == hc) {
return; // must have been a bogus free()
}
@@ -1768,7 +1766,13 @@
return renew_block(tid, p_old, new_szB);
}
+static SizeT ms_malloc_usable_size ( ThreadId tid, void* p )
+{
+ HP_Chunk* hc = VG_(HT_lookup)( malloc_list, (UWord)p );
+ return ( hc ? hc->req_szB + hc->slop_szB : 0 );
+}
+
//------------------------------------------------------------//
//--- Stacks ---//
//------------------------------------------------------------//
@@ -2339,7 +2343,7 @@
ms___builtin_delete,
ms___builtin_vec_delete,
ms_realloc,
- NULL,
+ ms_malloc_usable_size,
0 );
// HP_Chunks.
Modified: branches/DARWIN/massif/tests/Makefile.am
===================================================================
--- branches/DARWIN/massif/tests/Makefile.am 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/massif/tests/Makefile.am 2009-02-17 04:00:35 UTC (rev 9190)
@@ -25,6 +25,7 @@
insig.post.exp insig.stderr.exp insig.vgtest \
long-names.post.exp long-names.stderr.exp long-names.vgtest \
long-time.post.exp long-time.stderr.exp long-time.vgtest \
+ malloc_usable.stderr.exp malloc_usable.vgtest \
new-cpp.post.exp new-cpp.stderr.exp new-cpp.vgtest \
no-stack-no-heap.post.exp no-stack-no-heap.stderr.exp no-stack-no-heap.vgtest \
null.post.exp null.stderr.exp null.vgtest \
@@ -62,6 +63,7 @@
insig \
long-names \
long-time \
+ malloc_usable \
new-cpp \
null \
one \
Copied: branches/DARWIN/massif/tests/malloc_usable.c (from rev 9187, branches/DARWIN/memcheck/tests/malloc_usable.c)
===================================================================
--- branches/DARWIN/massif/tests/malloc_usable.c (rev 0)
+++ branches/DARWIN/massif/tests/malloc_usable.c 2009-02-17 04:00:35 UTC (rev 9190)
@@ -0,0 +1,25 @@
+#include <assert.h>
+#if defined(__APPLE__)
+#include <malloc/malloc.h>
+#else
+#include <malloc.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(void)
+{
+ // Because our allocations are in multiples of 8 or 16, 99 will round up
+ // to 104 or 112.
+ int* x = malloc(99);
+
+ // DDD: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
+# if !defined(_AIX)
+ assert(104 == malloc_usable_size(x) ||
+ 112 == malloc_usable_size(x));
+ assert( 0 == malloc_usable_size(NULL));
+ assert( 0 == malloc_usable_size((void*)0xdeadbeef));
+# endif
+
+ return 0;
+}
Property changes on: branches/DARWIN/massif/tests/malloc_usable.c
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: branches/DARWIN/massif/tests/malloc_usable.stderr.exp (from rev 9187, branches/DARWIN/memcheck/tests/malloc_usable.stderr.exp)
===================================================================
--- branches/DARWIN/massif/tests/malloc_usable.stderr.exp (rev 0)
+++ branches/DARWIN/massif/tests/malloc_usable.stderr.exp 2009-02-17 04:00:35 UTC (rev 9190)
@@ -0,0 +1,2 @@
+
+
Property changes on: branches/DARWIN/massif/tests/malloc_usable.stderr.exp
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: branches/DARWIN/massif/tests/malloc_usable.vgtest (from rev 9187, branches/DARWIN/memcheck/tests/malloc_usable.vgtest)
===================================================================
--- branches/DARWIN/massif/tests/malloc_usable.vgtest (rev 0)
+++ branches/DARWIN/massif/tests/malloc_usable.vgtest 2009-02-17 04:00:35 UTC (rev 9190)
@@ -0,0 +1,3 @@
+prog: malloc_usable
+vgopts: --massif-out-file=massif.out
+cleanup: rm massif.out
Property changes on: branches/DARWIN/massif/tests/malloc_usable.vgtest
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: branches/DARWIN/massif/tests/toobig-allocs.vgtest
===================================================================
--- branches/DARWIN/massif/tests/toobig-allocs.vgtest 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/massif/tests/toobig-allocs.vgtest 2009-02-17 04:00:35 UTC (rev 9190)
@@ -1,4 +1,3 @@
prog: ../../tests/toobig-allocs
vgopts: --massif-out-file=massif.out
-vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
cleanup: rm massif.out
Modified: branches/DARWIN/memcheck/mc_malloc_wrappers.c
===================================================================
--- branches/DARWIN/memcheck/mc_malloc_wrappers.c 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/memcheck/mc_malloc_wrappers.c 2009-02-17 04:00:35 UTC (rev 9190)
@@ -488,15 +488,11 @@
// memory as they asked for, with no additional alignment padding.
SizeT MC_(malloc_usable_size) ( ThreadId tid, void* p )
{
- if (p) {
- MC_Chunk* mc = VG_(HT_lookup) ( MC_(malloc_list), (UWord)p );
- if (mc) {
- return mc->szB;
- }
- }
+ MC_Chunk* mc = VG_(HT_lookup) ( MC_(malloc_list), (UWord)p );
- // bad pointer or no pointer - Linux and Darwin both return 0 with no error.
- return 0;
+ // There may be slop, but pretend there isn't because only the asked-for
+ // area will be marked as addressable.
+ return ( mc ? mc->szB : 0 );
}
Modified: branches/DARWIN/memcheck/tests/malloc_usable.c
===================================================================
--- branches/DARWIN/memcheck/tests/malloc_usable.c 2009-02-17 00:50:45 UTC (rev 9189)
+++ branches/DARWIN/memcheck/tests/malloc_usable.c 2009-02-17 04:00:35 UTC (rev 9190)
@@ -9,10 +9,16 @@
int main(void)
{
- // Since our allocations are in multiples of 8, 99 will round up to 104.
+ // Because Memcheck marks any slop as inaccessible, it doesn't round up
+ // sizes for malloc_usable_size().
int* x = malloc(99);
-# if !defined(_AIX) && !defined(__APPLE__)
- assert(104 == malloc_usable_size(x));
+
+ // DDD: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
+# if !defined(_AIX)
+ assert(99 == malloc_usable_size(x));
+ assert( 0 == malloc_usable_size(NULL));
+ assert( 0 == malloc_usable_size((void*)0xdeadbeef));
# endif
+
return 0;
}
|
|
From: Nicholas N. <n.n...@gm...> - 2009-02-17 03:55:19
|
On Tue, Feb 17, 2009 at 2:47 PM, Tom Hughes <th...@cy...> wrote: > > Nightly build on vauxhall ( x86_64, Fedora 10 ) started at 2009-02-17 03:20:06 GMT > Results differ from 24 hours ago > > Checking out valgrind source tree ... done > Configuring valgrind ... done > Building valgrind ... done > Running regression tests ... done > > Regression test results follow > > == 486 tests, 0 stderr failures, 0 stdout failures, 0 post failures == > > Congratulations, all tests passed! Woo! N |
|
From: Tom H. <th...@cy...> - 2009-02-17 03:47:54
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) started at 2009-02-17 03:20:06 GMT
Results differ from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... done
Regression test results follow
== 486 tests, 0 stderr failures, 0 stdout failures, 0 post failures ==
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 486 tests, 1 stderr failure, 0 stdout failures, 0 post failures ==
memcheck/tests/x86-linux/scalar (stderr)
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Tue Feb 17 03:34:06 2009
--- new.short Tue Feb 17 03:47:48 2009
***************
*** 4,6 ****
Building valgrind ... done
! Running regression tests ... failed
--- 4,6 ----
Building valgrind ... done
! Running regression tests ... done
***************
*** 8,11 ****
! == 486 tests, 1 stderr failure, 0 stdout failures, 0 post failures ==
! memcheck/tests/x86-linux/scalar (stderr)
--- 8,10 ----
! == 486 tests, 0 stderr failures, 0 stdout failures, 0 post failures ==
|
|
From: Tom H. <th...@cy...> - 2009-02-17 03:43:53
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-02-17 03:05:06 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 477 tests, 5 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) helgrind/tests/tc20_verifywrap (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 477 tests, 6 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) helgrind/tests/tc20_verifywrap (stderr) memcheck/tests/x86-linux/scalar (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 17 03:24:26 2009 --- new.short Tue Feb 17 03:43:44 2009 *************** *** 8,10 **** ! == 477 tests, 6 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) --- 8,10 ---- ! == 477 tests, 5 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) *************** *** 14,16 **** helgrind/tests/tc20_verifywrap (stderr) - memcheck/tests/x86-linux/scalar (stderr) --- 14,15 ---- |
|
From: Tom H. <th...@cy...> - 2009-02-17 03:32:15
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-02-17 03:10:06 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 483 tests, 4 stderr failures, 2 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) memcheck/tests/linux/timerfd-syscall (stdout) none/tests/linux/mremap2 (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 483 tests, 5 stderr failures, 3 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) memcheck/tests/linux/timerfd-syscall (stdout) memcheck/tests/x86-linux/scalar (stderr) none/tests/linux/mremap2 (stdout) none/tests/pth_cvsimple (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 17 03:21:07 2009 --- new.short Tue Feb 17 03:32:07 2009 *************** *** 8,10 **** ! == 483 tests, 5 stderr failures, 3 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) --- 8,10 ---- ! == 483 tests, 4 stderr failures, 2 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) *************** *** 14,18 **** memcheck/tests/linux/timerfd-syscall (stdout) - memcheck/tests/x86-linux/scalar (stderr) none/tests/linux/mremap2 (stdout) - none/tests/pth_cvsimple (stdout) --- 14,16 ---- |
|
From: <sv...@va...> - 2009-02-17 00:50:50
|
Author: njn Date: 2009-02-17 00:50:45 +0000 (Tue, 17 Feb 2009) New Revision: 9189 Log: Merge r9188 (remove unnecessary Memcheck test filters) from the trunk. Removed: branches/DARWIN/drd/tests/filter_cmdline0 branches/DARWIN/drd/tests/filter_fdleak branches/DARWIN/drd/tests/filter_linenos branches/DARWIN/drd/tests/filter_none_discards branches/DARWIN/memcheck/tests/filter_malloc_free_fill branches/DARWIN/memcheck/tests/filter_stderr_backtrace branches/DARWIN/memcheck/tests/malloc_free_fill.stdout.exp Modified: branches/DARWIN/drd/tests/Makefile.am branches/DARWIN/memcheck/tests/Makefile.am branches/DARWIN/memcheck/tests/malloc_free_fill.vgtest branches/DARWIN/memcheck/tests/sigaltstack.vgtest Modified: branches/DARWIN/drd/tests/Makefile.am =================================================================== --- branches/DARWIN/drd/tests/Makefile.am 2009-02-17 00:47:10 UTC (rev 9188) +++ branches/DARWIN/drd/tests/Makefile.am 2009-02-17 00:50:45 UTC (rev 9189) @@ -9,11 +9,7 @@ DIST_SUBDIRS = . noinst_SCRIPTS = \ - filter_cmdline0 \ filter_error_summary \ - filter_fdleak \ - filter_linenos \ - filter_none_discards \ filter_stderr \ run_openmp_test \ supported_libpthread Deleted: branches/DARWIN/drd/tests/filter_cmdline0 =================================================================== --- branches/DARWIN/drd/tests/filter_cmdline0 2009-02-17 00:47:10 UTC (rev 9188) +++ branches/DARWIN/drd/tests/filter_cmdline0 2009-02-17 00:50:45 UTC (rev 9189) @@ -1,3 +0,0 @@ -#! /bin/sh - -sed "s/^valgrind-.*/valgrind-XXX/g" Deleted: branches/DARWIN/drd/tests/filter_fdleak =================================================================== --- branches/DARWIN/drd/tests/filter_fdleak 2009-02-17 00:47:10 UTC (rev 9188) +++ branches/DARWIN/drd/tests/filter_fdleak 2009-02-17 00:50:45 UTC (rev 9189) @@ -1,12 +0,0 @@ -#! /bin/sh - -dir=`dirname $0` - -./filter_stderr | - -sed s/"^Open AF_UNIX socket [0-9]*: <unknown>/Open AF_UNIX socket .: <unknown>/" | -sed s/"^Open \(AF_UNIX socket\|file descriptor\) [0-9]*: \/dev\/null/Open \\1 .: \/dev\/null/" | -sed s/"^Open \(AF_UNIX socket\|file descriptor\) [0-9]*: \/tmp\/\(sock\|data1\|data2\|file\)\.[0-9]*/Open \\1 .: \/tmp\/\\2/" | -sed s/"^Open file descriptor [0-9]*: .*/Open file descriptor .: ./" | -sed s/"^Open file descriptor [0-9]*:$/Open file descriptor .:/" | -sed s/"127.0.0.1:[0-9]*/127.0.0.1:.../g" Deleted: branches/DARWIN/drd/tests/filter_linenos =================================================================== --- branches/DARWIN/drd/tests/filter_linenos 2009-02-17 00:47:10 UTC (rev 9188) +++ branches/DARWIN/drd/tests/filter_linenos 2009-02-17 00:50:45 UTC (rev 9189) @@ -1,5 +0,0 @@ -#!/bin/sh - -dir=`dirname $0` - -$dir/filter_stderr | sed "s/ line [0-9]*://" Deleted: branches/DARWIN/drd/tests/filter_none_discards =================================================================== --- branches/DARWIN/drd/tests/filter_none_discards 2009-02-17 00:47:10 UTC (rev 9188) +++ branches/DARWIN/drd/tests/filter_none_discards 2009-02-17 00:50:45 UTC (rev 9189) @@ -1,6 +0,0 @@ -#! /bin/sh - -dir=`dirname $0` - -$dir/filter_stderr | $dir/../../tests/filter_discards - Modified: branches/DARWIN/memcheck/tests/Makefile.am =================================================================== --- branches/DARWIN/memcheck/tests/Makefile.am 2009-02-17 00:47:10 UTC (rev 9188) +++ branches/DARWIN/memcheck/tests/Makefile.am 2009-02-17 00:50:45 UTC (rev 9189) @@ -28,8 +28,8 @@ DIST_SUBDIRS = x86 amd64 linux x86-linux . noinst_SCRIPTS = filter_allocs filter_leak_check_size \ - filter_stderr filter_stderr_backtrace filter_xml \ - filter_varinfo3 filter_malloc_free_fill + filter_stderr filter_xml \ + filter_varinfo3 EXTRA_DIST = $(noinst_SCRIPTS) \ addressable.stderr.exp addressable.stdout.exp addressable.vgtest \ Deleted: branches/DARWIN/memcheck/tests/filter_malloc_free_fill =================================================================== --- branches/DARWIN/memcheck/tests/filter_malloc_free_fill 2009-02-17 00:47:10 UTC (rev 9188) +++ branches/DARWIN/memcheck/tests/filter_malloc_free_fill 2009-02-17 00:50:45 UTC (rev 9189) @@ -1,5 +0,0 @@ -#! /bin/sh - -./filter_stderr | -sed -e 's|^Use of uninitialised value of size [0-9]*$|Use of uninitialised value of size .|g' \ - -e 's|^ *at 0x\.*: _itoa_word (in /\.\.\.libc\.\.\.)$| at 0x........: (within /...libc...)|g' Deleted: branches/DARWIN/memcheck/tests/filter_stderr_backtrace =================================================================== --- branches/DARWIN/memcheck/tests/filter_stderr_backtrace 2009-02-17 00:47:10 UTC (rev 9188) +++ branches/DARWIN/memcheck/tests/filter_stderr_backtrace 2009-02-17 00:50:45 UTC (rev 9189) @@ -1,3 +0,0 @@ -#! /bin/sh -./filter_stderr | -sed "/^ by 0x........: /d" Deleted: branches/DARWIN/memcheck/tests/malloc_free_fill.stdout.exp =================================================================== Modified: branches/DARWIN/memcheck/tests/malloc_free_fill.vgtest =================================================================== --- branches/DARWIN/memcheck/tests/malloc_free_fill.vgtest 2009-02-17 00:47:10 UTC (rev 9188) +++ branches/DARWIN/memcheck/tests/malloc_free_fill.vgtest 2009-02-17 00:50:45 UTC (rev 9189) @@ -1,3 +1,2 @@ prog: malloc_free_fill vgopts: -q --malloc-fill=0x55 --free-fill=0x77 -stderr_filter: filter_malloc_free_fill Modified: branches/DARWIN/memcheck/tests/sigaltstack.vgtest =================================================================== --- branches/DARWIN/memcheck/tests/sigaltstack.vgtest 2009-02-17 00:47:10 UTC (rev 9188) +++ branches/DARWIN/memcheck/tests/sigaltstack.vgtest 2009-02-17 00:50:45 UTC (rev 9189) @@ -1,3 +1,2 @@ prog: sigaltstack -stderr_filter: ./filter_stderr_backtrace vgopts: -q |
|
From: <sv...@va...> - 2009-02-17 00:47:16
|
Author: njn Date: 2009-02-17 00:47:10 +0000 (Tue, 17 Feb 2009) New Revision: 9188 Log: Remove unnecessary Memcheck test filters. Removed: trunk/memcheck/tests/filter_malloc_free_fill trunk/memcheck/tests/filter_stderr_backtrace trunk/memcheck/tests/malloc_free_fill.stdout.exp Modified: trunk/memcheck/tests/Makefile.am trunk/memcheck/tests/malloc_free_fill.vgtest trunk/memcheck/tests/sigaltstack.vgtest Modified: trunk/memcheck/tests/Makefile.am =================================================================== --- trunk/memcheck/tests/Makefile.am 2009-02-17 00:32:58 UTC (rev 9187) +++ trunk/memcheck/tests/Makefile.am 2009-02-17 00:47:10 UTC (rev 9188) @@ -25,8 +25,8 @@ DIST_SUBDIRS = x86 amd64 linux x86-linux . noinst_SCRIPTS = filter_allocs filter_leak_check_size \ - filter_stderr filter_stderr_backtrace filter_xml \ - filter_varinfo3 filter_malloc_free_fill + filter_stderr filter_xml \ + filter_varinfo3 EXTRA_DIST = $(noinst_SCRIPTS) \ addressable.stderr.exp addressable.stdout.exp addressable.vgtest \ Deleted: trunk/memcheck/tests/filter_malloc_free_fill =================================================================== --- trunk/memcheck/tests/filter_malloc_free_fill 2009-02-17 00:32:58 UTC (rev 9187) +++ trunk/memcheck/tests/filter_malloc_free_fill 2009-02-17 00:47:10 UTC (rev 9188) @@ -1,5 +0,0 @@ -#! /bin/sh - -./filter_stderr | -sed -e 's|^Use of uninitialised value of size [0-9]*$|Use of uninitialised value of size .|g' \ - -e 's|^ *at 0x\.*: _itoa_word (in /\.\.\.libc\.\.\.)$| at 0x........: (within /...libc...)|g' Deleted: trunk/memcheck/tests/filter_stderr_backtrace =================================================================== --- trunk/memcheck/tests/filter_stderr_backtrace 2009-02-17 00:32:58 UTC (rev 9187) +++ trunk/memcheck/tests/filter_stderr_backtrace 2009-02-17 00:47:10 UTC (rev 9188) @@ -1,3 +0,0 @@ -#! /bin/sh -./filter_stderr | -sed "/^ by 0x........: /d" Deleted: trunk/memcheck/tests/malloc_free_fill.stdout.exp =================================================================== Modified: trunk/memcheck/tests/malloc_free_fill.vgtest =================================================================== --- trunk/memcheck/tests/malloc_free_fill.vgtest 2009-02-17 00:32:58 UTC (rev 9187) +++ trunk/memcheck/tests/malloc_free_fill.vgtest 2009-02-17 00:47:10 UTC (rev 9188) @@ -1,3 +1,2 @@ prog: malloc_free_fill vgopts: -q --malloc-fill=0x55 --free-fill=0x77 -stderr_filter: filter_malloc_free_fill Modified: trunk/memcheck/tests/sigaltstack.vgtest =================================================================== --- trunk/memcheck/tests/sigaltstack.vgtest 2009-02-17 00:32:58 UTC (rev 9187) +++ trunk/memcheck/tests/sigaltstack.vgtest 2009-02-17 00:47:10 UTC (rev 9188) @@ -1,3 +1,2 @@ prog: sigaltstack -stderr_filter: ./filter_stderr_backtrace vgopts: -q |
|
From: <sv...@va...> - 2009-02-17 00:33:04
|
Author: njn Date: 2009-02-17 00:32:58 +0000 (Tue, 17 Feb 2009) New Revision: 9187 Log: Remove unused filter scripts from DRD. Removed: trunk/drd/tests/filter_cmdline0 trunk/drd/tests/filter_fdleak trunk/drd/tests/filter_linenos trunk/drd/tests/filter_none_discards Modified: trunk/drd/tests/Makefile.am Modified: trunk/drd/tests/Makefile.am =================================================================== --- trunk/drd/tests/Makefile.am 2009-02-17 00:23:30 UTC (rev 9186) +++ trunk/drd/tests/Makefile.am 2009-02-17 00:32:58 UTC (rev 9187) @@ -6,11 +6,7 @@ DIST_SUBDIRS = . noinst_SCRIPTS = \ - filter_cmdline0 \ filter_error_summary \ - filter_fdleak \ - filter_linenos \ - filter_none_discards \ filter_stderr \ run_openmp_test \ supported_libpthread Deleted: trunk/drd/tests/filter_cmdline0 =================================================================== --- trunk/drd/tests/filter_cmdline0 2009-02-17 00:23:30 UTC (rev 9186) +++ trunk/drd/tests/filter_cmdline0 2009-02-17 00:32:58 UTC (rev 9187) @@ -1,3 +0,0 @@ -#! /bin/sh - -sed "s/^valgrind-.*/valgrind-XXX/g" Deleted: trunk/drd/tests/filter_fdleak =================================================================== --- trunk/drd/tests/filter_fdleak 2009-02-17 00:23:30 UTC (rev 9186) +++ trunk/drd/tests/filter_fdleak 2009-02-17 00:32:58 UTC (rev 9187) @@ -1,12 +0,0 @@ -#! /bin/sh - -dir=`dirname $0` - -./filter_stderr | - -sed s/"^Open AF_UNIX socket [0-9]*: <unknown>/Open AF_UNIX socket .: <unknown>/" | -sed s/"^Open \(AF_UNIX socket\|file descriptor\) [0-9]*: \/dev\/null/Open \\1 .: \/dev\/null/" | -sed s/"^Open \(AF_UNIX socket\|file descriptor\) [0-9]*: \/tmp\/\(sock\|data1\|data2\|file\)\.[0-9]*/Open \\1 .: \/tmp\/\\2/" | -sed s/"^Open file descriptor [0-9]*: .*/Open file descriptor .: ./" | -sed s/"^Open file descriptor [0-9]*:$/Open file descriptor .:/" | -sed s/"127.0.0.1:[0-9]*/127.0.0.1:.../g" Deleted: trunk/drd/tests/filter_linenos =================================================================== --- trunk/drd/tests/filter_linenos 2009-02-17 00:23:30 UTC (rev 9186) +++ trunk/drd/tests/filter_linenos 2009-02-17 00:32:58 UTC (rev 9187) @@ -1,5 +0,0 @@ -#!/bin/sh - -dir=`dirname $0` - -$dir/filter_stderr | sed "s/ line [0-9]*://" Deleted: trunk/drd/tests/filter_none_discards =================================================================== --- trunk/drd/tests/filter_none_discards 2009-02-17 00:23:30 UTC (rev 9186) +++ trunk/drd/tests/filter_none_discards 2009-02-17 00:32:58 UTC (rev 9187) @@ -1,6 +0,0 @@ -#! /bin/sh - -dir=`dirname $0` - -$dir/filter_stderr | $dir/../../tests/filter_discards - |
|
From: <sv...@va...> - 2009-02-17 00:23:37
|
Author: njn
Date: 2009-02-17 00:23:30 +0000 (Tue, 17 Feb 2009)
New Revision: 9186
Log:
Merged r9185 (fix up getsockopt mess) from the DARWIN branch, minus the
Darwin-specific parts.
Modified:
trunk/coregrind/m_syswrap/priv_syswrap-generic.h
trunk/coregrind/m_syswrap/priv_syswrap-linux.h
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/coregrind/m_syswrap/priv_syswrap-generic.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-generic.h 2009-02-17 00:06:07 UTC (rev 9185)
+++ trunk/coregrind/m_syswrap/priv_syswrap-generic.h 2009-02-17 00:23:30 UTC (rev 9186)
@@ -69,7 +69,14 @@
ML_(notify_aspacem_and_tool_of_mmap) ( Addr a, SizeT len, UInt prot,
UInt mm_flags, Int fd, Off64T offset );
+extern void
+ML_(buf_and_len_pre_check) ( ThreadId tid, Addr buf_p, Addr buflen_p,
+ Char* buf_s, Char* buflen_s );
+extern void
+ML_(buf_and_len_post_check) ( ThreadId tid, SysRes res,
+ Addr buf_p, Addr buflen_p, Char* s );
+
DECL_TEMPLATE(generic, sys_ni_syscall); // * P -- unimplemented
DECL_TEMPLATE(generic, sys_exit);
DECL_TEMPLATE(generic, sys_fork);
@@ -220,8 +227,6 @@
extern void ML_(generic_POST_sys_recv) ( TId, UW, UW, UW, UW );
extern void ML_(generic_PRE_sys_connect) ( TId, UW, UW, UW );
extern void ML_(generic_PRE_sys_setsockopt) ( TId, UW, UW, UW, UW, UW );
-extern void ML_(generic_PRE_sys_getsockopt) ( TId, UW, UW, UW, UW, UW );
-extern void ML_(generic_POST_sys_getsockopt) ( TId, SR, UW, UW, UW, UW, UW );
extern void ML_(generic_PRE_sys_getsockname) ( TId, UW, UW, UW );
extern void ML_(generic_POST_sys_getsockname) ( TId, SR, UW, UW, UW );
extern void ML_(generic_PRE_sys_getpeername) ( TId, UW, UW, UW );
Modified: trunk/coregrind/m_syswrap/priv_syswrap-linux.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-02-17 00:06:07 UTC (rev 9185)
+++ trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-02-17 00:23:30 UTC (rev 9186)
@@ -252,11 +252,13 @@
#define UW UWord
#define SR SysRes
-extern void ML_(linux_PRE_sys_msgsnd) ( TId, UW, UW, UW, UW );
-extern void ML_(linux_PRE_sys_msgrcv) ( TId, UW, UW, UW, UW, UW );
-extern void ML_(linux_POST_sys_msgrcv) ( TId, UW, UW, UW, UW, UW, UW );
-extern void ML_(linux_PRE_sys_msgctl) ( TId, UW, UW, UW );
-extern void ML_(linux_POST_sys_msgctl) ( TId, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_msgsnd) ( TId, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_msgrcv) ( TId, UW, UW, UW, UW, UW );
+extern void ML_(linux_POST_sys_msgrcv) ( TId, UW, UW, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_msgctl) ( TId, UW, UW, UW );
+extern void ML_(linux_POST_sys_msgctl) ( TId, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_getsockopt) ( TId, UW, UW, UW, UW, UW );
+extern void ML_(linux_POST_sys_getsockopt) ( TId, SR, UW, UW, UW, UW, UW );
#undef TId
#undef UW
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-02-17 00:23:30 UTC (rev 9186)
@@ -641,13 +641,13 @@
PRE_REG_READ5(long, "getsockopt",
int, s, int, level, int, optname,
void *, optval, int, *optlen);
- ML_(generic_PRE_sys_getsockopt)(tid, ARG1,ARG2,ARG3,ARG4,ARG5);
+ ML_(linux_PRE_sys_getsockopt)(tid, ARG1,ARG2,ARG3,ARG4,ARG5);
}
POST(sys_getsockopt)
{
vg_assert(SUCCESS);
- ML_(generic_POST_sys_getsockopt)(tid, VG_(mk_SysRes_Success)(RES),
- ARG1,ARG2,ARG3,ARG4,ARG5);
+ ML_(linux_POST_sys_getsockopt)(tid, VG_(mk_SysRes_Success)(RES),
+ ARG1,ARG2,ARG3,ARG4,ARG5);
}
PRE(sys_connect)
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2009-02-17 00:06:07 UTC (rev 9185)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2009-02-17 00:23:30 UTC (rev 9186)
@@ -947,9 +947,8 @@
return *a_p;
}
-static
-void buf_and_len_pre_check( ThreadId tid, Addr buf_p, Addr buflen_p,
- Char* buf_s, Char* buflen_s )
+void ML_(buf_and_len_pre_check) ( ThreadId tid, Addr buf_p, Addr buflen_p,
+ Char* buf_s, Char* buflen_s )
{
if (VG_(tdict).track_pre_mem_write) {
UInt buflen_in = deref_UInt( tid, buflen_p, buflen_s);
@@ -959,9 +958,8 @@
}
}
-static
-void buf_and_len_post_check( ThreadId tid, SysRes res,
- Addr buf_p, Addr buflen_p, Char* s )
+void ML_(buf_and_len_post_check) ( ThreadId tid, SysRes res,
+ Addr buf_p, Addr buflen_p, Char* s )
{
if (!res.isError && VG_(tdict).track_post_mem_write) {
UInt buflen_out = deref_UInt( tid, buflen_p, s);
@@ -1244,9 +1242,9 @@
Addr addr_p = arg1;
Addr addrlen_p = arg2;
if (addr_p != (Addr)NULL)
- buf_and_len_pre_check ( tid, addr_p, addrlen_p,
- "socketcall.accept(addr)",
- "socketcall.accept(addrlen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, addr_p, addrlen_p,
+ "socketcall.accept(addr)",
+ "socketcall.accept(addrlen_in)" );
}
SysRes
@@ -1263,8 +1261,8 @@
Addr addr_p = arg1;
Addr addrlen_p = arg2;
if (addr_p != (Addr)NULL)
- buf_and_len_post_check ( tid, res, addr_p, addrlen_p,
- "socketcall.accept(addrlen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, addr_p, addrlen_p,
+ "socketcall.accept(addrlen_out)" );
if (VG_(clo_track_fds))
ML_(record_fd_open_nameless)(tid, res.res);
}
@@ -1318,9 +1316,9 @@
Addr fromlen_p = arg5;
PRE_MEM_WRITE( "socketcall.recvfrom(buf)", buf_p, len );
if (from_p != (Addr)NULL)
- buf_and_len_pre_check ( tid, from_p, fromlen_p,
- "socketcall.recvfrom(from)",
- "socketcall.recvfrom(fromlen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, from_p, fromlen_p,
+ "socketcall.recvfrom(from)",
+ "socketcall.recvfrom(fromlen_in)" );
}
void
@@ -1336,8 +1334,8 @@
vg_assert(!res.isError); /* guaranteed by caller */
if (from_p != (Addr)NULL)
- buf_and_len_post_check ( tid, res, from_p, fromlen_p,
- "socketcall.recvfrom(fromlen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, from_p, fromlen_p,
+ "socketcall.recvfrom(fromlen_out)" );
POST_MEM_WRITE( buf_p, len );
}
@@ -1402,64 +1400,6 @@
/* ------ */
void
-ML_(generic_PRE_sys_getsockopt) ( ThreadId tid,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 )
-{
- /* int getsockopt(int s, int level, int optname,
- void *optval, socklen_t *optlen); */
- Addr optval_p = arg3;
- Addr optlen_p = arg4;
- /* vg_assert(sizeof(socklen_t) == sizeof(UInt)); */
- if (optval_p != (Addr)NULL) {
- buf_and_len_pre_check ( tid, optval_p, optlen_p,
- "socketcall.getsockopt(optval)",
- "socketcall.getsockopt(optlen)" );
- if (arg1 == VKI_SOL_SCTP &&
- (arg2 == VKI_SCTP_GET_PEER_ADDRS || arg2 == VKI_SCTP_GET_LOCAL_ADDRS)) {
- struct vki_sctp_getaddrs *ga = (struct vki_sctp_getaddrs*)arg3;
- int address_bytes = sizeof(struct vki_sockaddr_in6) * ga->addr_num;
- PRE_MEM_WRITE( "socketcall.getsockopt(optval.addrs)", (Addr)ga->addrs, address_bytes );
- }
- }
-}
-
-void
-ML_(generic_POST_sys_getsockopt) ( ThreadId tid,
- SysRes res,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 )
-{
- Addr optval_p = arg3;
- Addr optlen_p = arg4;
- vg_assert(!res.isError); /* guaranteed by caller */
- if (optval_p != (Addr)NULL) {
- buf_and_len_post_check ( tid, res, optval_p, optlen_p,
- "socketcall.getsockopt(optlen_out)" );
- if (arg1 == VKI_SOL_SCTP &&
- (arg2 == VKI_SCTP_GET_PEER_ADDRS || arg2 == VKI_SCTP_GET_LOCAL_ADDRS)) {
- struct vki_sctp_getaddrs *ga = (struct vki_sctp_getaddrs*)arg3;
- struct vki_sockaddr *a = ga->addrs;
- int i;
- for (i = 0; i < ga->addr_num; i++) {
- int sl = 0;
- if (a->sa_family == VKI_AF_INET)
- sl = sizeof(struct vki_sockaddr_in);
- else if (a->sa_family == VKI_AF_INET6)
- sl = sizeof(struct vki_sockaddr_in6);
- else {
- VG_(message)(Vg_UserMsg, "Warning: getsockopt: unhandled address type %d", a->sa_family);
- }
- a = (struct vki_sockaddr*)((char*)a + sl);
- }
- POST_MEM_WRITE( (Addr)ga->addrs, (char*)a - (char*)ga->addrs );
- }
- }
-}
-
-/* ------ */
-
-void
ML_(generic_PRE_sys_getsockname) ( ThreadId tid,
UWord arg0, UWord arg1, UWord arg2 )
{
@@ -1467,9 +1407,9 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
/* Nb: name_p cannot be NULL */
- buf_and_len_pre_check ( tid, name_p, namelen_p,
- "socketcall.getsockname(name)",
- "socketcall.getsockname(namelen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, name_p, namelen_p,
+ "socketcall.getsockname(name)",
+ "socketcall.getsockname(namelen_in)" );
}
void
@@ -1480,8 +1420,8 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
vg_assert(!res.isError); /* guaranteed by caller */
- buf_and_len_post_check ( tid, res, name_p, namelen_p,
- "socketcall.getsockname(namelen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, name_p, namelen_p,
+ "socketcall.getsockname(namelen_out)" );
}
/* ------ */
@@ -1494,9 +1434,9 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
/* Nb: name_p cannot be NULL */
- buf_and_len_pre_check ( tid, name_p, namelen_p,
- "socketcall.getpeername(name)",
- "socketcall.getpeername(namelen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, name_p, namelen_p,
+ "socketcall.getpeername(name)",
+ "socketcall.getpeername(namelen_in)" );
}
void
@@ -1507,8 +1447,8 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
vg_assert(!res.isError); /* guaranteed by caller */
- buf_and_len_post_check ( tid, res, name_p, namelen_p,
- "socketcall.getpeername(namelen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, name_p, namelen_p,
+ "socketcall.getpeername(namelen_out)" );
}
/* ------ */
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2009-02-17 00:23:30 UTC (rev 9186)
@@ -3155,6 +3155,72 @@
}
#endif
+/* ---------------------------------------------------------------------
+ socketcall wrapper helpers
+ ------------------------------------------------------------------ */
+
+void
+ML_(linux_PRE_sys_getsockopt) ( ThreadId tid,
+ UWord arg0, UWord arg1, UWord arg2,
+ UWord arg3, UWord arg4 )
+{
+ /* int getsockopt(int s, int level, int optname,
+ void *optval, socklen_t *optlen); */
+ Addr optval_p = arg3;
+ Addr optlen_p = arg4;
+ /* vg_assert(sizeof(socklen_t) == sizeof(UInt)); */
+ if (optval_p != (Addr)NULL) {
+ ML_(buf_and_len_pre_check) ( tid, optval_p, optlen_p,
+ "socketcall.getsockopt(optval)",
+ "socketcall.getsockopt(optlen)" );
+ if (arg1 == VKI_SOL_SCTP &&
+ (arg2 == VKI_SCTP_GET_PEER_ADDRS ||
+ arg2 == VKI_SCTP_GET_LOCAL_ADDRS))
+ {
+ struct vki_sctp_getaddrs *ga = (struct vki_sctp_getaddrs*)arg3;
+ int address_bytes = sizeof(struct vki_sockaddr_in6) * ga->addr_num;
+ PRE_MEM_WRITE( "socketcall.getsockopt(optval.addrs)",
+ (Addr)ga->addrs, address_bytes );
+ }
+ }
+}
+
+void
+ML_(linux_POST_sys_getsockopt) ( ThreadId tid,
+ SysRes res,
+ UWord arg0, UWord arg1, UWord arg2,
+ UWord arg3, UWord arg4 )
+{
+ Addr optval_p = arg3;
+ Addr optlen_p = arg4;
+ vg_assert(!res.isError); /* guaranteed by caller */
+ if (optval_p != (Addr)NULL) {
+ ML_(buf_and_len_post_check) ( tid, res, optval_p, optlen_p,
+ "socketcall.getsockopt(optlen_out)" );
+ if (arg1 == VKI_SOL_SCTP &&
+ (arg2 == VKI_SCTP_GET_PEER_ADDRS ||
+ arg2 == VKI_SCTP_GET_LOCAL_ADDRS))
+ {
+ struct vki_sctp_getaddrs *ga = (struct vki_sctp_getaddrs*)arg3;
+ struct vki_sockaddr *a = ga->addrs;
+ int i;
+ for (i = 0; i < ga->addr_num; i++) {
+ int sl = 0;
+ if (a->sa_family == VKI_AF_INET)
+ sl = sizeof(struct vki_sockaddr_in);
+ else if (a->sa_family == VKI_AF_INET6)
+ sl = sizeof(struct vki_sockaddr_in6);
+ else {
+ VG_(message)(Vg_UserMsg, "Warning: getsockopt: unhandled address type %d", a->sa_family);
+ }
+ a = (struct vki_sockaddr*)((char*)a + sl);
+ }
+ POST_MEM_WRITE( (Addr)ga->addrs, (char*)a - (char*)ga->addrs );
+ }
+ }
+}
+
+
#undef PRE
#undef POST
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-02-17 00:23:30 UTC (rev 9186)
@@ -507,8 +507,8 @@
/* int getsockopt(int s, int level, int optname,
void *optval, socklen_t *optlen); */
PRE_MEM_READ( "socketcall.getsockopt(args)", ARG2, 5*sizeof(Addr) );
- ML_(generic_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
- ARG2_3, ARG2_4 );
+ ML_(linux_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
+ ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
@@ -628,9 +628,9 @@
break;
case VKI_SYS_GETSOCKOPT:
- ML_(generic_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
- ARG2_0, ARG2_1,
- ARG2_2, ARG2_3, ARG2_4 );
+ ML_(linux_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
+ ARG2_0, ARG2_1,
+ ARG2_2, ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-02-17 00:23:30 UTC (rev 9186)
@@ -534,8 +534,8 @@
/* int getsockopt(int s, int level, int optname,
void *optval, socklen_t *optlen); */
PRE_MEM_READ( "socketcall.getsockopt(args)", ARG2, 5*sizeof(Addr) );
- ML_(generic_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
- ARG2_3, ARG2_4 );
+ ML_(linux_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
+ ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
@@ -655,9 +655,9 @@
break;
case VKI_SYS_GETSOCKOPT:
- ML_(generic_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
- ARG2_0, ARG2_1,
- ARG2_2, ARG2_3, ARG2_4 );
+ ML_(linux_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
+ ARG2_0, ARG2_1,
+ ARG2_2, ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-02-17 00:23:30 UTC (rev 9186)
@@ -1512,8 +1512,8 @@
/* int getsockopt(int s, int level, int optname,
void *optval, socklen_t *optlen); */
PRE_MEM_READ( "socketcall.getsockopt(args)", ARG2, 5*sizeof(Addr) );
- ML_(generic_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
- ARG2_3, ARG2_4 );
+ ML_(linux_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
+ ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
@@ -1633,9 +1633,9 @@
break;
case VKI_SYS_GETSOCKOPT:
- ML_(generic_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
- ARG2_0, ARG2_1,
- ARG2_2, ARG2_3, ARG2_4 );
+ ML_(linux_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
+ ARG2_0, ARG2_1,
+ ARG2_2, ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
|
|
From: <sv...@va...> - 2009-02-17 00:06:12
|
Author: njn
Date: 2009-02-17 00:06:07 +0000 (Tue, 17 Feb 2009)
New Revision: 9185
Log:
Fixed up getsockopt mess.
Modified:
branches/DARWIN/coregrind/m_syswrap/priv_syswrap-generic.h
branches/DARWIN/coregrind/m_syswrap/priv_syswrap-linux.h
branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c
branches/DARWIN/coregrind/m_syswrap/syswrap-ppc32-linux.c
branches/DARWIN/coregrind/m_syswrap/syswrap-ppc64-linux.c
branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: branches/DARWIN/coregrind/m_syswrap/priv_syswrap-generic.h
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/priv_syswrap-generic.h 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/priv_syswrap-generic.h 2009-02-17 00:06:07 UTC (rev 9185)
@@ -73,22 +73,20 @@
extern void
ML_(notify_aspacem_and_tool_of_mprotect) ( Addr a, SizeT len, Int prot );
+extern void
+ML_(buf_and_len_pre_check) ( ThreadId tid, Addr buf_p, Addr buflen_p,
+ Char* buf_s, Char* buflen_s );
+extern void
+ML_(buf_and_len_post_check) ( ThreadId tid, SysRes res,
+ Addr buf_p, Addr buflen_p, Char* s );
+
/* PRE and POST for unknown ioctls based on ioctl request encoding */
extern
void ML_(PRE_unknown_ioctl)(ThreadId tid, UWord request, UWord arg);
extern
void ML_(POST_unknown_ioctl)(ThreadId tid, UInt res, UWord request, UWord arg);
-/* PRE and POST for platform-specific sockopts */
-extern void
-ML_(PRE_sys_getsockopt) ( ThreadId tid, UWord arg0, UWord arg1,
- UWord arg2, UWord arg3, UWord arg4 );
-extern void
-ML_(POST_sys_getsockopt) ( ThreadId tid, SysRes res,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 );
-
DECL_TEMPLATE(generic, sys_ni_syscall); // * P -- unimplemented
DECL_TEMPLATE(generic, sys_exit);
DECL_TEMPLATE(generic, sys_fork);
@@ -234,8 +232,6 @@
extern void ML_(generic_POST_sys_recv) ( TId, UW, UW, UW, UW );
extern void ML_(generic_PRE_sys_connect) ( TId, UW, UW, UW );
extern void ML_(generic_PRE_sys_setsockopt) ( TId, UW, UW, UW, UW, UW );
-extern void ML_(generic_PRE_sys_getsockopt) ( TId, UW, UW, UW, UW, UW );
-extern void ML_(generic_POST_sys_getsockopt) ( TId, SR, UW, UW, UW, UW, UW );
extern void ML_(generic_PRE_sys_getsockname) ( TId, UW, UW, UW );
extern void ML_(generic_POST_sys_getsockname) ( TId, SR, UW, UW, UW );
extern void ML_(generic_PRE_sys_getpeername) ( TId, UW, UW, UW );
Modified: branches/DARWIN/coregrind/m_syswrap/priv_syswrap-linux.h
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/priv_syswrap-linux.h 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/priv_syswrap-linux.h 2009-02-17 00:06:07 UTC (rev 9185)
@@ -256,11 +256,13 @@
#define UW UWord
#define SR SysRes
-extern void ML_(linux_PRE_sys_msgsnd) ( TId, UW, UW, UW, UW );
-extern void ML_(linux_PRE_sys_msgrcv) ( TId, UW, UW, UW, UW, UW );
-extern void ML_(linux_POST_sys_msgrcv) ( TId, UW, UW, UW, UW, UW, UW );
-extern void ML_(linux_PRE_sys_msgctl) ( TId, UW, UW, UW );
-extern void ML_(linux_POST_sys_msgctl) ( TId, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_msgsnd) ( TId, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_msgrcv) ( TId, UW, UW, UW, UW, UW );
+extern void ML_(linux_POST_sys_msgrcv) ( TId, UW, UW, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_msgctl) ( TId, UW, UW, UW );
+extern void ML_(linux_POST_sys_msgctl) ( TId, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_getsockopt) ( TId, UW, UW, UW, UW, UW );
+extern void ML_(linux_POST_sys_getsockopt) ( TId, SR, UW, UW, UW, UW, UW );
#undef TId
#undef UW
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -641,13 +641,13 @@
PRE_REG_READ5(long, "getsockopt",
int, s, int, level, int, optname,
void *, optval, int, *optlen);
- ML_(generic_PRE_sys_getsockopt)(tid, ARG1,ARG2,ARG3,ARG4,ARG5);
+ ML_(linux_PRE_sys_getsockopt)(tid, ARG1,ARG2,ARG3,ARG4,ARG5);
}
POST(sys_getsockopt)
{
vg_assert(SUCCESS);
- ML_(generic_POST_sys_getsockopt)(tid, VG_(mk_SysRes_Success)(RES),
- ARG1,ARG2,ARG3,ARG4,ARG5);
+ ML_(linux_POST_sys_getsockopt)(tid, VG_(mk_SysRes_Success)(RES),
+ ARG1,ARG2,ARG3,ARG4,ARG5);
}
PRE(sys_connect)
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -583,27 +583,9 @@
/* ---------------------------------------------------------------------
- darwin sockopt wrapper helpers
+ wrappers
------------------------------------------------------------------ */
-void
-ML_(PRE_sys_getsockopt) ( ThreadId tid,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 )
-{
-#warning GrP fixme darwin-specific sockopts
-}
-
-void
-ML_(POST_sys_getsockopt) ( ThreadId tid,
- SysRes res,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 )
-{
-#warning GrP fixme darwin-specific sockopts
-}
-
-
#define PRE(name) DEFN_PRE_TEMPLATE(darwin, name)
#define POST(name) DEFN_POST_TEMPLATE(darwin, name)
@@ -635,7 +617,7 @@
#define MACH_MSGH_ID VG_(get_ThreadState)(tid)->os_state.msgh_id
/* ---------------------------------------------------------------------
- darwin ioctl wrapper helpers
+ darwin ioctl wrapper
------------------------------------------------------------------ */
PRE(sys_ioctl)
@@ -954,7 +936,7 @@
/* ---------------------------------------------------------------------
- darwin fcntl wrapper helpers
+ darwin fcntl wrapper
------------------------------------------------------------------ */
static const char *name_for_fcntl(UWord cmd) {
#define F(n) case VKI_##n: return #n
@@ -2119,19 +2101,36 @@
PRE(sys_getsockopt)
{
+ Addr optval_p = ARG3;
+ Addr optlen_p = ARG4;
PRINT("sys_getsockopt ( %ld, %ld, %ld, %#lx, %#lx )",
ARG1,ARG2,ARG3,ARG4,ARG5);
PRE_REG_READ5(long, "getsockopt",
int, s, int, level, int, optname,
void *, optval, int, *optlen);
- ML_(generic_PRE_sys_getsockopt)(tid, ARG1,ARG2,ARG3,ARG4,ARG5);
+ /* int getsockopt(int socket, int level, int option_name,
+ void *restrict option_value,
+ socklen_t *restrict option_len); */
+ /* vg_assert(sizeof(socklen_t) == sizeof(UInt)); */
+ if (optval_p != (Addr)NULL) {
+ ML_(buf_and_len_pre_check) ( tid, optval_p, optlen_p,
+ "socketcall.getsockopt(optval)",
+ "socketcall.getsockopt(optlen)" );
+# warning GrP fixme darwin-specific sockopts
+ }
}
POST(sys_getsockopt)
{
+ Addr optval_p = ARG3;
+ Addr optlen_p = ARG4;
vg_assert(SUCCESS);
- ML_(generic_POST_sys_getsockopt)(tid, VG_(mk_SysRes_Success)(RES),
- ARG1,ARG2,ARG3,ARG4,ARG5);
+ if (optval_p != (Addr)NULL) {
+ ML_(buf_and_len_post_check) ( tid, VG_(mk_SysRes_Success)(RES),
+ optval_p, optlen_p,
+ "socketcall.getsockopt(optlen_out)" );
+# warning GrP fixme darwin-specific sockopts
+ }
}
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -983,9 +983,8 @@
return *a_p;
}
-static
-void buf_and_len_pre_check( ThreadId tid, Addr buf_p, Addr buflen_p,
- Char* buf_s, Char* buflen_s )
+void ML_(buf_and_len_pre_check) ( ThreadId tid, Addr buf_p, Addr buflen_p,
+ Char* buf_s, Char* buflen_s )
{
if (VG_(tdict).track_pre_mem_write) {
UInt buflen_in = deref_UInt( tid, buflen_p, buflen_s);
@@ -995,9 +994,8 @@
}
}
-static
-void buf_and_len_post_check( ThreadId tid, SysRes res,
- Addr buf_p, Addr buflen_p, Char* s )
+void ML_(buf_and_len_post_check) ( ThreadId tid, SysRes res,
+ Addr buf_p, Addr buflen_p, Char* s )
{
if (!res.isError && VG_(tdict).track_post_mem_write) {
UInt buflen_out = deref_UInt( tid, buflen_p, s);
@@ -1284,9 +1282,9 @@
Addr addr_p = arg1;
Addr addrlen_p = arg2;
if (addr_p != (Addr)NULL)
- buf_and_len_pre_check ( tid, addr_p, addrlen_p,
- "socketcall.accept(addr)",
- "socketcall.accept(addrlen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, addr_p, addrlen_p,
+ "socketcall.accept(addr)",
+ "socketcall.accept(addrlen_in)" );
}
SysRes
@@ -1303,8 +1301,8 @@
Addr addr_p = arg1;
Addr addrlen_p = arg2;
if (addr_p != (Addr)NULL)
- buf_and_len_post_check ( tid, res, addr_p, addrlen_p,
- "socketcall.accept(addrlen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, addr_p, addrlen_p,
+ "socketcall.accept(addrlen_out)" );
if (VG_(clo_track_fds))
ML_(record_fd_open_nameless)(tid, res.res);
}
@@ -1358,9 +1356,9 @@
Addr fromlen_p = arg5;
PRE_MEM_WRITE( "socketcall.recvfrom(buf)", buf_p, len );
if (from_p != (Addr)NULL)
- buf_and_len_pre_check ( tid, from_p, fromlen_p,
- "socketcall.recvfrom(from)",
- "socketcall.recvfrom(fromlen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, from_p, fromlen_p,
+ "socketcall.recvfrom(from)",
+ "socketcall.recvfrom(fromlen_in)" );
}
void
@@ -1376,8 +1374,8 @@
vg_assert(!res.isError); /* guaranteed by caller */
if (from_p != (Addr)NULL)
- buf_and_len_post_check ( tid, res, from_p, fromlen_p,
- "socketcall.recvfrom(fromlen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, from_p, fromlen_p,
+ "socketcall.recvfrom(fromlen_out)" );
POST_MEM_WRITE( buf_p, len );
}
@@ -1439,49 +1437,6 @@
/* ------ */
void
-ML_(generic_PRE_sys_getsockopt) ( ThreadId tid,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 )
-{
- /* int getsockopt(int s, int level, int optname,
- void *optval, socklen_t *optlen); */
- Addr optval_p = arg3;
- Addr optlen_p = arg4;
- /* vg_assert(sizeof(socklen_t) == sizeof(UInt)); */
- if (optval_p != (Addr)NULL) {
- buf_and_len_pre_check ( tid, optval_p, optlen_p,
- "socketcall.getsockopt(optval)",
- "socketcall.getsockopt(optlen)" );
- }
-
- // DDD fixme
- I_die_here;
- //ML_(PRE_sys_getsockopt)(tid, arg0, arg1, arg2, arg3, arg4);
-}
-
-void
-ML_(generic_POST_sys_getsockopt) ( ThreadId tid,
- SysRes res,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 )
-{
- Addr optval_p = arg3;
- Addr optlen_p = arg4;
- vg_assert(!res.isError); /* guaranteed by caller */
- if (optval_p != (Addr)NULL) {
- buf_and_len_post_check ( tid, res, optval_p, optlen_p,
- "socketcall.getsockopt(optlen_out)" );
-
- }
-
- // DDD fixme
- I_die_here;
- //ML_(POST_sys_getsockopt)(tid, res, arg0, arg1, arg2, arg3, arg4);
-}
-
-/* ------ */
-
-void
ML_(generic_PRE_sys_getsockname) ( ThreadId tid,
UWord arg0, UWord arg1, UWord arg2 )
{
@@ -1489,9 +1444,9 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
/* Nb: name_p cannot be NULL */
- buf_and_len_pre_check ( tid, name_p, namelen_p,
- "socketcall.getsockname(name)",
- "socketcall.getsockname(namelen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, name_p, namelen_p,
+ "socketcall.getsockname(name)",
+ "socketcall.getsockname(namelen_in)" );
}
void
@@ -1502,8 +1457,8 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
vg_assert(!res.isError); /* guaranteed by caller */
- buf_and_len_post_check ( tid, res, name_p, namelen_p,
- "socketcall.getsockname(namelen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, name_p, namelen_p,
+ "socketcall.getsockname(namelen_out)" );
}
/* ------ */
@@ -1516,9 +1471,9 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
/* Nb: name_p cannot be NULL */
- buf_and_len_pre_check ( tid, name_p, namelen_p,
- "socketcall.getpeername(name)",
- "socketcall.getpeername(namelen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, name_p, namelen_p,
+ "socketcall.getpeername(name)",
+ "socketcall.getpeername(namelen_in)" );
}
void
@@ -1529,8 +1484,8 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
vg_assert(!res.isError); /* guaranteed by caller */
- buf_and_len_post_check ( tid, res, name_p, namelen_p,
- "socketcall.getpeername(namelen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, name_p, namelen_p,
+ "socketcall.getpeername(namelen_out)" );
}
/* ------ */
@@ -1978,21 +1933,21 @@
UWord arg1, UWord arg2, UWord arg3,
UWord arg4, UWord arg5, Off64T arg6 )
{
- // GrP fixme this has races - don't use
- // * needs to RETRY if advisory succeeds but map fails
- // (could have been some other thread in a nonblocking call)
- // * needs to not use fixed-position mmap() on Darwin
- // (mmap will cheerfully smash whatever's already there, which might
- // be a new mapping from some other thread in a nonblocking call)
-#if defined(VGO_darwin)
- __builtin_trap();
-#endif
-
Addr advised;
SysRes sres;
MapRequest mreq;
Bool mreq_ok;
+ // GrP fixme this has races - don't use
+ // * needs to RETRY if advisory succeeds but map fails
+ // (could have been some other thread in a nonblocking call)
+ // * needs to not use fixed-position mmap() on Darwin
+ // (mmap will cheerfully smash whatever's already there, which might
+ // be a new mapping from some other thread in a nonblocking call)
+#if defined(VGO_darwin)
+ __builtin_trap();
+#endif
+
if (arg2 == 0) {
/* SuSV3 says: If len is zero, mmap() shall fail and no mapping
shall be established. */
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -5102,6 +5102,72 @@
}
}
+/* ---------------------------------------------------------------------
+ socketcall wrapper helpers
+ ------------------------------------------------------------------ */
+
+void
+ML_(linux_PRE_sys_getsockopt) ( ThreadId tid,
+ UWord arg0, UWord arg1, UWord arg2,
+ UWord arg3, UWord arg4 )
+{
+ /* int getsockopt(int s, int level, int optname,
+ void *optval, socklen_t *optlen); */
+ Addr optval_p = arg3;
+ Addr optlen_p = arg4;
+ /* vg_assert(sizeof(socklen_t) == sizeof(UInt)); */
+ if (optval_p != (Addr)NULL) {
+ ML_(buf_and_len_pre_check) ( tid, optval_p, optlen_p,
+ "socketcall.getsockopt(optval)",
+ "socketcall.getsockopt(optlen)" );
+ if (arg1 == VKI_SOL_SCTP &&
+ (arg2 == VKI_SCTP_GET_PEER_ADDRS ||
+ arg2 == VKI_SCTP_GET_LOCAL_ADDRS))
+ {
+ struct vki_sctp_getaddrs *ga = (struct vki_sctp_getaddrs*)arg3;
+ int address_bytes = sizeof(struct vki_sockaddr_in6) * ga->addr_num;
+ PRE_MEM_WRITE( "socketcall.getsockopt(optval.addrs)",
+ (Addr)ga->addrs, address_bytes );
+ }
+ }
+}
+
+void
+ML_(linux_POST_sys_getsockopt) ( ThreadId tid,
+ SysRes res,
+ UWord arg0, UWord arg1, UWord arg2,
+ UWord arg3, UWord arg4 )
+{
+ Addr optval_p = arg3;
+ Addr optlen_p = arg4;
+ vg_assert(!res.isError); /* guaranteed by caller */
+ if (optval_p != (Addr)NULL) {
+ ML_(buf_and_len_post_check) ( tid, res, optval_p, optlen_p,
+ "socketcall.getsockopt(optlen_out)" );
+ if (arg1 == VKI_SOL_SCTP &&
+ (arg2 == VKI_SCTP_GET_PEER_ADDRS ||
+ arg2 == VKI_SCTP_GET_LOCAL_ADDRS))
+ {
+ struct vki_sctp_getaddrs *ga = (struct vki_sctp_getaddrs*)arg3;
+ struct vki_sockaddr *a = ga->addrs;
+ int i;
+ for (i = 0; i < ga->addr_num; i++) {
+ int sl = 0;
+ if (a->sa_family == VKI_AF_INET)
+ sl = sizeof(struct vki_sockaddr_in);
+ else if (a->sa_family == VKI_AF_INET6)
+ sl = sizeof(struct vki_sockaddr_in6);
+ else {
+ VG_(message)(Vg_UserMsg, "Warning: getsockopt: unhandled address type %d", a->sa_family);
+ }
+ a = (struct vki_sockaddr*)((char*)a + sl);
+ }
+ POST_MEM_WRITE( (Addr)ga->addrs, (char*)a - (char*)ga->addrs );
+ }
+ }
+}
+
+
#undef PRE
#undef POST
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -507,8 +507,8 @@
/* int getsockopt(int s, int level, int optname,
void *optval, socklen_t *optlen); */
PRE_MEM_READ( "socketcall.getsockopt(args)", ARG2, 5*sizeof(Addr) );
- ML_(generic_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
- ARG2_3, ARG2_4 );
+ ML_(linux_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
+ ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
@@ -628,9 +628,9 @@
break;
case VKI_SYS_GETSOCKOPT:
- ML_(generic_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
- ARG2_0, ARG2_1,
- ARG2_2, ARG2_3, ARG2_4 );
+ ML_(linux_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
+ ARG2_0, ARG2_1,
+ ARG2_2, ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -534,8 +534,8 @@
/* int getsockopt(int s, int level, int optname,
void *optval, socklen_t *optlen); */
PRE_MEM_READ( "socketcall.getsockopt(args)", ARG2, 5*sizeof(Addr) );
- ML_(generic_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
- ARG2_3, ARG2_4 );
+ ML_(linux_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
+ ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
@@ -655,9 +655,9 @@
break;
case VKI_SYS_GETSOCKOPT:
- ML_(generic_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
- ARG2_0, ARG2_1,
- ARG2_2, ARG2_3, ARG2_4 );
+ ML_(linux_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
+ ARG2_0, ARG2_1,
+ ARG2_2, ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -1512,8 +1512,8 @@
/* int getsockopt(int s, int level, int optname,
void *optval, socklen_t *optlen); */
PRE_MEM_READ( "socketcall.getsockopt(args)", ARG2, 5*sizeof(Addr) );
- ML_(generic_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
- ARG2_3, ARG2_4 );
+ ML_(linux_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
+ ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
@@ -1633,9 +1633,9 @@
break;
case VKI_SYS_GETSOCKOPT:
- ML_(generic_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
- ARG2_0, ARG2_1,
- ARG2_2, ARG2_3, ARG2_4 );
+ ML_(linux_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
+ ARG2_0, ARG2_1,
+ ARG2_2, ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
|