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
(13) |
2
(15) |
|
3
(16) |
4
(42) |
5
(9) |
6
(20) |
7
(22) |
8
(24) |
9
(12) |
|
10
(24) |
11
(11) |
12
(2) |
13
(13) |
14
(8) |
15
|
16
(16) |
|
17
(24) |
18
(36) |
19
(100) |
20
(94) |
21
(50) |
22
(39) |
23
(10) |
|
24
(14) |
25
(19) |
26
(2) |
27
(6) |
28
(17) |
29
(9) |
30
(8) |
|
31
(21) |
|
|
|
|
|
|
|
From: <sv...@va...> - 2009-05-04 06:28:10
|
Author: njn
Date: 2009-05-04 07:28:01 +0100 (Mon, 04 May 2009)
New Revision: 9758
Log:
Remove some unnecessary code.
Modified:
branches/DARWIN/coregrind/m_debuginfo/readdwarf3.c
Modified: branches/DARWIN/coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/readdwarf3.c 2009-05-04 06:14:37 UTC (rev 9757)
+++ branches/DARWIN/coregrind/m_debuginfo/readdwarf3.c 2009-05-04 06:28:01 UTC (rev 9758)
@@ -3766,12 +3766,6 @@
if (offset == 0) break;
pubname = get_AsciiZ( &pubnames );
TRACE_D3(" 0x%016llx \"%s\"\n", offset, pubname);
-#if defined(VGO_darwin)
- if (pubname[0] == '*') {
- /* GrP fixme versioned symbols get a leading * - why? */
- pubname++;
- }
-#endif
/* Read the DIE for this pubname */
if (offset > d_i_length) {
|
|
From: <sv...@va...> - 2009-05-04 06:14:42
|
Author: njn
Date: 2009-05-04 07:14:37 +0100 (Mon, 04 May 2009)
New Revision: 9757
Log:
Remove a dead function.
Modified:
branches/DARWIN/coregrind/m_debuginfo/debuginfo.c
Modified: branches/DARWIN/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/debuginfo.c 2009-05-04 06:12:37 UTC (rev 9756)
+++ branches/DARWIN/coregrind/m_debuginfo/debuginfo.c 2009-05-04 06:14:37 UTC (rev 9757)
@@ -3404,29 +3404,6 @@
}
-
-// DDD: not used?
-Addr VG_(dlsym)(Char *fnname)
-{
- DebugInfo const *si = NULL;
-
- if (!fnname) return 0;
-
- while ((si = VG_(next_seginfo)(si))) {
- Int idx;
- for (idx = 0; idx < si->symtab_used; idx++) {
- if (si->symtab[idx].name) {
- if (0 == VG_(strcmp)(si->symtab[idx].name, fnname)) {
- return si->symtab[idx].addr;
- }
- }
- }
-
- }
-
- return 0;
-}
-
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2009-05-04 06:12:39
|
Author: njn
Date: 2009-05-04 07:12:37 +0100 (Mon, 04 May 2009)
New Revision: 9756
Log:
Merge r9754 (#includes tweak) from the DARWIN branch. Also remove a
Darwin-specific code snippet that crept in from a previous commit.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-common.c
trunk/coregrind/m_ume/priv_ume.h
trunk/coregrind/pub_core_ume.h
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-common.c
===================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-common.c 2009-05-04 06:09:56 UTC (rev 9755)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-common.c 2009-05-04 06:12:37 UTC (rev 9756)
@@ -306,17 +306,6 @@
I_die_here; /* maybe just return False? */
return False;
-#elif defined(VGO_darwin)
- HChar tmp[VKI_MAXPATHLEN+1];
- if (0 == ML_(am_fcntl)(fd, VKI_F_GETPATH, (UWord)tmp)) {
- if (nbuf > 0) {
- VG_(strncpy)( buf, tmp, nbuf < sizeof(tmp) ? nbuf : sizeof(tmp) );
- buf[nbuf-1] = 0;
- }
- if (tmp[0] == '/') return True;
- }
- return False;
-
# else
# error Unknown OS
# endif
Modified: trunk/coregrind/m_ume/priv_ume.h
===================================================================
--- trunk/coregrind/m_ume/priv_ume.h 2009-05-04 06:09:56 UTC (rev 9755)
+++ trunk/coregrind/m_ume/priv_ume.h 2009-05-04 06:12:37 UTC (rev 9756)
@@ -30,17 +30,6 @@
#ifndef __PRIV_UME_H
#define __PRIV_UME_H
-#if defined(VGO_linux)
-# define HAVE_ELF
-# define HAVE_SCRIPT
-
-#elif defined(VGO_aix5)
-// The AIX port doesn't use UME.
-
-#else
-#error unknown architecture
-#endif
-
extern int VG_(do_exec_inner)(const HChar *exe, ExeInfo *info);
#if defined(HAVE_ELF)
Modified: trunk/coregrind/pub_core_ume.h
===================================================================
--- trunk/coregrind/pub_core_ume.h 2009-05-04 06:09:56 UTC (rev 9755)
+++ trunk/coregrind/pub_core_ume.h 2009-05-04 06:12:37 UTC (rev 9756)
@@ -36,6 +36,17 @@
// and exec'ing.
//--------------------------------------------------------------------
+#if defined(VGO_linux)
+# define HAVE_ELF
+# define HAVE_SCRIPT
+
+#elif defined(VGO_aix5)
+// The AIX port doesn't use UME.
+
+#else
+#error unknown architecture
+#endif
+
/*------------------------------------------------------------*/
/*--- Loading files ---*/
/*------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2009-05-04 06:10:03
|
Author: njn Date: 2009-05-04 07:09:56 +0100 (Mon, 04 May 2009) New Revision: 9755 Log: Remove an out-of-date comment. Modified: branches/DARWIN/coregrind/m_debuginfo/debuginfo.c Modified: branches/DARWIN/coregrind/m_debuginfo/debuginfo.c =================================================================== --- branches/DARWIN/coregrind/m_debuginfo/debuginfo.c 2009-05-04 06:09:07 UTC (rev 9754) +++ branches/DARWIN/coregrind/m_debuginfo/debuginfo.c 2009-05-04 06:09:56 UTC (rev 9755) @@ -52,7 +52,6 @@ #include "pub_core_oset.h" #include "pub_core_stacktrace.h" // VG_(get_StackTrace) XXX: circular dependency -// DDD: HAVE_ELF, HAVE_MACHO should be in a pub_*.h file somewhere. #include "pub_core_ume.h" #include "priv_misc.h" /* dinfo_zalloc/free */ #include "priv_d3basics.h" /* ML_(pp_GX) */ |
|
From: <sv...@va...> - 2009-05-04 06:09:12
|
Author: njn Date: 2009-05-04 07:09:07 +0100 (Mon, 04 May 2009) New Revision: 9754 Log: Tweak #includes. Modified: branches/DARWIN/coregrind/m_debuginfo/debuginfo.c branches/DARWIN/coregrind/m_ume/priv_ume.h branches/DARWIN/coregrind/pub_core_ume.h Modified: branches/DARWIN/coregrind/m_debuginfo/debuginfo.c =================================================================== --- branches/DARWIN/coregrind/m_debuginfo/debuginfo.c 2009-05-04 06:03:40 UTC (rev 9753) +++ branches/DARWIN/coregrind/m_debuginfo/debuginfo.c 2009-05-04 06:09:07 UTC (rev 9754) @@ -53,8 +53,7 @@ #include "pub_core_stacktrace.h" // VG_(get_StackTrace) XXX: circular dependency // DDD: HAVE_ELF, HAVE_MACHO should be in a pub_*.h file somewhere. -#include "pub_core_ume.h" // DDD: needed for priv_ume.h -#include "m_ume/priv_ume.h" /* HAVE_ELF, HAVE_MACHO */ +#include "pub_core_ume.h" #include "priv_misc.h" /* dinfo_zalloc/free */ #include "priv_d3basics.h" /* ML_(pp_GX) */ #include "priv_tytypes.h" Modified: branches/DARWIN/coregrind/m_ume/priv_ume.h =================================================================== --- branches/DARWIN/coregrind/m_ume/priv_ume.h 2009-05-04 06:03:40 UTC (rev 9753) +++ branches/DARWIN/coregrind/m_ume/priv_ume.h 2009-05-04 06:09:07 UTC (rev 9754) @@ -30,21 +30,6 @@ #ifndef __PRIV_UME_H #define __PRIV_UME_H -#if defined(VGO_linux) -# define HAVE_ELF -# define HAVE_SCRIPT - -#elif defined(VGO_aix5) -// The AIX port doesn't use UME. - -#elif defined(VGO_darwin) -# define HAVE_MACHO -# define HAVE_SCRIPT - -#else -#error unknown architecture -#endif - extern int VG_(do_exec_inner)(const HChar *exe, ExeInfo *info); #if defined(HAVE_ELF) Modified: branches/DARWIN/coregrind/pub_core_ume.h =================================================================== --- branches/DARWIN/coregrind/pub_core_ume.h 2009-05-04 06:03:40 UTC (rev 9753) +++ branches/DARWIN/coregrind/pub_core_ume.h 2009-05-04 06:09:07 UTC (rev 9754) @@ -36,6 +36,21 @@ // and exec'ing. //-------------------------------------------------------------------- +#if defined(VGO_linux) +# define HAVE_ELF +# define HAVE_SCRIPT + +#elif defined(VGO_aix5) +// The AIX port doesn't use UME. + +#elif defined(VGO_darwin) +# define HAVE_MACHO +# define HAVE_SCRIPT + +#else +#error unknown architecture +#endif + /*------------------------------------------------------------*/ /*--- Loading files ---*/ /*------------------------------------------------------------*/ |
|
From: <sv...@va...> - 2009-05-04 06:03:47
|
Author: njn
Date: 2009-05-04 07:03:40 +0100 (Mon, 04 May 2009)
New Revision: 9753
Log:
Tweak a comment.
Modified:
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
Modified: branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-05-04 05:55:46 UTC (rev 9752)
+++ branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-05-04 06:03:40 UTC (rev 9753)
@@ -2357,8 +2357,8 @@
if (!ok)
return VG_(mk_SysRes_Error)( VKI_EINVAL );
-// DDD: the Darwin tag used here seems to just be for statistical
-// purposes. --njn
+// On Darwin, for anonymous maps you can pass in a tag which is used by
+// programs like vmmap for statistical purposes.
#ifndef VM_TAG_VALGRIND
# define VM_TAG_VALGRIND 0
#endif
|
|
From: <sv...@va...> - 2009-05-04 05:55:56
|
Author: njn
Date: 2009-05-04 06:55:46 +0100 (Mon, 04 May 2009)
New Revision: 9752
Log:
Merged r9750, r9751 (remove m_aspacemgr layering violation) from the DARWIN
branch.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-common.c
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_aspacemgr/priv_aspacemgr.h
trunk/coregrind/m_libcfile.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-common.c
===================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-common.c 2009-05-04 05:47:42 UTC (rev 9751)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-common.c 2009-05-04 05:55:46 UTC (rev 9752)
@@ -253,6 +253,12 @@
return res.isError ? -1 : res.res;
}
+Int ML_(am_fcntl) ( Int fd, Int cmd, Addr arg )
+{
+ SysRes res = VG_(do_syscall3)(__NR_fcntl, fd, cmd, arg);
+ return res.isError ? -1 : res.res;
+}
+
/* Get the dev, inode and mode info for a file descriptor, if
possible. Returns True on success. */
Bool ML_(am_get_fd_d_i_m)( Int fd,
@@ -284,7 +290,41 @@
return False;
}
+Bool ML_(am_resolve_filename) ( Int fd, /*OUT*/HChar* buf, Int nbuf )
+{
+#if defined(VGO_linux)
+ Int i;
+ HChar tmp[64];
+ for (i = 0; i < nbuf; i++) buf[i] = 0;
+ ML_(am_sprintf)(tmp, "/proc/self/fd/%d", fd);
+ if (ML_(am_readlink)(tmp, buf, nbuf) > 0 && buf[0] == '/')
+ return True;
+ else
+ return False;
+#elif defined(VGO_aix5)
+ I_die_here; /* maybe just return False? */
+ return False;
+
+#elif defined(VGO_darwin)
+ HChar tmp[VKI_MAXPATHLEN+1];
+ if (0 == ML_(am_fcntl)(fd, VKI_F_GETPATH, (UWord)tmp)) {
+ if (nbuf > 0) {
+ VG_(strncpy)( buf, tmp, nbuf < sizeof(tmp) ? nbuf : sizeof(tmp) );
+ buf[nbuf-1] = 0;
+ }
+ if (tmp[0] == '/') return True;
+ }
+ return False;
+
+# else
+# error Unknown OS
+# endif
+}
+
+
+
+
/*-----------------------------------------------------------------*/
/*--- ---*/
/*--- Manage stacks for Valgrind itself. ---*/
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-05-04 05:47:42 UTC (rev 9751)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-05-04 05:55:46 UTC (rev 9752)
@@ -338,39 +338,6 @@
/*-----------------------------------------------------------------*/
/*--- ---*/
-/*--- Functions for finding information about file descriptors. ---*/
-/*--- ---*/
-/*-----------------------------------------------------------------*/
-
-/* Extract the device, inode and mode numbers for a fd. */
-static
-Bool get_inode_for_fd ( Int fd, /*OUT*/ULong* dev,
- /*OUT*/ULong* ino, /*OUT*/UInt* mode )
-{
- return ML_(am_get_fd_d_i_m)(fd, dev, ino, mode);
-}
-
-/* Given a file descriptor, attempt to deduce its filename. To do
- this, we use /proc/self/fd/<FD>. If this doesn't point to a file,
- or if it doesn't exist, we return False. */
-static
-Bool get_name_for_fd ( Int fd, /*OUT*/HChar* buf, Int nbuf )
-{
- Int i;
- HChar tmp[64];
-
- ML_(am_sprintf)(tmp, "/proc/self/fd/%d", fd);
- for (i = 0; i < nbuf; i++) buf[i] = 0;
-
- if (ML_(am_readlink)(tmp, buf, nbuf) > 0 && buf[0] == '/')
- return True;
- else
- return False;
-}
-
-
-/*-----------------------------------------------------------------*/
-/*--- ---*/
/*--- SegName array management. ---*/
/*--- ---*/
/*-----------------------------------------------------------------*/
@@ -1959,12 +1926,12 @@
if (!(flags & VKI_MAP_ANONYMOUS)) {
// Nb: We ignore offset requests in anonymous mmaps (see bug #126722)
seg.offset = offset;
- if (get_inode_for_fd(fd, &dev, &ino, &mode)) {
+ if (ML_(am_get_fd_d_i_m)(fd, &dev, &ino, &mode)) {
seg.dev = dev;
seg.ino = ino;
seg.mode = mode;
}
- if (get_name_for_fd(fd, buf, VKI_PATH_MAX)) {
+ if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
seg.fnIdx = allocate_segname( buf );
}
}
@@ -2174,12 +2141,12 @@
seg.hasR = toBool(prot & VKI_PROT_READ);
seg.hasW = toBool(prot & VKI_PROT_WRITE);
seg.hasX = toBool(prot & VKI_PROT_EXEC);
- if (get_inode_for_fd(fd, &dev, &ino, &mode)) {
+ if (ML_(am_get_fd_d_i_m)(fd, &dev, &ino, &mode)) {
seg.dev = dev;
seg.ino = ino;
seg.mode = mode;
}
- if (get_name_for_fd(fd, buf, VKI_PATH_MAX)) {
+ if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
seg.fnIdx = allocate_segname( buf );
}
add_segment( &seg );
@@ -2449,12 +2416,12 @@
seg.hasR = toBool(prot & VKI_PROT_READ);
seg.hasW = toBool(prot & VKI_PROT_WRITE);
seg.hasX = toBool(prot & VKI_PROT_EXEC);
- if (get_inode_for_fd(fd, &dev, &ino, &mode)) {
+ if (ML_(am_get_fd_d_i_m)(fd, &dev, &ino, &mode)) {
seg.dev = dev;
seg.ino = ino;
seg.mode = mode;
}
- if (get_name_for_fd(fd, buf, VKI_PATH_MAX)) {
+ if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
seg.fnIdx = allocate_segname( buf );
}
add_segment( &seg );
Modified: trunk/coregrind/m_aspacemgr/priv_aspacemgr.h
===================================================================
--- trunk/coregrind/m_aspacemgr/priv_aspacemgr.h 2009-05-04 05:47:42 UTC (rev 9751)
+++ trunk/coregrind/m_aspacemgr/priv_aspacemgr.h 2009-05-04 05:55:46 UTC (rev 9752)
@@ -43,7 +43,7 @@
#include "pub_core_debuglog.h" // VG_(debugLog)
-#include "pub_core_libcbase.h" // VG_(strlen), VG_(strcmp)
+#include "pub_core_libcbase.h" // VG_(strlen), VG_(strcmp), VG_(strncpy)
// VG_IS_PAGE_ALIGNED
// VG_PGROUNDDN, VG_PGROUNDUP
@@ -109,14 +109,18 @@
extern void ML_(am_close) ( Int fd );
extern Int ML_(am_read) ( Int fd, void* buf, Int count);
extern Int ML_(am_readlink) ( HChar* path, HChar* buf, UInt bufsiz );
+extern Int ML_(am_fcntl) ( Int fd, Int cmd, Addr arg );
/* Get the dev, inode and mode info for a file descriptor, if
possible. Returns True on success. */
extern
Bool ML_(am_get_fd_d_i_m)( Int fd,
- /*OUT*/ULong* dev,
- /*OUT*/ULong* ino, /*OUT*/UInt* mode );
+ /*OUT*/ULong* dev,
+ /*OUT*/ULong* ino, /*OUT*/UInt* mode );
+extern
+Bool ML_(am_resolve_filename) ( Int fd, /*OUT*/HChar* buf, Int nbuf );
+
/* ------ Implemented seperately in aspacemgr-{linux,aix5}.c ------ */
/* Do a sanity check (/proc/self/maps sync check) */
Modified: trunk/coregrind/m_libcfile.c
===================================================================
--- trunk/coregrind/m_libcfile.c 2009-05-04 05:47:42 UTC (rev 9751)
+++ trunk/coregrind/m_libcfile.c 2009-05-04 05:55:46 UTC (rev 9752)
@@ -82,11 +82,13 @@
return True;
else
return False;
+
# elif defined(VGO_aix5)
I_die_here; /* maybe just return False? */
return False;
+
# else
-# error "need fd-to-filename for this OS"
+# error Unknown OS
# endif
}
|
|
From: <sv...@va...> - 2009-05-04 05:47:48
|
Author: njn
Date: 2009-05-04 06:47:42 +0100 (Mon, 04 May 2009)
New Revision: 9751
Log:
Make it compile on Linux again.
Modified:
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-common.c
Modified: branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-common.c
===================================================================
--- branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-common.c 2009-05-04 05:40:58 UTC (rev 9750)
+++ branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-common.c 2009-05-04 05:47:42 UTC (rev 9751)
@@ -314,6 +314,7 @@
Bool ML_(am_resolve_filename) ( Int fd, /*OUT*/HChar* buf, Int nbuf )
{
#if defined(VGO_linux)
+ Int i;
HChar tmp[64];
for (i = 0; i < nbuf; i++) buf[i] = 0;
ML_(am_sprintf)(tmp, "/proc/self/fd/%d", fd);
|
|
From: <sv...@va...> - 2009-05-04 05:41:01
|
Author: njn
Date: 2009-05-04 06:40:58 +0100 (Mon, 04 May 2009)
New Revision: 9750
Log:
Fix a layering violation -- add a local implemenatation of
resolve_filename() to m_aspacem.
Modified:
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-common.c
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/DARWIN/coregrind/m_aspacemgr/priv_aspacemgr.h
branches/DARWIN/coregrind/m_libcfile.c
Modified: branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-common.c
===================================================================
--- branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-common.c 2009-05-04 05:17:02 UTC (rev 9749)
+++ branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-common.c 2009-05-04 05:40:58 UTC (rev 9750)
@@ -270,6 +270,16 @@
return sr_isError(res) ? -1 : sr_Res(res);
}
+Int ML_(am_fcntl) ( Int fd, Int cmd, Addr arg )
+{
+# if defined(VGO_darwin)
+ SysRes res = VG_(do_syscall3)(__NR_fcntl_nocancel, fd, cmd, arg);
+# else
+ SysRes res = VG_(do_syscall3)(__NR_fcntl, fd, cmd, arg);
+# endif
+ return sr_isError(res) ? -1 : sr_Res(res);
+}
+
/* Get the dev, inode and mode info for a file descriptor, if
possible. Returns True on success. */
Bool ML_(am_get_fd_d_i_m)( Int fd,
@@ -301,7 +311,40 @@
return False;
}
+Bool ML_(am_resolve_filename) ( Int fd, /*OUT*/HChar* buf, Int nbuf )
+{
+#if defined(VGO_linux)
+ HChar tmp[64];
+ for (i = 0; i < nbuf; i++) buf[i] = 0;
+ ML_(am_sprintf)(tmp, "/proc/self/fd/%d", fd);
+ if (ML_(am_readlink)(tmp, buf, nbuf) > 0 && buf[0] == '/')
+ return True;
+ else
+ return False;
+#elif defined(VGO_aix5)
+ I_die_here; /* maybe just return False? */
+ return False;
+
+#elif defined(VGO_darwin)
+ HChar tmp[VKI_MAXPATHLEN+1];
+ if (0 == ML_(am_fcntl)(fd, VKI_F_GETPATH, (UWord)tmp)) {
+ if (nbuf > 0) {
+ VG_(strncpy)( buf, tmp, nbuf < sizeof(tmp) ? nbuf : sizeof(tmp) );
+ buf[nbuf-1] = 0;
+ }
+ if (tmp[0] == '/') return True;
+ }
+ return False;
+
+# else
+# error Unknown OS
+# endif
+}
+
+
+
+
/*-----------------------------------------------------------------*/
/*--- ---*/
/*--- Manage stacks for Valgrind itself. ---*/
Modified: branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-05-04 05:17:02 UTC (rev 9749)
+++ branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-05-04 05:40:58 UTC (rev 9750)
@@ -338,54 +338,6 @@
/*-----------------------------------------------------------------*/
/*--- ---*/
-/*--- Functions for finding information about file descriptors. ---*/
-/*--- ---*/
-/*-----------------------------------------------------------------*/
-
-/* Extract the device, inode and mode numbers for a fd. */
-static
-Bool get_inode_for_fd ( Int fd, /*OUT*/ULong* dev,
- /*OUT*/ULong* ino, /*OUT*/UInt* mode )
-{
- return ML_(am_get_fd_d_i_m)(fd, dev, ino, mode);
-}
-
-/* Given a file descriptor, attempt to deduce its filename. To do
- this, we use /proc/self/fd/<FD>. If this doesn't point to a file,
- or if it doesn't exist, we return False. */
-static
-Bool get_name_for_fd ( Int fd, /*OUT*/HChar* buf, Int nbuf )
-{
-#if HAVE_PROC
- // Try /proc/self/fd/#
- {
- Int i;
- HChar tmp[64];
-
- ML_(am_sprintf)(tmp, "/proc/self/fd/%d", fd);
- for (i = 0; i < nbuf; i++) buf[i] = 0;
-
- if (ML_(am_readlink)(tmp, buf, nbuf) > 0 && buf[0] == '/')
- return True;
- }
-#endif
-
-#if defined(VGO_darwin)
- // GrP fixme layering violation?
- // Try fcntl(F_GETPATH)
- extern Bool VG_(resolve_filename)(Int _fd, HChar *_buf, Int _nbuf);
- if (VG_(resolve_filename)(fd, buf, nbuf)) {
- return True;
- }
-#endif
-
- // Bummer.
- return False;
-}
-
-
-/*-----------------------------------------------------------------*/
-/*--- ---*/
/*--- SegName array management. ---*/
/*--- ---*/
/*-----------------------------------------------------------------*/
@@ -2011,12 +1963,12 @@
if (!(flags & VKI_MAP_ANONYMOUS)) {
// Nb: We ignore offset requests in anonymous mmaps (see bug #126722)
seg.offset = offset;
- if (get_inode_for_fd(fd, &dev, &ino, &mode)) {
+ if (ML_(am_get_fd_d_i_m)(fd, &dev, &ino, &mode)) {
seg.dev = dev;
seg.ino = ino;
seg.mode = mode;
}
- if (get_name_for_fd(fd, buf, VKI_PATH_MAX)) {
+ if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
seg.fnIdx = allocate_segname( buf );
}
}
@@ -2233,14 +2185,14 @@
seg.hasR = toBool(prot & VKI_PROT_READ);
seg.hasW = toBool(prot & VKI_PROT_WRITE);
seg.hasX = toBool(prot & VKI_PROT_EXEC);
- if (get_inode_for_fd(fd, &dev, &ino, &mode)) {
+ if (ML_(am_get_fd_d_i_m)(fd, &dev, &ino, &mode)) {
seg.dev = dev;
seg.ino = ino;
seg.mode = mode;
}
if (name) {
seg.fnIdx = allocate_segname( name );
- } else if (get_name_for_fd(fd, buf, VKI_PATH_MAX)) {
+ } else if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
seg.fnIdx = allocate_segname( buf );
}
add_segment( &seg );
@@ -2523,12 +2475,12 @@
seg.hasR = toBool(prot & VKI_PROT_READ);
seg.hasW = toBool(prot & VKI_PROT_WRITE);
seg.hasX = toBool(prot & VKI_PROT_EXEC);
- if (get_inode_for_fd(fd, &dev, &ino, &mode)) {
+ if (ML_(am_get_fd_d_i_m)(fd, &dev, &ino, &mode)) {
seg.dev = dev;
seg.ino = ino;
seg.mode = mode;
}
- if (get_name_for_fd(fd, buf, VKI_PATH_MAX)) {
+ if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
seg.fnIdx = allocate_segname( buf );
}
add_segment( &seg );
Modified: branches/DARWIN/coregrind/m_aspacemgr/priv_aspacemgr.h
===================================================================
--- branches/DARWIN/coregrind/m_aspacemgr/priv_aspacemgr.h 2009-05-04 05:17:02 UTC (rev 9749)
+++ branches/DARWIN/coregrind/m_aspacemgr/priv_aspacemgr.h 2009-05-04 05:40:58 UTC (rev 9750)
@@ -43,7 +43,7 @@
#include "pub_core_debuglog.h" // VG_(debugLog)
-#include "pub_core_libcbase.h" // VG_(strlen), VG_(strcmp)
+#include "pub_core_libcbase.h" // VG_(strlen), VG_(strcmp), VG_(strncpy)
// VG_IS_PAGE_ALIGNED
// VG_PGROUNDDN, VG_PGROUNDUP
@@ -109,14 +109,18 @@
extern void ML_(am_close) ( Int fd );
extern Int ML_(am_read) ( Int fd, void* buf, Int count);
extern Int ML_(am_readlink) ( HChar* path, HChar* buf, UInt bufsiz );
+extern Int ML_(am_fcntl) ( Int fd, Int cmd, Addr arg );
/* Get the dev, inode and mode info for a file descriptor, if
possible. Returns True on success. */
extern
Bool ML_(am_get_fd_d_i_m)( Int fd,
- /*OUT*/ULong* dev,
- /*OUT*/ULong* ino, /*OUT*/UInt* mode );
+ /*OUT*/ULong* dev,
+ /*OUT*/ULong* ino, /*OUT*/UInt* mode );
+extern
+Bool ML_(am_resolve_filename) ( Int fd, /*OUT*/HChar* buf, Int nbuf );
+
/* ------ Implemented seperately in aspacemgr-{linux,aix5}.c ------ */
/* Do a sanity check (/proc/self/maps sync check) */
Modified: branches/DARWIN/coregrind/m_libcfile.c
===================================================================
--- branches/DARWIN/coregrind/m_libcfile.c 2009-05-04 05:17:02 UTC (rev 9749)
+++ branches/DARWIN/coregrind/m_libcfile.c 2009-05-04 05:40:58 UTC (rev 9750)
@@ -87,6 +87,11 @@
return True;
else
return False;
+
+# elif defined(VGO_aix5)
+ I_die_here; /* maybe just return False? */
+ return False;
+
# elif defined(VGO_darwin)
HChar tmp[VKI_MAXPATHLEN+1];
if (0 == VG_(fcntl)(fd, VKI_F_GETPATH, (UWord)tmp)) {
@@ -97,11 +102,9 @@
if (tmp[0] == '/') return True;
}
return False;
-# elif defined(VGO_aix5)
- I_die_here; /* maybe just return False? */
- return False;
+
# else
-# error "need fd-to-filename for this OS"
+# error Unknown OS
# endif
}
|
|
From: <sv...@va...> - 2009-05-04 05:17:07
|
Author: njn
Date: 2009-05-04 06:17:02 +0100 (Mon, 04 May 2009)
New Revision: 9749
Log:
Minor change.
Modified:
branches/DARWIN/coregrind/m_main.c
Modified: branches/DARWIN/coregrind/m_main.c
===================================================================
--- branches/DARWIN/coregrind/m_main.c 2009-05-04 04:56:44 UTC (rev 9748)
+++ branches/DARWIN/coregrind/m_main.c 2009-05-04 05:17:02 UTC (rev 9749)
@@ -1528,7 +1528,7 @@
if (!need_help) {
VG_(debugLog)(1, "main", "Create initial image\n");
-# if defined(VGO_linux)
+# if defined(VGO_linux) || defined(VGO_darwin)
the_iicii.argv = argv;
the_iicii.envp = envp;
the_iicii.toolname = toolname;
@@ -1539,10 +1539,6 @@
/* the_iicii.sp_at_startup is irrelevant */
/* the_iicii.clstack_top is irrelevant */
the_iicii.toolname = toolname;
-# elif defined(VGO_darwin)
- the_iicii.argv = argv;
- the_iicii.envp = envp;
- the_iicii.toolname = toolname;
# else
# error "Unknown platform"
# endif
|
|
From: <sv...@va...> - 2009-05-04 04:56:49
|
Author: njn Date: 2009-05-04 05:56:44 +0100 (Mon, 04 May 2009) New Revision: 9748 Log: Remove two dead constants. Modified: branches/DARWIN/include/vki/vki-darwin.h Modified: branches/DARWIN/include/vki/vki-darwin.h =================================================================== --- branches/DARWIN/include/vki/vki-darwin.h 2009-05-04 04:53:11 UTC (rev 9747) +++ branches/DARWIN/include/vki/vki-darwin.h 2009-05-04 04:56:44 UTC (rev 9748) @@ -76,8 +76,6 @@ // valgrind special // magic mmap() flags -#define VKI_MAP_NOSYMS 0x40000000 // internal: disable symbol loading -#define VKI_MAP_CLIENT 0x80000000 // internal: distinguish client mappings #define VKI_MAP_ANONYMOUS MAP_ANON // linux synonym // fds for mmap(MAP_ANON), displayed by vmmap |
|
From: <sv...@va...> - 2009-05-04 04:53:14
|
Author: njn
Date: 2009-05-04 05:53:11 +0100 (Mon, 04 May 2009)
New Revision: 9747
Log:
Add some missing conditional compilation guards for Darwin redirects. Fixes
run-time failures on Linux.
Modified:
branches/DARWIN/memcheck/mc_replace_strmem.c
Modified: branches/DARWIN/memcheck/mc_replace_strmem.c
===================================================================
--- branches/DARWIN/memcheck/mc_replace_strmem.c 2009-05-04 04:38:34 UTC (rev 9746)
+++ branches/DARWIN/memcheck/mc_replace_strmem.c 2009-05-04 04:53:11 UTC (rev 9747)
@@ -523,11 +523,11 @@
}
MEMCMP(VG_Z_LIBC_SONAME, memcmp)
-MEMCMP(VG_Z_DYLD, memcmp)
MEMCMP(VG_Z_LIBC_SONAME, bcmp)
#if defined(VGO_linux)
MEMCMP(VG_Z_LD_SO_1, bcmp)
#elif defined(VGO_darwin)
+MEMCMP(VG_Z_DYLD, memcmp)
MEMCMP(VG_Z_DYLD, bcmp)
#endif
@@ -584,7 +584,9 @@
}
MEMSET(VG_Z_LIBC_SONAME, memset)
+#if defined(VGO_darwin)
MEMSET(VG_Z_DYLD, memset)
+#endif
#define MEMMOVE(soname, fnname) \
@@ -609,7 +611,9 @@
}
MEMMOVE(VG_Z_LIBC_SONAME, memmove)
+#if defined(VGO_darwin)
MEMMOVE(VG_Z_DYLD, memmove)
+#endif
#define BCOPY(soname, fnname) \
@@ -633,7 +637,9 @@
}
BCOPY(VG_Z_LIBC_SONAME, bcopy)
+#if defined(VGO_darwin)
BCOPY(VG_Z_DYLD, bcopy)
+#endif
/* glibc 2.5 variant of memmove which checks the dest is big enough.
|
|
From: <sv...@va...> - 2009-05-04 04:38:44
|
Author: njn
Date: 2009-05-04 05:38:34 +0100 (Mon, 04 May 2009)
New Revision: 9746
Log:
Merged r9745 (conditionally compile redirects) from the trunk, and extended
it to Darwin redirects suitably.
Modified:
branches/DARWIN/coregrind/m_demangle/demangle.c
branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c
branches/DARWIN/drd/drd_strmem_intercepts.c
branches/DARWIN/exp-ptrcheck/h_intercepts.c
branches/DARWIN/helgrind/hg_intercepts.c
branches/DARWIN/include/pub_tool_redir.h
branches/DARWIN/memcheck/mc_replace_strmem.c
Modified: branches/DARWIN/coregrind/m_demangle/demangle.c
===================================================================
--- branches/DARWIN/coregrind/m_demangle/demangle.c 2009-05-04 04:20:02 UTC (rev 9745)
+++ branches/DARWIN/coregrind/m_demangle/demangle.c 2009-05-04 04:38:34 UTC (rev 9746)
@@ -167,7 +167,7 @@
} \
} while (0)
- Bool error, oflow, valid, fn_is_encoded;
+ Bool error, oflow, valid, fn_is_encoded, is_VG_Z_prefixed;
Int soi, fni, i;
vg_assert(soLen > 0 || (soLen == 0 && so == NULL));
@@ -192,6 +192,19 @@
if (isWrap)
*isWrap = sym[3] == 'w';
+ /* Now check the soname prefix isn't "VG_Z_", as described in
+ pub_tool_redir.h. */
+ is_VG_Z_prefixed =
+ sym[ 7] == 'V' &&
+ sym[ 8] == 'G' &&
+ sym[ 9] == '_' &&
+ sym[10] == 'Z' &&
+ sym[11] == '_';
+ if (is_VG_Z_prefixed) {
+ vg_assert2(0, "symbol with a 'VG_Z_' prefix: %s.\n"
+ "see pub_tool_redir.h for an explanation.", sym);
+ }
+
/* Now scan the Z-encoded soname. */
i = 7;
while (True) {
Modified: branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c
===================================================================
--- branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-05-04 04:20:02 UTC (rev 9745)
+++ branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-05-04 04:38:34 UTC (rev 9746)
@@ -193,8 +193,9 @@
ALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc, malloc);
#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
ALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc_common, malloc);
+#elif defined(VGO_darwin)
+ZONEALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc_zone_malloc, malloc);
#endif
-ZONEALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc_zone_malloc, malloc);
/*---------------------- new ----------------------*/
@@ -322,8 +323,9 @@
FREE(VG_Z_LIBC_SONAME, free, free );
#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
FREE(VG_Z_LIBC_SONAME, free_common, free );
+#elif defined(VGO_darwin)
+ZONEFREE(VG_Z_LIBC_SONAME, malloc_zone_free, free );
#endif
-ZONEFREE(VG_Z_LIBC_SONAME, malloc_zone_free, free );
/*---------------------- cfree ----------------------*/
@@ -412,8 +414,9 @@
CALLOC(VG_Z_LIBC_SONAME, calloc);
#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
CALLOC(VG_Z_LIBC_SONAME, calloc_common);
+#elif defined(VGO_darwin)
+ZONECALLOC(VG_Z_LIBC_SONAME, malloc_zone_calloc);
#endif
-ZONECALLOC(VG_Z_LIBC_SONAME, malloc_zone_calloc);
/*---------------------- realloc ----------------------*/
@@ -469,8 +472,9 @@
REALLOC(VG_Z_LIBC_SONAME, realloc);
#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
REALLOC(VG_Z_LIBC_SONAME, realloc_common);
+#elif defined(VGO_darwin)
+ZONEREALLOC(VG_Z_LIBC_SONAME, malloc_zone_realloc);
#endif
-ZONEREALLOC(VG_Z_LIBC_SONAME, malloc_zone_realloc);
/*---------------------- memalign ----------------------*/
@@ -522,7 +526,9 @@
}
MEMALIGN(VG_Z_LIBC_SONAME, memalign);
+#if defined(VGO_darwin)
ZONEMEMALIGN(VG_Z_LIBC_SONAME, malloc_zone_memalign);
+#endif
/*---------------------- valloc ----------------------*/
@@ -562,7 +568,9 @@
}
VALLOC(VG_Z_LIBC_SONAME, valloc);
+#if defined(VGO_darwin)
ZONEVALLOC(VG_Z_LIBC_SONAME, malloc_zone_valloc);
+#endif
/*---------------------- mallopt ----------------------*/
@@ -763,8 +771,10 @@
return &vg_default_zone; \
}
+#if defined(VGO_darwin)
DEFAULT_ZONE(VG_Z_LIBC_SONAME, malloc_zone_from_ptr);
DEFAULT_ZONE(VG_Z_LIBC_SONAME, malloc_default_zone);
+#endif
// GrP fixme bypass libc's use of zone->introspect->check
#define ZONE_CHECK(soname, fnname) \
@@ -775,7 +785,9 @@
return 1; \
}
+#if defined(VGO_darwin)
ZONE_CHECK(VG_Z_LIBC_SONAME, malloc_zone_check);
+#endif
#endif
Modified: branches/DARWIN/drd/drd_strmem_intercepts.c
===================================================================
--- branches/DARWIN/drd/drd_strmem_intercepts.c 2009-05-04 04:20:02 UTC (rev 9745)
+++ branches/DARWIN/drd/drd_strmem_intercepts.c 2009-05-04 04:38:34 UTC (rev 9746)
@@ -65,8 +65,10 @@
}
STRLEN(VG_Z_LIBC_SONAME, strlen)
+#if defined(VGO_linux)
STRLEN(VG_Z_LD_LINUX_SO_2, strlen)
STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen)
+#endif
/*--------------------------------------------------------------------*/
/*--- end ---*/
Modified: branches/DARWIN/exp-ptrcheck/h_intercepts.c
===================================================================
--- branches/DARWIN/exp-ptrcheck/h_intercepts.c 2009-05-04 04:20:02 UTC (rev 9745)
+++ branches/DARWIN/exp-ptrcheck/h_intercepts.c 2009-05-04 04:38:34 UTC (rev 9746)
@@ -58,9 +58,11 @@
}
STRLEN(VG_Z_LIBC_SONAME, strlen)
+#if defined(VGO_linux)
STRLEN(VG_Z_LD_LINUX_SO_2, strlen)
STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen)
STRLEN(VG_Z_LD_SO_1, strlen)
+#endif
#define STRCMP(soname, fnname) \
@@ -84,8 +86,10 @@
}
STRCMP(VG_Z_LIBC_SONAME, strcmp)
+#if defined(VGO_linux)
STRCMP(VG_Z_LD_LINUX_X86_64_SO_2, strcmp)
STRCMP(VG_Z_LD64_SO_1, strcmp)
+#endif
#define MEMCPY(soname, fnname) \
@@ -131,8 +135,10 @@
}
MEMCPY(VG_Z_LIBC_SONAME, memcpy)
+#if defined(VGO_linux)
MEMCPY(VG_Z_LD_SO_1, memcpy) /* ld.so.1 */
MEMCPY(VG_Z_LD64_SO_1, memcpy) /* ld64.so.1 */
+#endif
/* Copy SRC to DEST, returning the address of the terminating '\0' in
@@ -148,8 +154,10 @@
}
STPCPY(VG_Z_LIBC_SONAME, stpcpy)
+#if defined(VGO_linux)
STPCPY(VG_Z_LD_LINUX_SO_2, stpcpy)
STPCPY(VG_Z_LD_LINUX_X86_64_SO_2, stpcpy)
+#endif
/*--------------------------------------------------------------------*/
Modified: branches/DARWIN/helgrind/hg_intercepts.c
===================================================================
--- branches/DARWIN/helgrind/hg_intercepts.c 2009-05-04 04:20:02 UTC (rev 9745)
+++ branches/DARWIN/helgrind/hg_intercepts.c 2009-05-04 04:38:34 UTC (rev 9746)
@@ -1633,11 +1633,13 @@
// Apparently index() is the same thing as strchr()
STRCHR(VG_Z_LIBC_SONAME, strchr)
+STRCHR(VG_Z_LIBC_SONAME, index)
+#if defined(VGO_linux)
STRCHR(VG_Z_LD_LINUX_SO_2, strchr)
+STRCHR(VG_Z_LD_LINUX_SO_2, index)
STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, strchr)
-STRCHR(VG_Z_LIBC_SONAME, index)
-STRCHR(VG_Z_LD_LINUX_SO_2, index)
STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, index)
+#endif
// Note that this replacement often doesn't get used because gcc inlines
@@ -1654,8 +1656,10 @@
}
STRLEN(VG_Z_LIBC_SONAME, strlen)
+#if defined(VGO_linux)
STRLEN(VG_Z_LD_LINUX_SO_2, strlen)
STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen)
+#endif
#define STRCPY(soname, fnname) \
@@ -1694,8 +1698,10 @@
}
STRCMP(VG_Z_LIBC_SONAME, strcmp)
+#if defined(VGO_linux)
STRCMP(VG_Z_LD_LINUX_X86_64_SO_2, strcmp)
STRCMP(VG_Z_LD64_SO_1, strcmp)
+#endif
#define MEMCPY(soname, fnname) \
@@ -1741,8 +1747,10 @@
}
MEMCPY(VG_Z_LIBC_SONAME, memcpy)
+#if defined(VGO_linux)
MEMCPY(VG_Z_LD_SO_1, memcpy) /* ld.so.1 */
MEMCPY(VG_Z_LD64_SO_1, memcpy) /* ld64.so.1 */
+#endif
/* icc9 blats these around all over the place. Not only in the main
executable but various .so's. They are highly tuned and read
memory beyond the source boundary (although work correctly and
Modified: branches/DARWIN/include/pub_tool_redir.h
===================================================================
--- branches/DARWIN/include/pub_tool_redir.h 2009-05-04 04:20:02 UTC (rev 9745)
+++ branches/DARWIN/include/pub_tool_redir.h 2009-05-04 04:38:34 UTC (rev 9746)
@@ -160,6 +160,15 @@
/* --------- Some handy Z-encoded names. --------- */
+// Nb: ALL THESE NAMES MUST BEGIN WITH "VG_Z_". Why? If we applied
+// conditional compilation inconsistently we could accidentally use an
+// undefined constant like VG_Z_LIBC_DOT_A, resulting in a bogus Z-encoded
+// name like "_vgrZU_VG_Z_LIBC_DOT_A_foo". This can't be detected at
+// compile-time, because both the constant's name and its value are
+// identifiers. However, by always using "VG_Z_" as a prefix, we can do a
+// run-time check and abort if any name has "VG_Z_" in it, because that
+// indicates that the constant has been used without being defined.
+
/* --- Soname of the standard C library. --- */
#if defined(VGO_linux)
@@ -177,8 +186,7 @@
/* --- Soname of the GNU C++ library. --- */
-// DDD: this one and those below should probably be conditionally compiled,
-// as should all the redirects in the tools that use them.
+// Valid on all platforms(?)
#define VG_Z_LIBSTDCXX_SONAME libstdcZpZpZa // libstdc++*
/* --- Soname of XLC's C++ library. --- */
@@ -194,14 +202,18 @@
/* --- Sonames for Linux ELF linkers. --- */
+#if defined(VGO_linux)
#define VG_Z_LD_LINUX_SO_2 ldZhlinuxZdsoZd2 // ld-linux.so.2
#define VG_Z_LD_LINUX_X86_64_SO_2 ldZhlinuxZhx86Zh64ZdsoZd2 // ld-linux-x86-64.so.2
#define VG_Z_LD64_SO_1 ld64ZdsoZd1 // ld64.so.1
#define VG_Z_LD_SO_1 ldZdsoZd1 // ld.so.1
+#endif
/* --- Executable name for Darwin Mach-O linker. --- */
+#if defined(VGO_darwin)
#define VG_Z_DYLD dyld // dyld
+#endif
#endif // __PUB_TOOL_REDIR_H
Modified: branches/DARWIN/memcheck/mc_replace_strmem.c
===================================================================
--- branches/DARWIN/memcheck/mc_replace_strmem.c 2009-05-04 04:20:02 UTC (rev 9745)
+++ branches/DARWIN/memcheck/mc_replace_strmem.c 2009-05-04 04:38:34 UTC (rev 9746)
@@ -114,10 +114,13 @@
// Apparently rindex() is the same thing as strrchr()
STRRCHR(VG_Z_LIBC_SONAME, strrchr)
+STRRCHR(VG_Z_LIBC_SONAME, rindex)
+#if defined(VGO_linux)
+STRRCHR(VG_Z_LD_LINUX_SO_2, rindex)
+#elif defined(VGO_darwin)
STRRCHR(VG_Z_DYLD, strrchr)
-STRRCHR(VG_Z_LIBC_SONAME, rindex)
STRRCHR(VG_Z_DYLD, rindex)
-STRRCHR(VG_Z_LD_LINUX_SO_2, rindex)
+#endif
#define STRCHR(soname, fnname) \
@@ -135,13 +138,16 @@
// Apparently index() is the same thing as strchr()
STRCHR(VG_Z_LIBC_SONAME, strchr)
+STRCHR(VG_Z_LIBC_SONAME, index)
+#if defined(VGO_linux)
STRCHR(VG_Z_LD_LINUX_SO_2, strchr)
+STRCHR(VG_Z_LD_LINUX_SO_2, index)
STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, strchr)
+STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, index)
+#elif defined(VGO_darwin)
STRCHR(VG_Z_DYLD, strchr)
-STRCHR(VG_Z_LIBC_SONAME, index)
-STRCHR(VG_Z_LD_LINUX_SO_2, index)
-STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, index)
STRCHR(VG_Z_DYLD, index)
+#endif
#define STRCAT(soname, fnname) \
@@ -194,7 +200,9 @@
}
STRNCAT(VG_Z_LIBC_SONAME, strncat)
-STRNCAT(VG_Z_DYLD, strncat)
+#if defined(VGO_darwin)
+STRNCAT(VG_Z_DYLD, strncat)
+#endif
/* Append src to dst. n is the size of dst's buffer. dst is guaranteed
@@ -234,7 +242,9 @@
}
STRLCAT(VG_Z_LIBC_SONAME, strlcat)
+#if defined(VGO_darwin)
STRLCAT(VG_Z_DYLD, strlcat)
+#endif
#define STRNLEN(soname, fnname) \
@@ -262,9 +272,11 @@
return i; \
}
-STRLEN(VG_Z_LIBC_SONAME, strlen)
+STRLEN(VG_Z_LIBC_SONAME, strlen)
+#if defined(VGO_linux)
STRLEN(VG_Z_LD_LINUX_SO_2, strlen)
STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen)
+#endif
#define STRCPY(soname, fnname) \
@@ -289,7 +301,9 @@
}
STRCPY(VG_Z_LIBC_SONAME, strcpy)
+#if defined(VGO_darwin)
STRCPY(VG_Z_DYLD, strcpy)
+#endif
#define STRNCPY(soname, fnname) \
@@ -313,7 +327,9 @@
}
STRNCPY(VG_Z_LIBC_SONAME, strncpy)
+#if defined(VGO_darwin)
STRNCPY(VG_Z_DYLD, strncpy)
+#endif
/* Copy up to n-1 bytes from src to dst. Then nul-terminate dst if n > 0.
@@ -342,7 +358,9 @@
}
STRLCPY(VG_Z_LIBC_SONAME, strlcpy)
+#if defined(VGO_darwin)
STRLCPY(VG_Z_DYLD, strlcpy)
+#endif
#define STRNCMP(soname, fnname) \
@@ -366,7 +384,9 @@
}
STRNCMP(VG_Z_LIBC_SONAME, strncmp)
+#if defined(VGO_darwin)
STRNCMP(VG_Z_DYLD, strncmp)
+#endif
#define STRCMP(soname, fnname) \
@@ -390,8 +410,10 @@
}
STRCMP(VG_Z_LIBC_SONAME, strcmp)
+#if defined(VGO_linux)
STRCMP(VG_Z_LD_LINUX_X86_64_SO_2, strcmp)
STRCMP(VG_Z_LD64_SO_1, strcmp)
+#endif
#define MEMCHR(soname, fnname) \
@@ -407,7 +429,9 @@
}
MEMCHR(VG_Z_LIBC_SONAME, memchr)
+#if defined(VGO_darwin)
MEMCHR(VG_Z_DYLD, memchr)
+#endif
#define MEMCPY(soname, fnname) \
@@ -456,9 +480,12 @@
}
MEMCPY(VG_Z_LIBC_SONAME, memcpy)
-MEMCPY(VG_Z_LD_SO_1, memcpy)
-MEMCPY(VG_Z_LD64_SO_1, memcpy)
+#if defined(VGO_linux)
+MEMCPY(VG_Z_LD_SO_1, memcpy) /* ld.so.1 */
+MEMCPY(VG_Z_LD64_SO_1, memcpy) /* ld64.so.1 */
+#elif defined(VGO_darwin)
MEMCPY(VG_Z_DYLD, memcpy)
+#endif
/* icc9 blats these around all over the place. Not only in the main
executable but various .so's. They are highly tuned and read
memory beyond the source boundary (although work correctly and
@@ -498,8 +525,11 @@
MEMCMP(VG_Z_LIBC_SONAME, memcmp)
MEMCMP(VG_Z_DYLD, memcmp)
MEMCMP(VG_Z_LIBC_SONAME, bcmp)
+#if defined(VGO_linux)
+MEMCMP(VG_Z_LD_SO_1, bcmp)
+#elif defined(VGO_darwin)
MEMCMP(VG_Z_DYLD, bcmp)
-MEMCMP(VG_Z_LD_SO_1, bcmp)
+#endif
/* Copy SRC to DEST, returning the address of the terminating '\0' in
@@ -526,11 +556,14 @@
}
STPCPY(VG_Z_LIBC_SONAME, stpcpy)
+#if defined(VGO_linux)
STPCPY(VG_Z_LD_LINUX_SO_2, stpcpy)
STPCPY(VG_Z_LD_LINUX_X86_64_SO_2, stpcpy)
+#elif defined(VGO_darwin)
STPCPY(VG_Z_DYLD, stpcpy)
-
+#endif
+
#define MEMSET(soname, fnname) \
void* VG_REPLACE_FUNCTION_ZU(soname,fnname)(void *s, Int c, SizeT n); \
void* VG_REPLACE_FUNCTION_ZU(soname,fnname)(void *s, Int c, SizeT n) \
@@ -761,7 +794,9 @@
}
GLIBC25_MEMPCPY(VG_Z_LIBC_SONAME, mempcpy)
+#if defined(VGO_linux)
GLIBC25_MEMPCPY(VG_Z_LD_SO_1, mempcpy) /* ld.so.1 */
+#endif
#define GLIBC26___MEMCPY_CHK(soname, fnname) \
|
|
From: <sv...@va...> - 2009-05-04 04:20:09
|
Author: njn
Date: 2009-05-04 05:20:02 +0100 (Mon, 04 May 2009)
New Revision: 9745
Log:
Don't compile Linux-only redirects on non-Linux platforms.
Modified:
trunk/coregrind/m_demangle/demangle.c
trunk/drd/drd_strmem_intercepts.c
trunk/exp-ptrcheck/h_intercepts.c
trunk/helgrind/hg_intercepts.c
trunk/include/pub_tool_redir.h
trunk/memcheck/mc_replace_strmem.c
Modified: trunk/coregrind/m_demangle/demangle.c
===================================================================
--- trunk/coregrind/m_demangle/demangle.c 2009-05-04 01:40:08 UTC (rev 9744)
+++ trunk/coregrind/m_demangle/demangle.c 2009-05-04 04:20:02 UTC (rev 9745)
@@ -167,7 +167,7 @@
} \
} while (0)
- Bool error, oflow, valid, fn_is_encoded;
+ Bool error, oflow, valid, fn_is_encoded, is_VG_Z_prefixed;
Int soi, fni, i;
vg_assert(soLen > 0 || (soLen == 0 && so == NULL));
@@ -192,6 +192,19 @@
if (isWrap)
*isWrap = sym[3] == 'w';
+ /* Now check the soname prefix isn't "VG_Z_", as described in
+ pub_tool_redir.h. */
+ is_VG_Z_prefixed =
+ sym[ 7] == 'V' &&
+ sym[ 8] == 'G' &&
+ sym[ 9] == '_' &&
+ sym[10] == 'Z' &&
+ sym[11] == '_';
+ if (is_VG_Z_prefixed) {
+ vg_assert2(0, "symbol with a 'VG_Z_' prefix: %s.\n"
+ "see pub_tool_redir.h for an explanation.", sym);
+ }
+
/* Now scan the Z-encoded soname. */
i = 7;
while (True) {
Modified: trunk/drd/drd_strmem_intercepts.c
===================================================================
--- trunk/drd/drd_strmem_intercepts.c 2009-05-04 01:40:08 UTC (rev 9744)
+++ trunk/drd/drd_strmem_intercepts.c 2009-05-04 04:20:02 UTC (rev 9745)
@@ -65,8 +65,10 @@
}
STRLEN(VG_Z_LIBC_SONAME, strlen)
+#if defined(VGO_linux)
STRLEN(VG_Z_LD_LINUX_SO_2, strlen)
STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen)
+#endif
/*--------------------------------------------------------------------*/
/*--- end ---*/
Modified: trunk/exp-ptrcheck/h_intercepts.c
===================================================================
--- trunk/exp-ptrcheck/h_intercepts.c 2009-05-04 01:40:08 UTC (rev 9744)
+++ trunk/exp-ptrcheck/h_intercepts.c 2009-05-04 04:20:02 UTC (rev 9745)
@@ -71,9 +71,11 @@
}
STRLEN(VG_Z_LIBC_SONAME, strlen)
+#if defined(VGO_linux)
STRLEN(VG_Z_LD_LINUX_SO_2, strlen)
STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen)
STRLEN(VG_Z_LD_SO_1, strlen)
+#endif
#define STRCMP(soname, fnname) \
@@ -97,8 +99,10 @@
}
STRCMP(VG_Z_LIBC_SONAME, strcmp)
+#if defined(VGO_linux)
STRCMP(VG_Z_LD_LINUX_X86_64_SO_2, strcmp)
STRCMP(VG_Z_LD64_SO_1, strcmp)
+#endif
#define MEMCPY(soname, fnname) \
@@ -144,8 +148,10 @@
}
MEMCPY(VG_Z_LIBC_SONAME, memcpy)
+#if defined(VGO_linux)
MEMCPY(VG_Z_LD_SO_1, memcpy) /* ld.so.1 */
MEMCPY(VG_Z_LD64_SO_1, memcpy) /* ld64.so.1 */
+#endif
/* Copy SRC to DEST, returning the address of the terminating '\0' in
@@ -161,8 +167,10 @@
}
STPCPY(VG_Z_LIBC_SONAME, stpcpy)
+#if defined(VGO_linux)
STPCPY(VG_Z_LD_LINUX_SO_2, stpcpy)
STPCPY(VG_Z_LD_LINUX_X86_64_SO_2, stpcpy)
+#endif
/*--------------------------------------------------------------------*/
Modified: trunk/helgrind/hg_intercepts.c
===================================================================
--- trunk/helgrind/hg_intercepts.c 2009-05-04 01:40:08 UTC (rev 9744)
+++ trunk/helgrind/hg_intercepts.c 2009-05-04 04:20:02 UTC (rev 9745)
@@ -1608,11 +1608,13 @@
// Apparently index() is the same thing as strchr()
STRCHR(VG_Z_LIBC_SONAME, strchr)
+STRCHR(VG_Z_LIBC_SONAME, index)
+#if defined(VGO_linux)
STRCHR(VG_Z_LD_LINUX_SO_2, strchr)
+STRCHR(VG_Z_LD_LINUX_SO_2, index)
STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, strchr)
-STRCHR(VG_Z_LIBC_SONAME, index)
-STRCHR(VG_Z_LD_LINUX_SO_2, index)
STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, index)
+#endif
// Note that this replacement often doesn't get used because gcc inlines
@@ -1629,8 +1631,10 @@
}
STRLEN(VG_Z_LIBC_SONAME, strlen)
+#if defined(VGO_linux)
STRLEN(VG_Z_LD_LINUX_SO_2, strlen)
STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen)
+#endif
#define STRCPY(soname, fnname) \
@@ -1669,8 +1673,10 @@
}
STRCMP(VG_Z_LIBC_SONAME, strcmp)
+#if defined(VGO_linux)
STRCMP(VG_Z_LD_LINUX_X86_64_SO_2, strcmp)
STRCMP(VG_Z_LD64_SO_1, strcmp)
+#endif
#define MEMCPY(soname, fnname) \
@@ -1716,8 +1722,10 @@
}
MEMCPY(VG_Z_LIBC_SONAME, memcpy)
+#if defined(VGO_linux)
MEMCPY(VG_Z_LD_SO_1, memcpy) /* ld.so.1 */
MEMCPY(VG_Z_LD64_SO_1, memcpy) /* ld64.so.1 */
+#endif
/* icc9 blats these around all over the place. Not only in the main
executable but various .so's. They are highly tuned and read
memory beyond the source boundary (although work correctly and
Modified: trunk/include/pub_tool_redir.h
===================================================================
--- trunk/include/pub_tool_redir.h 2009-05-04 01:40:08 UTC (rev 9744)
+++ trunk/include/pub_tool_redir.h 2009-05-04 04:20:02 UTC (rev 9745)
@@ -160,6 +160,15 @@
/* --------- Some handy Z-encoded names. --------- */
+// Nb: ALL THESE NAMES MUST BEGIN WITH "VG_Z_". Why? If we applied
+// conditional compilation inconsistently we could accidentally use an
+// undefined constant like VG_Z_LIBC_DOT_A, resulting in a bogus Z-encoded
+// name like "_vgrZU_VG_Z_LIBC_DOT_A_foo". This can't be detected at
+// compile-time, because both the constant's name and its value are
+// identifiers. However, by always using "VG_Z_" as a prefix, we can do a
+// run-time check and abort if any name has "VG_Z_" in it, because that
+// indicates that the constant has been used without being defined.
+
/* --- Soname of the standard C library. --- */
#if defined(VGO_linux)
@@ -175,8 +184,7 @@
/* --- Soname of the GNU C++ library. --- */
-// DDD: this one and those below should probably be conditionally compiled,
-// as should all the redirects in the tools that use them.
+// Valid on all platforms(?)
#define VG_Z_LIBSTDCXX_SONAME libstdcZpZpZa // libstdc++*
/* --- Soname of XLC's C++ library. --- */
@@ -192,12 +200,13 @@
/* --- Sonames for Linux ELF linkers. --- */
+#if defined(VGO_linux)
#define VG_Z_LD_LINUX_SO_2 ldZhlinuxZdsoZd2 // ld-linux.so.2
#define VG_Z_LD_LINUX_X86_64_SO_2 ldZhlinuxZhx86Zh64ZdsoZd2 // ld-linux-x86-64.so.2
#define VG_Z_LD64_SO_1 ld64ZdsoZd1 // ld64.so.1
#define VG_Z_LD_SO_1 ldZdsoZd1 // ld.so.1
+#endif
-
#endif // __PUB_TOOL_REDIR_H
/*--------------------------------------------------------------------*/
Modified: trunk/memcheck/mc_replace_strmem.c
===================================================================
--- trunk/memcheck/mc_replace_strmem.c 2009-05-04 01:40:08 UTC (rev 9744)
+++ trunk/memcheck/mc_replace_strmem.c 2009-05-04 04:20:02 UTC (rev 9745)
@@ -115,7 +115,9 @@
// Apparently rindex() is the same thing as strrchr()
STRRCHR(VG_Z_LIBC_SONAME, strrchr)
STRRCHR(VG_Z_LIBC_SONAME, rindex)
+#if defined(VGO_linux)
STRRCHR(VG_Z_LD_LINUX_SO_2, rindex)
+#endif
#define STRCHR(soname, fnname) \
@@ -133,11 +135,13 @@
// Apparently index() is the same thing as strchr()
STRCHR(VG_Z_LIBC_SONAME, strchr)
+STRCHR(VG_Z_LIBC_SONAME, index)
+#if defined(VGO_linux)
STRCHR(VG_Z_LD_LINUX_SO_2, strchr)
+STRCHR(VG_Z_LD_LINUX_SO_2, index)
STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, strchr)
-STRCHR(VG_Z_LIBC_SONAME, index)
-STRCHR(VG_Z_LD_LINUX_SO_2, index)
STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, index)
+#endif
#define STRCAT(soname, fnname) \
@@ -217,9 +221,11 @@
return i; \
}
-STRLEN(VG_Z_LIBC_SONAME, strlen)
+STRLEN(VG_Z_LIBC_SONAME, strlen)
+#if defined(VGO_linux)
STRLEN(VG_Z_LD_LINUX_SO_2, strlen)
STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen)
+#endif
#define STRCPY(soname, fnname) \
@@ -313,8 +319,10 @@
}
STRCMP(VG_Z_LIBC_SONAME, strcmp)
+#if defined(VGO_linux)
STRCMP(VG_Z_LD_LINUX_X86_64_SO_2, strcmp)
STRCMP(VG_Z_LD64_SO_1, strcmp)
+#endif
#define MEMCHR(soname, fnname) \
@@ -378,8 +386,10 @@
}
MEMCPY(VG_Z_LIBC_SONAME, memcpy)
+#if defined(VGO_linux)
MEMCPY(VG_Z_LD_SO_1, memcpy) /* ld.so.1 */
MEMCPY(VG_Z_LD64_SO_1, memcpy) /* ld64.so.1 */
+#endif
/* icc9 blats these around all over the place. Not only in the main
executable but various .so's. They are highly tuned and read
memory beyond the source boundary (although work correctly and
@@ -418,7 +428,9 @@
MEMCMP(VG_Z_LIBC_SONAME, memcmp)
MEMCMP(VG_Z_LIBC_SONAME, bcmp)
+#if defined(VGO_linux)
MEMCMP(VG_Z_LD_SO_1, bcmp)
+#endif
/* Copy SRC to DEST, returning the address of the terminating '\0' in
@@ -445,10 +457,12 @@
}
STPCPY(VG_Z_LIBC_SONAME, stpcpy)
+#if defined(VGO_linux)
STPCPY(VG_Z_LD_LINUX_SO_2, stpcpy)
STPCPY(VG_Z_LD_LINUX_X86_64_SO_2, stpcpy)
-
+#endif
+
#define MEMSET(soname, fnname) \
void* VG_REPLACE_FUNCTION_ZU(soname,fnname)(void *s, Int c, SizeT n); \
void* VG_REPLACE_FUNCTION_ZU(soname,fnname)(void *s, Int c, SizeT n) \
@@ -653,7 +667,9 @@
}
GLIBC25_MEMPCPY(VG_Z_LIBC_SONAME, mempcpy)
+#if defined(VGO_linux)
GLIBC25_MEMPCPY(VG_Z_LD_SO_1, mempcpy) /* ld.so.1 */
+#endif
#define GLIBC26___MEMCPY_CHK(soname, fnname) \
|
|
From: Tom H. <th...@cy...> - 2009-05-04 02:29:51
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-05-04 03:05:11 BST 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 == 480 tests, 0 stderr failures, 0 stdout failures, 0 post failures == ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... failed Last 20 lines of verbose log follow echo A valgrind/coregrind/m_wordfm.c A valgrind/coregrind/pub_core_vki.h A valgrind/coregrind/pub_core_hashtable.h A valgrind/coregrind/pub_core_options.h A valgrind/coregrind/pub_core_libcassert.h A valgrind/coregrind/pub_core_errormgr.h A valgrind/coregrind/m_xarray.c A valgrind/coregrind/m_libcsignal.c A valgrind/coregrind/m_threadstate.c A valgrind/coregrind/pub_core_aspacemgr.h A valgrind/coregrind/m_libcfile.c A valgrind/coregrind/pub_core_cpuid.h A valgrind/coregrind/Makefile.am A valgrind/coregrind/pub_core_threadstate.h A valgrind/coregrind/pub_core_mallocfree.h A valgrind/coregrind/pub_core_oset.h U valgrind Fetching external item into 'valgrind/VEX' svn: Can't connect to host 'svn.valgrind.org': No route to host ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Mon May 4 03:10:08 2009 --- new.short Mon May 4 03:29:39 2009 *************** *** 1,24 **** ! Checking out valgrind source tree ... failed ! Last 20 lines of verbose log follow echo ! A valgrind/coregrind/m_wordfm.c ! A valgrind/coregrind/pub_core_vki.h ! A valgrind/coregrind/pub_core_hashtable.h ! A valgrind/coregrind/pub_core_options.h ! A valgrind/coregrind/pub_core_libcassert.h ! A valgrind/coregrind/pub_core_errormgr.h ! A valgrind/coregrind/m_xarray.c ! A valgrind/coregrind/m_libcsignal.c ! A valgrind/coregrind/m_threadstate.c ! A valgrind/coregrind/pub_core_aspacemgr.h ! A valgrind/coregrind/m_libcfile.c ! A valgrind/coregrind/pub_core_cpuid.h ! A valgrind/coregrind/Makefile.am ! A valgrind/coregrind/pub_core_threadstate.h ! A valgrind/coregrind/pub_core_mallocfree.h ! A valgrind/coregrind/pub_core_oset.h ! U valgrind - Fetching external item into 'valgrind/VEX' - svn: Can't connect to host 'svn.valgrind.org': No route to host --- 1,10 ---- ! Checking out valgrind source tree ... done ! Configuring valgrind ... done ! Building valgrind ... done ! Running regression tests ... done ! Regression test results follow ! ! == 480 tests, 0 stderr failures, 0 stdout failures, 0 post failures == |
|
From: <sv...@va...> - 2009-05-04 02:09:34
|
Author: njn Date: 2009-05-04 02:40:08 +0100 (Mon, 04 May 2009) New Revision: 9744 Log: Merged r9743 (removed old sigkill .exp files) from the trunk, and added a new one. It now passes on Darwin. Added: branches/DARWIN/memcheck/tests/sigkill.stderr.exp-darwin Removed: branches/DARWIN/memcheck/tests/sigkill.stderr.exp2 branches/DARWIN/memcheck/tests/sigkill.stderr.exp3 Modified: branches/DARWIN/memcheck/tests/Makefile.am Modified: branches/DARWIN/memcheck/tests/Makefile.am =================================================================== --- branches/DARWIN/memcheck/tests/Makefile.am 2009-05-04 01:30:39 UTC (rev 9743) +++ branches/DARWIN/memcheck/tests/Makefile.am 2009-05-04 01:40:08 UTC (rev 9744) @@ -139,7 +139,7 @@ sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \ sh-mem-random.stdout.exp sh-mem-random.vgtest \ sigaltstack.stderr.exp sigaltstack.vgtest \ - sigkill.stderr.exp sigkill.stderr.exp2 sigkill.stderr.exp3 sigkill.vgtest \ + sigkill.stderr.exp sigkill.vgtest \ signal2.stderr.exp signal2.stdout.exp signal2.vgtest \ sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ stack_changes.stderr.exp stack_changes.stdout.exp \ Added: branches/DARWIN/memcheck/tests/sigkill.stderr.exp-darwin =================================================================== --- branches/DARWIN/memcheck/tests/sigkill.stderr.exp-darwin (rev 0) +++ branches/DARWIN/memcheck/tests/sigkill.stderr.exp-darwin 2009-05-04 01:40:08 UTC (rev 9744) @@ -0,0 +1,192 @@ + +setting signal 1: Success +getting signal 1: Success + +setting signal 2: Success +getting signal 2: Success + +setting signal 3: Success +getting signal 3: Success + +setting signal 4: Success +getting signal 4: Success + +setting signal 5: Success +getting signal 5: Success + +setting signal 6: Success +getting signal 6: Success + +setting signal 7: Success +getting signal 7: Success + +setting signal 8: Success +getting signal 8: Success + +setting signal 9: Invalid argument +getting signal 9: Invalid argument + +setting signal 10: Success +getting signal 10: Success + +setting signal 11: Success +getting signal 11: Success + +setting signal 12: Success +getting signal 12: Success + +setting signal 13: Success +getting signal 13: Success + +setting signal 14: Success +getting signal 14: Success + +setting signal 15: Success +getting signal 15: Success + +setting signal 16: Success +getting signal 16: Success + +setting signal 17: Invalid argument +getting signal 17: Invalid argument + +setting signal 18: Success +getting signal 18: Success + +setting signal 19: Success +getting signal 19: Success + +setting signal 20: Success +getting signal 20: Success + +setting signal 21: Success +getting signal 21: Success + +setting signal 22: Success +getting signal 22: Success + +setting signal 23: Success +getting signal 23: Success + +setting signal 24: Success +getting signal 24: Success + +setting signal 25: Success +getting signal 25: Success + +setting signal 26: Success +getting signal 26: Success + +setting signal 27: Success +getting signal 27: Success + +setting signal 28: Success +getting signal 28: Success + +setting signal 29: Success +getting signal 29: Success + +setting signal 30: Success +getting signal 30: Success + +setting signal 31: Warning: ignored attempt to set SIGUSR2 handler in sigaction(); + the SIGUSR2 signal is used internally by Valgrind +Invalid argument +getting signal 31: Success + +setting signal 34: Invalid argument +getting signal 34: Invalid argument + +setting signal 35: Invalid argument +getting signal 35: Invalid argument + +setting signal 36: Invalid argument +getting signal 36: Invalid argument + +setting signal 37: Invalid argument +getting signal 37: Invalid argument + +setting signal 38: Invalid argument +getting signal 38: Invalid argument + +setting signal 39: Invalid argument +getting signal 39: Invalid argument + +setting signal 40: Invalid argument +getting signal 40: Invalid argument + +setting signal 41: Invalid argument +getting signal 41: Invalid argument + +setting signal 42: Invalid argument +getting signal 42: Invalid argument + +setting signal 43: Invalid argument +getting signal 43: Invalid argument + +setting signal 44: Invalid argument +getting signal 44: Invalid argument + +setting signal 45: Invalid argument +getting signal 45: Invalid argument + +setting signal 46: Invalid argument +getting signal 46: Invalid argument + +setting signal 47: Invalid argument +getting signal 47: Invalid argument + +setting signal 48: Invalid argument +getting signal 48: Invalid argument + +setting signal 49: Invalid argument +getting signal 49: Invalid argument + +setting signal 50: Invalid argument +getting signal 50: Invalid argument + +setting signal 51: Invalid argument +getting signal 51: Invalid argument + +setting signal 52: Invalid argument +getting signal 52: Invalid argument + +setting signal 53: Invalid argument +getting signal 53: Invalid argument + +setting signal 54: Invalid argument +getting signal 54: Invalid argument + +setting signal 55: Invalid argument +getting signal 55: Invalid argument + +setting signal 56: Invalid argument +getting signal 56: Invalid argument + +setting signal 57: Invalid argument +getting signal 57: Invalid argument + +setting signal 58: Invalid argument +getting signal 58: Invalid argument + +setting signal 59: Invalid argument +getting signal 59: Invalid argument + +setting signal 60: Invalid argument +getting signal 60: Invalid argument + +setting signal 61: Invalid argument +getting signal 61: Invalid argument + +setting signal 62: Invalid argument +getting signal 62: Invalid argument + +setting signal 65: Invalid argument +getting signal 65: Invalid argument + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) +malloc/free: in use at exit: ... bytes in ... blocks. +malloc/free: ... allocs, ... frees, ... bytes allocated. +For a detailed leak analysis, rerun with: --leak-check=yes +For counts of detected errors, rerun with: -v Deleted: branches/DARWIN/memcheck/tests/sigkill.stderr.exp2 =================================================================== --- branches/DARWIN/memcheck/tests/sigkill.stderr.exp2 2009-05-04 01:30:39 UTC (rev 9743) +++ branches/DARWIN/memcheck/tests/sigkill.stderr.exp2 2009-05-04 01:40:08 UTC (rev 9744) @@ -1,202 +0,0 @@ - -setting signal 1: Success -getting signal 1: Success - -setting signal 2: Success -getting signal 2: Success - -setting signal 3: Success -getting signal 3: Success - -setting signal 4: Success -getting signal 4: Success - -setting signal 5: Success -getting signal 5: Success - -setting signal 6: Success -getting signal 6: Success - -setting signal 7: Success -getting signal 7: Success - -setting signal 8: Success -getting signal 8: Success - -setting signal 9: Warning: ignored attempt to set SIGKILL handler in sigaction(); - the SIGKILL signal is uncatchable -Invalid argument -getting signal 9: Success - -setting signal 10: Success -getting signal 10: Success - -setting signal 11: Success -getting signal 11: Success - -setting signal 12: Success -getting signal 12: Success - -setting signal 13: Success -getting signal 13: Success - -setting signal 14: Success -getting signal 14: Success - -setting signal 15: Success -getting signal 15: Success - -setting signal 16: Success -getting signal 16: Success - -setting signal 17: Success -getting signal 17: Success - -setting signal 18: Success -getting signal 18: Success - -setting signal 19: Warning: ignored attempt to set SIGSTOP handler in sigaction(); - the SIGSTOP signal is uncatchable -Invalid argument -getting signal 19: Success - -setting signal 20: Success -getting signal 20: Success - -setting signal 21: Success -getting signal 21: Success - -setting signal 22: Success -getting signal 22: Success - -setting signal 23: Success -getting signal 23: Success - -setting signal 24: Success -getting signal 24: Success - -setting signal 25: Success -getting signal 25: Success - -setting signal 26: Success -getting signal 26: Success - -setting signal 27: Success -getting signal 27: Success - -setting signal 28: Success -getting signal 28: Success - -setting signal 29: Success -getting signal 29: Success - -setting signal 30: Success -getting signal 30: Success - -setting signal 31: Success -getting signal 31: Success - -setting signal 32: Invalid argument -getting signal 32: Invalid argument - -setting signal 33: Invalid argument -getting signal 33: Invalid argument - -setting signal 34: Success -getting signal 34: Success - -setting signal 35: Success -getting signal 35: Success - -setting signal 36: Success -getting signal 36: Success - -setting signal 37: Success -getting signal 37: Success - -setting signal 38: Success -getting signal 38: Success - -setting signal 39: Success -getting signal 39: Success - -setting signal 40: Success -getting signal 40: Success - -setting signal 41: Success -getting signal 41: Success - -setting signal 42: Success -getting signal 42: Success - -setting signal 43: Success -getting signal 43: Success - -setting signal 44: Success -getting signal 44: Success - -setting signal 45: Success -getting signal 45: Success - -setting signal 46: Success -getting signal 46: Success - -setting signal 47: Success -getting signal 47: Success - -setting signal 48: Success -getting signal 48: Success - -setting signal 49: Success -getting signal 49: Success - -setting signal 50: Success -getting signal 50: Success - -setting signal 51: Success -getting signal 51: Success - -setting signal 52: Success -getting signal 52: Success - -setting signal 53: Success -getting signal 53: Success - -setting signal 54: Success -getting signal 54: Success - -setting signal 55: Success -getting signal 55: Success - -setting signal 56: Success -getting signal 56: Success - -setting signal 57: Success -getting signal 57: Success - -setting signal 58: Success -getting signal 58: Success - -setting signal 59: Success -getting signal 59: Success - -setting signal 60: Success -getting signal 60: Success - -setting signal 61: Success -getting signal 61: Success - -setting signal 62: Success -getting signal 62: Success - -setting signal 65: Warning: bad signal number 65 in sigaction() -Invalid argument -getting signal 65: Warning: bad signal number 65 in sigaction() -Invalid argument - - -ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) -malloc/free: in use at exit: ... bytes in ... blocks. -malloc/free: ... allocs, ... frees, ... bytes allocated. -For a detailed leak analysis, rerun with: --leak-check=yes -For counts of detected errors, rerun with: -v Deleted: branches/DARWIN/memcheck/tests/sigkill.stderr.exp3 =================================================================== --- branches/DARWIN/memcheck/tests/sigkill.stderr.exp3 2009-05-04 01:30:39 UTC (rev 9743) +++ branches/DARWIN/memcheck/tests/sigkill.stderr.exp3 2009-05-04 01:40:08 UTC (rev 9744) @@ -1,202 +0,0 @@ - -setting signal 1: Success -getting signal 1: Success - -setting signal 2: Success -getting signal 2: Success - -setting signal 3: Success -getting signal 3: Success - -setting signal 4: Success -getting signal 4: Success - -setting signal 5: Success -getting signal 5: Success - -setting signal 6: Success -getting signal 6: Success - -setting signal 7: Success -getting signal 7: Success - -setting signal 8: Success -getting signal 8: Success - -setting signal 9: Warning: ignored attempt to set SIGKILL handler in sigaction(); - the SIGKILL signal is uncatchable -Invalid argument -getting signal 9: Success - -setting signal 10: Success -getting signal 10: Success - -setting signal 11: Success -getting signal 11: Success - -setting signal 12: Success -getting signal 12: Success - -setting signal 13: Success -getting signal 13: Success - -setting signal 14: Success -getting signal 14: Success - -setting signal 15: Success -getting signal 15: Success - -setting signal 16: Success -getting signal 16: Success - -setting signal 17: Success -getting signal 17: Success - -setting signal 18: Success -getting signal 18: Success - -setting signal 19: Warning: ignored attempt to set SIGSTOP handler in sigaction(); - the SIGSTOP signal is uncatchable -Invalid argument -getting signal 19: Success - -setting signal 20: Success -getting signal 20: Success - -setting signal 21: Success -getting signal 21: Success - -setting signal 22: Success -getting signal 22: Success - -setting signal 23: Success -getting signal 23: Success - -setting signal 24: Success -getting signal 24: Success - -setting signal 25: Success -getting signal 25: Success - -setting signal 26: Success -getting signal 26: Success - -setting signal 27: Success -getting signal 27: Success - -setting signal 28: Success -getting signal 28: Success - -setting signal 29: Success -getting signal 29: Success - -setting signal 30: Success -getting signal 30: Success - -setting signal 31: Success -getting signal 31: Success - -setting signal 32: Invalid argument -getting signal 32: Invalid argument - -setting signal 33: Success -getting signal 33: Success - -setting signal 34: Success -getting signal 34: Success - -setting signal 35: Success -getting signal 35: Success - -setting signal 36: Success -getting signal 36: Success - -setting signal 37: Success -getting signal 37: Success - -setting signal 38: Success -getting signal 38: Success - -setting signal 39: Success -getting signal 39: Success - -setting signal 40: Success -getting signal 40: Success - -setting signal 41: Success -getting signal 41: Success - -setting signal 42: Success -getting signal 42: Success - -setting signal 43: Success -getting signal 43: Success - -setting signal 44: Success -getting signal 44: Success - -setting signal 45: Success -getting signal 45: Success - -setting signal 46: Success -getting signal 46: Success - -setting signal 47: Success -getting signal 47: Success - -setting signal 48: Success -getting signal 48: Success - -setting signal 49: Success -getting signal 49: Success - -setting signal 50: Success -getting signal 50: Success - -setting signal 51: Success -getting signal 51: Success - -setting signal 52: Success -getting signal 52: Success - -setting signal 53: Success -getting signal 53: Success - -setting signal 54: Success -getting signal 54: Success - -setting signal 55: Success -getting signal 55: Success - -setting signal 56: Success -getting signal 56: Success - -setting signal 57: Success -getting signal 57: Success - -setting signal 58: Success -getting signal 58: Success - -setting signal 59: Success -getting signal 59: Success - -setting signal 60: Success -getting signal 60: Success - -setting signal 61: Success -getting signal 61: Success - -setting signal 62: Success -getting signal 62: Success - -setting signal 65: Warning: bad signal number 65 in sigaction() -Invalid argument -getting signal 65: Warning: bad signal number 65 in sigaction() -Invalid argument - - -ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) -malloc/free: in use at exit: ... bytes in ... blocks. -malloc/free: ... allocs, ... frees, ... bytes allocated. -For a detailed leak analysis, rerun with: --leak-check=yes -For counts of detected errors, rerun with: -v |
|
From: <sv...@va...> - 2009-05-04 01:59:34
|
Author: njn Date: 2009-05-04 02:30:39 +0100 (Mon, 04 May 2009) New Revision: 9743 Log: Remove unused .exp files for sigkill. Removed: trunk/memcheck/tests/sigkill.stderr.exp2 trunk/memcheck/tests/sigkill.stderr.exp3 Modified: trunk/memcheck/tests/Makefile.am Modified: trunk/memcheck/tests/Makefile.am =================================================================== --- trunk/memcheck/tests/Makefile.am 2009-05-04 01:17:56 UTC (rev 9742) +++ trunk/memcheck/tests/Makefile.am 2009-05-04 01:30:39 UTC (rev 9743) @@ -136,7 +136,7 @@ sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \ sh-mem-random.stdout.exp sh-mem-random.vgtest \ sigaltstack.stderr.exp sigaltstack.vgtest \ - sigkill.stderr.exp sigkill.stderr.exp2 sigkill.stderr.exp3 sigkill.vgtest \ + sigkill.stderr.exp sigkill.vgtest \ signal2.stderr.exp signal2.stdout.exp signal2.vgtest \ sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ stack_changes.stderr.exp stack_changes.stdout.exp \ Deleted: trunk/memcheck/tests/sigkill.stderr.exp2 =================================================================== --- trunk/memcheck/tests/sigkill.stderr.exp2 2009-05-04 01:17:56 UTC (rev 9742) +++ trunk/memcheck/tests/sigkill.stderr.exp2 2009-05-04 01:30:39 UTC (rev 9743) @@ -1,202 +0,0 @@ - -setting signal 1: Success -getting signal 1: Success - -setting signal 2: Success -getting signal 2: Success - -setting signal 3: Success -getting signal 3: Success - -setting signal 4: Success -getting signal 4: Success - -setting signal 5: Success -getting signal 5: Success - -setting signal 6: Success -getting signal 6: Success - -setting signal 7: Success -getting signal 7: Success - -setting signal 8: Success -getting signal 8: Success - -setting signal 9: Warning: ignored attempt to set SIGKILL handler in sigaction(); - the SIGKILL signal is uncatchable -Invalid argument -getting signal 9: Success - -setting signal 10: Success -getting signal 10: Success - -setting signal 11: Success -getting signal 11: Success - -setting signal 12: Success -getting signal 12: Success - -setting signal 13: Success -getting signal 13: Success - -setting signal 14: Success -getting signal 14: Success - -setting signal 15: Success -getting signal 15: Success - -setting signal 16: Success -getting signal 16: Success - -setting signal 17: Success -getting signal 17: Success - -setting signal 18: Success -getting signal 18: Success - -setting signal 19: Warning: ignored attempt to set SIGSTOP handler in sigaction(); - the SIGSTOP signal is uncatchable -Invalid argument -getting signal 19: Success - -setting signal 20: Success -getting signal 20: Success - -setting signal 21: Success -getting signal 21: Success - -setting signal 22: Success -getting signal 22: Success - -setting signal 23: Success -getting signal 23: Success - -setting signal 24: Success -getting signal 24: Success - -setting signal 25: Success -getting signal 25: Success - -setting signal 26: Success -getting signal 26: Success - -setting signal 27: Success -getting signal 27: Success - -setting signal 28: Success -getting signal 28: Success - -setting signal 29: Success -getting signal 29: Success - -setting signal 30: Success -getting signal 30: Success - -setting signal 31: Success -getting signal 31: Success - -setting signal 32: Invalid argument -getting signal 32: Invalid argument - -setting signal 33: Invalid argument -getting signal 33: Invalid argument - -setting signal 34: Success -getting signal 34: Success - -setting signal 35: Success -getting signal 35: Success - -setting signal 36: Success -getting signal 36: Success - -setting signal 37: Success -getting signal 37: Success - -setting signal 38: Success -getting signal 38: Success - -setting signal 39: Success -getting signal 39: Success - -setting signal 40: Success -getting signal 40: Success - -setting signal 41: Success -getting signal 41: Success - -setting signal 42: Success -getting signal 42: Success - -setting signal 43: Success -getting signal 43: Success - -setting signal 44: Success -getting signal 44: Success - -setting signal 45: Success -getting signal 45: Success - -setting signal 46: Success -getting signal 46: Success - -setting signal 47: Success -getting signal 47: Success - -setting signal 48: Success -getting signal 48: Success - -setting signal 49: Success -getting signal 49: Success - -setting signal 50: Success -getting signal 50: Success - -setting signal 51: Success -getting signal 51: Success - -setting signal 52: Success -getting signal 52: Success - -setting signal 53: Success -getting signal 53: Success - -setting signal 54: Success -getting signal 54: Success - -setting signal 55: Success -getting signal 55: Success - -setting signal 56: Success -getting signal 56: Success - -setting signal 57: Success -getting signal 57: Success - -setting signal 58: Success -getting signal 58: Success - -setting signal 59: Success -getting signal 59: Success - -setting signal 60: Success -getting signal 60: Success - -setting signal 61: Success -getting signal 61: Success - -setting signal 62: Success -getting signal 62: Success - -setting signal 65: Warning: bad signal number 65 in sigaction() -Invalid argument -getting signal 65: Warning: bad signal number 65 in sigaction() -Invalid argument - - -ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) -malloc/free: in use at exit: ... bytes in ... blocks. -malloc/free: ... allocs, ... frees, ... bytes allocated. -For a detailed leak analysis, rerun with: --leak-check=yes -For counts of detected errors, rerun with: -v Deleted: trunk/memcheck/tests/sigkill.stderr.exp3 =================================================================== --- trunk/memcheck/tests/sigkill.stderr.exp3 2009-05-04 01:17:56 UTC (rev 9742) +++ trunk/memcheck/tests/sigkill.stderr.exp3 2009-05-04 01:30:39 UTC (rev 9743) @@ -1,202 +0,0 @@ - -setting signal 1: Success -getting signal 1: Success - -setting signal 2: Success -getting signal 2: Success - -setting signal 3: Success -getting signal 3: Success - -setting signal 4: Success -getting signal 4: Success - -setting signal 5: Success -getting signal 5: Success - -setting signal 6: Success -getting signal 6: Success - -setting signal 7: Success -getting signal 7: Success - -setting signal 8: Success -getting signal 8: Success - -setting signal 9: Warning: ignored attempt to set SIGKILL handler in sigaction(); - the SIGKILL signal is uncatchable -Invalid argument -getting signal 9: Success - -setting signal 10: Success -getting signal 10: Success - -setting signal 11: Success -getting signal 11: Success - -setting signal 12: Success -getting signal 12: Success - -setting signal 13: Success -getting signal 13: Success - -setting signal 14: Success -getting signal 14: Success - -setting signal 15: Success -getting signal 15: Success - -setting signal 16: Success -getting signal 16: Success - -setting signal 17: Success -getting signal 17: Success - -setting signal 18: Success -getting signal 18: Success - -setting signal 19: Warning: ignored attempt to set SIGSTOP handler in sigaction(); - the SIGSTOP signal is uncatchable -Invalid argument -getting signal 19: Success - -setting signal 20: Success -getting signal 20: Success - -setting signal 21: Success -getting signal 21: Success - -setting signal 22: Success -getting signal 22: Success - -setting signal 23: Success -getting signal 23: Success - -setting signal 24: Success -getting signal 24: Success - -setting signal 25: Success -getting signal 25: Success - -setting signal 26: Success -getting signal 26: Success - -setting signal 27: Success -getting signal 27: Success - -setting signal 28: Success -getting signal 28: Success - -setting signal 29: Success -getting signal 29: Success - -setting signal 30: Success -getting signal 30: Success - -setting signal 31: Success -getting signal 31: Success - -setting signal 32: Invalid argument -getting signal 32: Invalid argument - -setting signal 33: Success -getting signal 33: Success - -setting signal 34: Success -getting signal 34: Success - -setting signal 35: Success -getting signal 35: Success - -setting signal 36: Success -getting signal 36: Success - -setting signal 37: Success -getting signal 37: Success - -setting signal 38: Success -getting signal 38: Success - -setting signal 39: Success -getting signal 39: Success - -setting signal 40: Success -getting signal 40: Success - -setting signal 41: Success -getting signal 41: Success - -setting signal 42: Success -getting signal 42: Success - -setting signal 43: Success -getting signal 43: Success - -setting signal 44: Success -getting signal 44: Success - -setting signal 45: Success -getting signal 45: Success - -setting signal 46: Success -getting signal 46: Success - -setting signal 47: Success -getting signal 47: Success - -setting signal 48: Success -getting signal 48: Success - -setting signal 49: Success -getting signal 49: Success - -setting signal 50: Success -getting signal 50: Success - -setting signal 51: Success -getting signal 51: Success - -setting signal 52: Success -getting signal 52: Success - -setting signal 53: Success -getting signal 53: Success - -setting signal 54: Success -getting signal 54: Success - -setting signal 55: Success -getting signal 55: Success - -setting signal 56: Success -getting signal 56: Success - -setting signal 57: Success -getting signal 57: Success - -setting signal 58: Success -getting signal 58: Success - -setting signal 59: Success -getting signal 59: Success - -setting signal 60: Success -getting signal 60: Success - -setting signal 61: Success -getting signal 61: Success - -setting signal 62: Success -getting signal 62: Success - -setting signal 65: Warning: bad signal number 65 in sigaction() -Invalid argument -getting signal 65: Warning: bad signal number 65 in sigaction() -Invalid argument - - -ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) -malloc/free: in use at exit: ... bytes in ... blocks. -malloc/free: ... allocs, ... frees, ... bytes allocated. -For a detailed leak analysis, rerun with: --leak-check=yes -For counts of detected errors, rerun with: -v |
|
From: <sv...@va...> - 2009-05-04 01:18:02
|
Author: njn
Date: 2009-05-04 02:17:56 +0100 (Mon, 04 May 2009)
New Revision: 9742
Log:
Merged r9741 (make post-syscall more portable) from the DARWIN branch.
Removed:
trunk/memcheck/tests/post-syscall.stderr.exp2
trunk/memcheck/tests/post-syscall.stdout.exp
Modified:
trunk/memcheck/tests/Makefile.am
trunk/memcheck/tests/post-syscall.c
trunk/memcheck/tests/post-syscall.stderr.exp
trunk/memcheck/tests/post-syscall.vgtest
Modified: trunk/memcheck/tests/Makefile.am
===================================================================
--- trunk/memcheck/tests/Makefile.am 2009-05-04 01:15:44 UTC (rev 9741)
+++ trunk/memcheck/tests/Makefile.am 2009-05-04 01:17:56 UTC (rev 9742)
@@ -128,7 +128,7 @@
pipe.stderr.exp pipe.vgtest \
pointer-trace.vgtest \
pointer-trace.stderr.exp \
- post-syscall.stderr.exp post-syscall.stdout.exp post-syscall.vgtest \
+ post-syscall.stderr.exp post-syscall.vgtest \
realloc1.stderr.exp realloc1.vgtest \
realloc2.stderr.exp realloc2.vgtest \
realloc3.stderr.exp realloc3.vgtest \
Modified: trunk/memcheck/tests/post-syscall.c
===================================================================
--- trunk/memcheck/tests/post-syscall.c 2009-05-04 01:15:44 UTC (rev 9741)
+++ trunk/memcheck/tests/post-syscall.c 2009-05-04 01:17:56 UTC (rev 9742)
@@ -29,10 +29,10 @@
ret = nanosleep(&req, &rem);
if (ret != -1 || errno != EINTR) {
- printf("FAILED: expected nanosleep to be interrupted\n");
+ fprintf(stderr, "FAILED: expected nanosleep to be interrupted\n");
} else {
VALGRIND_CHECK_VALUE_IS_DEFINED(rem);
- printf("PASSED\n"); /* assuming CHECK_VALUE_IS_DEFINED doesn't print anything */
+ fprintf(stderr, "PASSED\n"); /* assuming CHECK_VALUE_IS_DEFINED doesn't print anything */
}
return 0;
Modified: trunk/memcheck/tests/post-syscall.stderr.exp
===================================================================
--- trunk/memcheck/tests/post-syscall.stderr.exp 2009-05-04 01:15:44 UTC (rev 9741)
+++ trunk/memcheck/tests/post-syscall.stderr.exp 2009-05-04 01:17:56 UTC (rev 9742)
@@ -1,7 +1 @@
-
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 0 bytes in 0 blocks.
-malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
-For a detailed leak analysis, rerun with: --leak-check=yes
-For counts of detected errors, rerun with: -v
+PASSED
Deleted: trunk/memcheck/tests/post-syscall.stderr.exp2
===================================================================
--- trunk/memcheck/tests/post-syscall.stderr.exp2 2009-05-04 01:15:44 UTC (rev 9741)
+++ trunk/memcheck/tests/post-syscall.stderr.exp2 2009-05-04 01:17:56 UTC (rev 9742)
@@ -1,7 +0,0 @@
-
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 0 bytes in 0 blocks.
-malloc/free: 1 allocs, 1 frees, 24 bytes allocated.
-For a detailed leak analysis, rerun with: --leak-check=yes
-For counts of detected errors, rerun with: -v
Deleted: trunk/memcheck/tests/post-syscall.stdout.exp
===================================================================
--- trunk/memcheck/tests/post-syscall.stdout.exp 2009-05-04 01:15:44 UTC (rev 9741)
+++ trunk/memcheck/tests/post-syscall.stdout.exp 2009-05-04 01:17:56 UTC (rev 9742)
@@ -1 +0,0 @@
-PASSED
Modified: trunk/memcheck/tests/post-syscall.vgtest
===================================================================
--- trunk/memcheck/tests/post-syscall.vgtest 2009-05-04 01:15:44 UTC (rev 9741)
+++ trunk/memcheck/tests/post-syscall.vgtest 2009-05-04 01:17:56 UTC (rev 9742)
@@ -1 +1,2 @@
prog: post-syscall
+vgopts: -q
|
|
From: <sv...@va...> - 2009-05-04 01:15:50
|
Author: njn
Date: 2009-05-04 02:15:44 +0100 (Mon, 04 May 2009)
New Revision: 9741
Log:
Made post-syscall more portable. It now passes on Darwin.
Removed:
branches/DARWIN/memcheck/tests/post-syscall.stderr.exp2
branches/DARWIN/memcheck/tests/post-syscall.stdout.exp
Modified:
branches/DARWIN/memcheck/tests/Makefile.am
branches/DARWIN/memcheck/tests/post-syscall.c
branches/DARWIN/memcheck/tests/post-syscall.stderr.exp
branches/DARWIN/memcheck/tests/post-syscall.vgtest
Modified: branches/DARWIN/memcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/Makefile.am 2009-05-04 00:52:32 UTC (rev 9740)
+++ branches/DARWIN/memcheck/tests/Makefile.am 2009-05-04 01:15:44 UTC (rev 9741)
@@ -131,7 +131,7 @@
pipe.stderr.exp pipe.vgtest \
pointer-trace.vgtest \
pointer-trace.stderr.exp \
- post-syscall.stderr.exp post-syscall.stdout.exp post-syscall.vgtest \
+ post-syscall.stderr.exp post-syscall.vgtest \
realloc1.stderr.exp realloc1.vgtest \
realloc2.stderr.exp realloc2.vgtest \
realloc3.stderr.exp realloc3.vgtest \
Modified: branches/DARWIN/memcheck/tests/post-syscall.c
===================================================================
--- branches/DARWIN/memcheck/tests/post-syscall.c 2009-05-04 00:52:32 UTC (rev 9740)
+++ branches/DARWIN/memcheck/tests/post-syscall.c 2009-05-04 01:15:44 UTC (rev 9741)
@@ -29,10 +29,10 @@
ret = nanosleep(&req, &rem);
if (ret != -1 || errno != EINTR) {
- printf("FAILED: expected nanosleep to be interrupted\n");
+ fprintf(stderr, "FAILED: expected nanosleep to be interrupted\n");
} else {
VALGRIND_CHECK_VALUE_IS_DEFINED(rem);
- printf("PASSED\n"); /* assuming CHECK_VALUE_IS_DEFINED doesn't print anything */
+ fprintf(stderr, "PASSED\n"); /* assuming CHECK_VALUE_IS_DEFINED doesn't print anything */
}
return 0;
Modified: branches/DARWIN/memcheck/tests/post-syscall.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/post-syscall.stderr.exp 2009-05-04 00:52:32 UTC (rev 9740)
+++ branches/DARWIN/memcheck/tests/post-syscall.stderr.exp 2009-05-04 01:15:44 UTC (rev 9741)
@@ -1,7 +1 @@
-
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 0 bytes in 0 blocks.
-malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
-For a detailed leak analysis, rerun with: --leak-check=yes
-For counts of detected errors, rerun with: -v
+PASSED
Deleted: branches/DARWIN/memcheck/tests/post-syscall.stderr.exp2
===================================================================
--- branches/DARWIN/memcheck/tests/post-syscall.stderr.exp2 2009-05-04 00:52:32 UTC (rev 9740)
+++ branches/DARWIN/memcheck/tests/post-syscall.stderr.exp2 2009-05-04 01:15:44 UTC (rev 9741)
@@ -1,7 +0,0 @@
-
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 0 bytes in 0 blocks.
-malloc/free: 1 allocs, 1 frees, 24 bytes allocated.
-For a detailed leak analysis, rerun with: --leak-check=yes
-For counts of detected errors, rerun with: -v
Deleted: branches/DARWIN/memcheck/tests/post-syscall.stdout.exp
===================================================================
--- branches/DARWIN/memcheck/tests/post-syscall.stdout.exp 2009-05-04 00:52:32 UTC (rev 9740)
+++ branches/DARWIN/memcheck/tests/post-syscall.stdout.exp 2009-05-04 01:15:44 UTC (rev 9741)
@@ -1 +0,0 @@
-PASSED
Modified: branches/DARWIN/memcheck/tests/post-syscall.vgtest
===================================================================
--- branches/DARWIN/memcheck/tests/post-syscall.vgtest 2009-05-04 00:52:32 UTC (rev 9740)
+++ branches/DARWIN/memcheck/tests/post-syscall.vgtest 2009-05-04 01:15:44 UTC (rev 9741)
@@ -1 +1,2 @@
prog: post-syscall
+vgopts: -q
|
|
From: <sv...@va...> - 2009-05-04 00:52:39
|
Author: njn Date: 2009-05-04 01:52:32 +0100 (Mon, 04 May 2009) New Revision: 9740 Log: Add an alternative output for strchr for Darwin. Added: branches/DARWIN/memcheck/tests/strchr.stderr.exp-darwin Modified: branches/DARWIN/memcheck/tests/Makefile.am Modified: branches/DARWIN/memcheck/tests/Makefile.am =================================================================== --- branches/DARWIN/memcheck/tests/Makefile.am 2009-05-04 00:09:47 UTC (rev 9739) +++ branches/DARWIN/memcheck/tests/Makefile.am 2009-05-04 00:52:32 UTC (rev 9740) @@ -144,7 +144,8 @@ sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ stack_changes.stderr.exp stack_changes.stdout.exp \ stack_changes.stdout.exp2 stack_changes.vgtest \ - strchr.stderr.exp strchr.stderr.exp2 strchr.vgtest \ + strchr.stderr.exp strchr.stderr.exp2 strchr.stderr.exp-darwin \ + strchr.vgtest \ str_tester.stderr.exp str_tester.vgtest \ supp_unknown.stderr.exp supp_unknown.vgtest supp_unknown.supp \ supp1.stderr.exp supp1.vgtest \ Copied: branches/DARWIN/memcheck/tests/strchr.stderr.exp-darwin (from rev 9738, branches/DARWIN/memcheck/tests/strchr.stderr.exp2) =================================================================== --- branches/DARWIN/memcheck/tests/strchr.stderr.exp-darwin (rev 0) +++ branches/DARWIN/memcheck/tests/strchr.stderr.exp-darwin 2009-05-04 00:52:32 UTC (rev 9740) @@ -0,0 +1,11 @@ +Conditional jump or move depends on uninitialised value(s) + at 0x........: strchr (mc_replace_strmem.c:...) + by 0x........: main (strchr.c:15) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: strchr (mc_replace_strmem.c:...) + by 0x........: main (strchr.c:15) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: strrchr (mc_replace_strmem.c:...) + by 0x........: main (strchr.c:16) |
|
From: <sv...@va...> - 2009-05-04 00:09:53
|
Author: njn
Date: 2009-05-04 01:09:47 +0100 (Mon, 04 May 2009)
New Revision: 9739
Log:
Don't treat memcpy() specially on Darwin; it doesn't seem to be necessary.
Modified:
branches/DARWIN/memcheck/mc_replace_strmem.c
Modified: branches/DARWIN/memcheck/mc_replace_strmem.c
===================================================================
--- branches/DARWIN/memcheck/mc_replace_strmem.c 2009-05-03 23:14:55 UTC (rev 9738)
+++ branches/DARWIN/memcheck/mc_replace_strmem.c 2009-05-04 00:09:47 UTC (rev 9739)
@@ -455,12 +455,10 @@
return dst; \
}
-#if defined(VGO_darwin)
-/* Darwin's memcpy() is overlap-safe, so replace it with MEMMOVE instead. */
-#else
MEMCPY(VG_Z_LIBC_SONAME, memcpy)
-MEMCPY(VG_Z_LD_SO_1, memcpy) /* ld.so.1 */
-MEMCPY(VG_Z_LD64_SO_1, memcpy) /* ld64.so.1 */
+MEMCPY(VG_Z_LD_SO_1, memcpy)
+MEMCPY(VG_Z_LD64_SO_1, memcpy)
+MEMCPY(VG_Z_DYLD, memcpy)
/* icc9 blats these around all over the place. Not only in the main
executable but various .so's. They are highly tuned and read
memory beyond the source boundary (although work correctly and
@@ -470,7 +468,6 @@
http://bugs.kde.org/show_bug.cgi?id=139776
*/
MEMCPY(NONE, _intel_fast_memcpy)
-#endif
#define MEMCMP(soname, fnname) \
@@ -580,11 +577,6 @@
MEMMOVE(VG_Z_LIBC_SONAME, memmove)
MEMMOVE(VG_Z_DYLD, memmove)
-#if defined(VGO_darwin)
-/* Darwin's memcpy() is overlap-safe, so use MEMMOVE for memcpy() too. */
-MEMMOVE(VG_Z_LIBC_SONAME, memcpy)
-MEMMOVE(VG_Z_DYLD, memcpy)
-#endif
#define BCOPY(soname, fnname) \
|
|
From: <sv...@va...> - 2009-05-03 23:15:04
|
Author: njn
Date: 2009-05-04 00:14:55 +0100 (Mon, 04 May 2009)
New Revision: 9738
Log:
Merged a number of commits between r9708..r9733 (DRD changes, mostly) from
the trunk.
Added:
branches/DARWIN/drd/tests/custom_alloc.stderr.exp
branches/DARWIN/drd/tests/custom_alloc.vgtest
branches/DARWIN/drd/tests/sem_as_mutex3.stderr.exp
branches/DARWIN/drd/tests/sem_as_mutex3.vgtest
Modified:
branches/DARWIN/drd/drd_clientreq.c
branches/DARWIN/drd/drd_load_store.c
branches/DARWIN/drd/drd_load_store.h
branches/DARWIN/drd/drd_main.c
branches/DARWIN/drd/drd_malloc_wrappers.c
branches/DARWIN/drd/drd_malloc_wrappers.h
branches/DARWIN/drd/drd_segment.c
branches/DARWIN/drd/drd_segment.h
branches/DARWIN/drd/tests/Makefile.am
branches/DARWIN/drd/tests/drd_bitmap_test.c
branches/DARWIN/drd/tests/sem_as_mutex.vgtest
branches/DARWIN/drd/tests/sem_as_mutex2.vgtest
branches/DARWIN/memcheck/tests/linux/timerfd-syscall.c
Modified: branches/DARWIN/drd/drd_clientreq.c
===================================================================
--- branches/DARWIN/drd/drd_clientreq.c 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/drd_clientreq.c 2009-05-03 23:14:55 UTC (rev 9738)
@@ -26,7 +26,9 @@
#include "drd_barrier.h"
#include "drd_clientreq.h"
#include "drd_cond.h"
+#include "drd_error.h"
#include "drd_load_store.h"
+#include "drd_malloc_wrappers.h"
#include "drd_mutex.h"
#include "drd_rwlock.h"
#include "drd_semaphore.h"
@@ -44,9 +46,8 @@
/* Local function declarations. */
-static
-Bool DRD_(handle_client_request)(ThreadId vg_tid, UWord* arg, UWord* ret);
-static Addr DRD_(highest_used_stack_address)(const ThreadId vg_tid);
+static Bool handle_client_request(ThreadId vg_tid, UWord* arg, UWord* ret);
+static Addr highest_used_stack_address(const ThreadId vg_tid);
/* Function definitions. */
@@ -57,15 +58,14 @@
*/
void DRD_(clientreq_init)(void)
{
- VG_(needs_client_requests)(DRD_(handle_client_request));
+ VG_(needs_client_requests)(handle_client_request);
}
/**
* DRD's handler for Valgrind client requests. The code below handles both
* DRD's public and tool-internal client requests.
*/
-static
-Bool DRD_(handle_client_request)(ThreadId vg_tid, UWord* arg, UWord* ret)
+static Bool handle_client_request(ThreadId vg_tid, UWord* arg, UWord* ret)
{
UWord result = 0;
const DrdThreadId drd_tid = DRD_(thread_get_running_tid)();
@@ -75,6 +75,22 @@
switch (arg[0])
{
+ case VG_USERREQ__MALLOCLIKE_BLOCK:
+ if (arg[1])
+ DRD_(malloclike_block)(vg_tid, arg[1]/*addr*/, arg[2]/*size*/);
+ break;
+
+ case VG_USERREQ__FREELIKE_BLOCK:
+ if (arg[1] && ! DRD_(freelike_block)(vg_tid, arg[1]/*addr*/))
+ {
+ VG_(maybe_record_error)(vg_tid,
+ GenericErr,
+ VG_(get_IP)(vg_tid),
+ "Invalid VG_USERREQ__FREELIKE_BLOCK request",
+ NULL);
+ }
+ break;
+
case VG_USERREQ__DRD_GET_VALGRIND_THREAD_ID:
result = vg_tid;
break;
@@ -93,7 +109,7 @@
case VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK:
{
- const Addr topmost_sp = DRD_(highest_used_stack_address)(vg_tid);
+ const Addr topmost_sp = highest_used_stack_address(vg_tid);
#if 0
UInt nframes;
const UInt n_ips = 20;
@@ -375,9 +391,11 @@
break;
default:
+#if 0
VG_(message)(Vg_DebugMsg, "Unrecognized client request 0x%lx 0x%lx",
arg[0], arg[1]);
tl_assert(0);
+#endif
return False;
}
@@ -393,7 +411,7 @@
* in vgpreload_exp-drd-*.so or from the thread wrapper for a newly created
* thread. See also drd_pthread_intercepts.c.
*/
-static Addr DRD_(highest_used_stack_address)(const ThreadId vg_tid)
+static Addr highest_used_stack_address(const ThreadId vg_tid)
{
UInt nframes;
const UInt n_ips = 10;
Modified: branches/DARWIN/drd/drd_load_store.c
===================================================================
--- branches/DARWIN/drd/drd_load_store.c 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/drd_load_store.c 2009-05-03 23:14:55 UTC (rev 9738)
@@ -53,22 +53,34 @@
/* Local variables. */
-static Bool DRD_(s_check_stack_accesses) = False;
+static Bool s_check_stack_accesses = False;
+static Bool s_first_race_only = False;
/* Function definitions. */
Bool DRD_(get_check_stack_accesses)()
{
- return DRD_(s_check_stack_accesses);
+ return s_check_stack_accesses;
}
void DRD_(set_check_stack_accesses)(const Bool c)
{
tl_assert(c == False || c == True);
- DRD_(s_check_stack_accesses) = c;
+ s_check_stack_accesses = c;
}
+Bool DRD_(get_first_race_only)()
+{
+ return s_first_race_only;
+}
+
+void DRD_(set_first_race_only)(const Bool fro)
+{
+ tl_assert(fro == False || fro == True);
+ s_first_race_only = fro;
+}
+
void DRD_(trace_mem_access)(const Addr addr, const SizeT size,
const BmAccessTypeT access_type)
{
@@ -124,6 +136,11 @@
VG_(get_IP)(VG_(get_running_tid)()),
"Conflicting accesses",
&drei);
+
+ if (s_first_race_only)
+ {
+ DRD_(start_suppression)(addr, addr + size, "first race only");
+ }
}
VG_REGPARM(2) void DRD_(trace_load)(Addr addr, SizeT size)
@@ -135,7 +152,7 @@
#endif
if (DRD_(running_thread_is_recording)()
- && (DRD_(s_check_stack_accesses)
+ && (s_check_stack_accesses
|| ! DRD_(thread_address_on_stack)(addr))
&& bm_access_load_triggers_conflict(addr, addr + size)
&& ! DRD_(is_suppressed)(addr, addr + size))
@@ -147,7 +164,7 @@
static VG_REGPARM(1) void drd_trace_load_1(Addr addr)
{
if (DRD_(running_thread_is_recording)()
- && (DRD_(s_check_stack_accesses)
+ && (s_check_stack_accesses
|| ! DRD_(thread_address_on_stack)(addr))
&& bm_access_load_1_triggers_conflict(addr)
&& ! DRD_(is_suppressed)(addr, addr + 1))
@@ -159,7 +176,7 @@
static VG_REGPARM(1) void drd_trace_load_2(Addr addr)
{
if (DRD_(running_thread_is_recording)()
- && (DRD_(s_check_stack_accesses)
+ && (s_check_stack_accesses
|| ! DRD_(thread_address_on_stack)(addr))
&& bm_access_load_2_triggers_conflict(addr)
&& ! DRD_(is_suppressed)(addr, addr + 2))
@@ -171,7 +188,7 @@
static VG_REGPARM(1) void drd_trace_load_4(Addr addr)
{
if (DRD_(running_thread_is_recording)()
- && (DRD_(s_check_stack_accesses)
+ && (s_check_stack_accesses
|| ! DRD_(thread_address_on_stack)(addr))
&& bm_access_load_4_triggers_conflict(addr)
&& ! DRD_(is_suppressed)(addr, addr + 4))
@@ -183,7 +200,7 @@
static VG_REGPARM(1) void drd_trace_load_8(Addr addr)
{
if (DRD_(running_thread_is_recording)()
- && (DRD_(s_check_stack_accesses)
+ && (s_check_stack_accesses
|| ! DRD_(thread_address_on_stack)(addr))
&& bm_access_load_8_triggers_conflict(addr)
&& ! DRD_(is_suppressed)(addr, addr + 8))
@@ -201,7 +218,7 @@
#endif
if (DRD_(running_thread_is_recording)()
- && (DRD_(s_check_stack_accesses)
+ && (s_check_stack_accesses
|| ! DRD_(thread_address_on_stack)(addr))
&& bm_access_store_triggers_conflict(addr, addr + size)
&& ! DRD_(is_suppressed)(addr, addr + size))
@@ -213,7 +230,7 @@
static VG_REGPARM(1) void drd_trace_store_1(Addr addr)
{
if (DRD_(running_thread_is_recording)()
- && (DRD_(s_check_stack_accesses)
+ && (s_check_stack_accesses
|| ! DRD_(thread_address_on_stack)(addr))
&& bm_access_store_1_triggers_conflict(addr)
&& ! DRD_(is_suppressed)(addr, addr + 1))
@@ -225,7 +242,7 @@
static VG_REGPARM(1) void drd_trace_store_2(Addr addr)
{
if (DRD_(running_thread_is_recording)()
- && (DRD_(s_check_stack_accesses)
+ && (s_check_stack_accesses
|| ! DRD_(thread_address_on_stack)(addr))
&& bm_access_store_2_triggers_conflict(addr)
&& ! DRD_(is_suppressed)(addr, addr + 2))
@@ -237,7 +254,7 @@
static VG_REGPARM(1) void drd_trace_store_4(Addr addr)
{
if (DRD_(running_thread_is_recording)()
- && (DRD_(s_check_stack_accesses)
+ && (s_check_stack_accesses
|| ! DRD_(thread_address_on_stack)(addr))
&& bm_access_store_4_triggers_conflict(addr)
&& ! DRD_(is_suppressed)(addr, addr + 4))
@@ -249,7 +266,7 @@
static VG_REGPARM(1) void drd_trace_store_8(Addr addr)
{
if (DRD_(running_thread_is_recording)()
- && (DRD_(s_check_stack_accesses)
+ && (s_check_stack_accesses
|| ! DRD_(thread_address_on_stack)(addr))
&& bm_access_store_8_triggers_conflict(addr)
&& ! DRD_(is_suppressed)(addr, addr + 8))
@@ -310,7 +327,7 @@
mkIRExpr_HWord(size)))));
}
- if (! DRD_(s_check_stack_accesses) && is_stack_access(bb, addr_expr))
+ if (! s_check_stack_accesses && is_stack_access(bb, addr_expr))
return;
switch (size)
@@ -375,7 +392,7 @@
mkIRExpr_HWord(size)))));
}
- if (! DRD_(s_check_stack_accesses) && is_stack_access(bb, addr_expr))
+ if (! s_check_stack_accesses && is_stack_access(bb, addr_expr))
return;
switch (size)
Modified: branches/DARWIN/drd/drd_load_store.h
===================================================================
--- branches/DARWIN/drd/drd_load_store.h 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/drd_load_store.h 2009-05-03 23:14:55 UTC (rev 9738)
@@ -38,6 +38,8 @@
Bool DRD_(get_check_stack_accesses)(void);
void DRD_(set_check_stack_accesses)(const Bool c);
+Bool DRD_(get_first_race_only)(void);
+void DRD_(set_first_race_only)(const Bool fro);
IRSB* DRD_(instrument)(VgCallbackClosure* const closure,
IRSB* const bb_in,
VexGuestLayout* const layout,
Modified: branches/DARWIN/drd/drd_main.c
===================================================================
--- branches/DARWIN/drd/drd_main.c 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/drd_main.c 2009-05-03 23:14:55 UTC (rev 9738)
@@ -67,6 +67,7 @@
{
int check_stack_accesses = -1;
int exclusive_threshold_ms = -1;
+ int first_race_only = -1;
int report_signal_unlocked = -1;
int segment_merging = -1;
int shared_threshold_ms = -1;
@@ -86,6 +87,7 @@
if VG_BOOL_CLO(arg, "--check-stack-var", check_stack_accesses) {}
else if VG_BOOL_CLO(arg, "--drd-stats", DRD_(s_print_stats)) {}
+ else if VG_BOOL_CLO(arg, "--first-race-only", first_race_only) {}
else if VG_BOOL_CLO(arg,"--report-signal-unlocked",report_signal_unlocked) {}
else if VG_BOOL_CLO(arg, "--segment-merging", segment_merging) {}
else if VG_BOOL_CLO(arg, "--show-confl-seg", show_confl_seg) {}
@@ -116,6 +118,10 @@
DRD_(mutex_set_lock_threshold)(exclusive_threshold_ms);
DRD_(rwlock_set_exclusive_threshold)(exclusive_threshold_ms);
}
+ if (first_race_only != -1)
+ {
+ DRD_(set_first_race_only)(first_race_only);
+ }
if (report_signal_unlocked != -1)
{
DRD_(cond_set_report_signal_unlocked)(report_signal_unlocked);
@@ -166,6 +172,8 @@
" stack variables [no].\n"
" --exclusive-threshold=<n> Print an error message if any mutex or\n"
" writer lock is held longer than the specified time (in milliseconds).\n"
+" --first-race-only=yes|no Only report the first data race that occurs on\n"
+" a memory location instead of all races [no].\n"
" --report-signal-unlocked=yes|no Whether to report calls to\n"
" pthread_cond_signal() where the mutex associated\n"
" with the signal via pthread_cond_wait() is not\n"
@@ -574,6 +582,9 @@
DRD_(sg_get_max_segments_alive_count)(),
DRD_(thread_get_discard_ordered_segments_count)());
VG_(message)(Vg_UserMsg,
+ " %lld merges.",
+ DRD_(sg_get_segment_merge_count)());
+ VG_(message)(Vg_UserMsg,
" (%lld m, %lld rw, %lld s, %lld b)",
DRD_(get_mutex_segment_creation_count)(),
DRD_(get_rwlock_segment_creation_count)(),
Modified: branches/DARWIN/drd/drd_malloc_wrappers.c
===================================================================
--- branches/DARWIN/drd/drd_malloc_wrappers.c 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/drd_malloc_wrappers.c 2009-05-03 23:14:55 UTC (rev 9738)
@@ -50,14 +50,14 @@
/* Local variables. */
-static StartUsingMem DRD_(s_start_using_mem_callback);
-static StopUsingMem DRD_(s_stop_using_mem_callback);
+static StartUsingMem s_start_using_mem_callback;
+static StopUsingMem s_stop_using_mem_callback;
/* Stats ... */
-static SizeT DRD_(s_cmalloc_n_mallocs) = 0;
-static SizeT DRD_(s_cmalloc_n_frees) = 0;
-static SizeT DRD_(s_cmalloc_bs_mallocd) = 0;
+static SizeT s_cmalloc_n_mallocs = 0;
+static SizeT s_cmalloc_n_frees = 0;
+static SizeT s_cmalloc_bs_mallocd = 0;
/* Record malloc'd blocks. */
-static VgHashTable DRD_(s_malloc_list) = NULL;
+static VgHashTable s_malloc_list = NULL;
/*------------------------------------------------------------*/
@@ -65,7 +65,7 @@
/*------------------------------------------------------------*/
/** Allocate its shadow chunk, put it on the appropriate list. */
-static DRD_Chunk* DRD_(create_chunk)(ThreadId tid, Addr p, SizeT size)
+static DRD_Chunk* create_chunk(ThreadId tid, Addr p, SizeT size)
{
DRD_Chunk* mc = VG_(malloc)("drd.malloc_wrappers.cDC.1",
sizeof(DRD_Chunk));
@@ -81,15 +81,11 @@
/*------------------------------------------------------------*/
/* Allocate memory and note change in memory available */
-static
-__inline__
-void* DRD_(new_block)(ThreadId tid,
- SizeT size, SizeT align,
- Bool is_zeroed)
+static void* new_block(ThreadId tid, SizeT size, SizeT align, Bool is_zeroed)
{
Addr p;
- DRD_(s_cmalloc_n_mallocs) ++;
+ s_cmalloc_n_mallocs ++;
// Allocate and zero
p = (Addr)VG_(cli_malloc)(align, size);
@@ -97,56 +93,79 @@
return NULL;
}
if (is_zeroed) VG_(memset)((void*)p, 0, size);
- DRD_(s_start_using_mem_callback)(p, p + size, 0/*ec_uniq*/);
- // Only update this stat if allocation succeeded.
- DRD_(s_cmalloc_bs_mallocd) += size;
+ DRD_(malloclike_block)(tid, p, size);
- VG_(HT_add_node)(DRD_(s_malloc_list), DRD_(create_chunk)(tid, p, size));
-
return (void*)p;
}
+/**
+ * Store information about a memory block that has been allocated by
+ * malloc() or a malloc() replacement.
+ */
+void DRD_(malloclike_block)(const ThreadId tid, const Addr p, const SizeT size)
+{
+ tl_assert(p);
+
+ s_start_using_mem_callback(p, p + size, 0/*ec_uniq*/);
+
+ // Only update this stat if allocation succeeded.
+ s_cmalloc_bs_mallocd += size;
+
+ VG_(HT_add_node)(s_malloc_list, create_chunk(tid, p, size));
+}
+
static void* DRD_(malloc)(ThreadId tid, SizeT n)
{
- return DRD_(new_block)(tid, n, VG_(clo_alignment), /*is_zeroed*/False);
+ return new_block(tid, n, VG_(clo_alignment), /*is_zeroed*/False);
}
static void* DRD_(memalign)(ThreadId tid, SizeT align, SizeT n)
{
- return DRD_(new_block)(tid, n, align, /*is_zeroed*/False);
+ return new_block(tid, n, align, /*is_zeroed*/False);
}
static void* DRD_(calloc)(ThreadId tid, SizeT nmemb, SizeT size1)
{
- return DRD_(new_block)(tid, nmemb*size1, VG_(clo_alignment),
+ return new_block(tid, nmemb*size1, VG_(clo_alignment),
/*is_zeroed*/True);
}
-static __inline__ void DRD_(handle_free)(ThreadId tid, Addr p)
+/**
+ * Remove the information that was stored by DRD_(malloclike_block)() about
+ * a memory block.
+ */
+Bool DRD_(freelike_block)(const ThreadId tid, const Addr p)
{
DRD_Chunk* mc;
- DRD_(s_cmalloc_n_frees)++;
+ tl_assert(p);
- mc = VG_(HT_remove)(DRD_(s_malloc_list), (UWord)p);
- if (mc == NULL)
+ s_cmalloc_n_frees++;
+
+ mc = VG_(HT_remove)(s_malloc_list, (UWord)p);
+ if (mc)
{
- tl_assert(0);
- }
- else
- {
tl_assert(p == mc->data);
if (mc->size > 0)
- DRD_(s_stop_using_mem_callback)(mc->data, mc->size);
- VG_(cli_free)((void*)p);
+ s_stop_using_mem_callback(mc->data, mc->size);
VG_(free)(mc);
+ return True;
}
+ return False;
}
+static void handle_free(ThreadId tid, Addr p)
+{
+ if (DRD_(freelike_block)(tid, p))
+ VG_(cli_free)((void*)p);
+ else
+ tl_assert(False);
+}
+
static void DRD_(free)(ThreadId tid, void* p)
{
- DRD_(handle_free)(tid, (Addr)p);
+ handle_free(tid, (Addr)p);
}
static void* DRD_(realloc)(ThreadId tid, void* p_old, SizeT new_size)
@@ -155,12 +174,12 @@
void* p_new;
SizeT old_size;
- DRD_(s_cmalloc_n_frees) ++;
- DRD_(s_cmalloc_n_mallocs) ++;
- DRD_(s_cmalloc_bs_mallocd) += new_size;
+ s_cmalloc_n_frees ++;
+ s_cmalloc_n_mallocs ++;
+ s_cmalloc_bs_mallocd += new_size;
/* Remove the old block */
- mc = VG_(HT_remove)(DRD_(s_malloc_list), (UWord)p_old);
+ mc = VG_(HT_remove)(s_malloc_list, (UWord)p_old);
if (mc == NULL) {
tl_assert(0);
return NULL;
@@ -178,7 +197,7 @@
else if (old_size > new_size)
{
/* new size is smaller */
- DRD_(s_stop_using_mem_callback)(mc->data + new_size, old_size);
+ s_stop_using_mem_callback(mc->data + new_size, old_size);
mc->size = new_size;
mc->where = VG_(record_ExeContext)(tid, 0);
p_new = p_old;
@@ -196,12 +215,12 @@
VG_(memcpy)((void*)a_new, p_old, mc->size);
/* Free old memory */
- DRD_(s_stop_using_mem_callback)(mc->data, mc->size);
+ s_stop_using_mem_callback(mc->data, mc->size);
VG_(free)(mc);
// Allocate a new chunk.
- mc = DRD_(create_chunk)(tid, a_new, new_size);
- DRD_(s_start_using_mem_callback)(a_new, a_new + new_size,
+ mc = create_chunk(tid, a_new, new_size);
+ s_start_using_mem_callback(a_new, a_new + new_size,
0/*ec_uniq*/);
}
else
@@ -217,14 +236,14 @@
// will have removed and then re-added mc unnecessarily. But that's ok
// because shrinking a block with realloc() is (presumably) much rarer
// than growing it, and this way simplifies the growing case.
- VG_(HT_add_node)(DRD_(s_malloc_list), mc);
+ VG_(HT_add_node)(s_malloc_list, mc);
return p_new;
}
static void* DRD_(__builtin_new)(ThreadId tid, SizeT n)
{
- void* const result = DRD_(new_block)(tid, n, VG_(clo_alignment),
+ void* const result = new_block(tid, n, VG_(clo_alignment),
/*is_zeroed*/False);
//VG_(message)(Vg_DebugMsg, "__builtin_new(%d, %d) = %p", tid, n, result);
return result;
@@ -233,22 +252,22 @@
static void DRD_(__builtin_delete)(ThreadId tid, void* p)
{
//VG_(message)(Vg_DebugMsg, "__builtin_delete(%d, %p)", tid, p);
- DRD_(handle_free)(tid, (Addr)p);
+ handle_free(tid, (Addr)p);
}
static void* DRD_(__builtin_vec_new)(ThreadId tid, SizeT n)
{
- return DRD_(new_block)(tid, n, VG_(clo_alignment), /*is_zeroed*/False);
+ return new_block(tid, n, VG_(clo_alignment), /*is_zeroed*/False);
}
static void DRD_(__builtin_vec_delete)(ThreadId tid, void* p)
{
- DRD_(handle_free)(tid, (Addr)p);
+ 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 );
+ DRD_Chunk *mc = VG_(HT_lookup)( 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.
@@ -258,14 +277,14 @@
void DRD_(register_malloc_wrappers)(const StartUsingMem start_callback,
const StopUsingMem stop_callback)
{
- tl_assert(DRD_(s_malloc_list) == 0);
- DRD_(s_malloc_list) = VG_(HT_construct)("drd_malloc_list"); // a big prime
- tl_assert(DRD_(s_malloc_list) != 0);
+ tl_assert(s_malloc_list == 0);
+ s_malloc_list = VG_(HT_construct)("drd_malloc_list"); // a big prime
+ tl_assert(s_malloc_list != 0);
tl_assert(start_callback);
tl_assert(stop_callback);
- DRD_(s_start_using_mem_callback) = start_callback;
- DRD_(s_stop_using_mem_callback) = stop_callback;
+ s_start_using_mem_callback = start_callback;
+ s_stop_using_mem_callback = stop_callback;
VG_(needs_malloc_replacement)(DRD_(malloc),
DRD_(__builtin_new),
@@ -291,8 +310,8 @@
tl_assert(size);
tl_assert(where);
- VG_(HT_ResetIter)(DRD_(s_malloc_list));
- while ((mc = VG_(HT_Next)(DRD_(s_malloc_list))))
+ VG_(HT_ResetIter)(s_malloc_list);
+ while ((mc = VG_(HT_Next)(s_malloc_list)))
{
if (mc->data <= a && a < mc->data + mc->size)
{
@@ -321,8 +340,8 @@
return;
/* Count memory still in use. */
- VG_(HT_ResetIter)(DRD_(s_malloc_list));
- while ((mc = VG_(HT_Next)(DRD_(s_malloc_list))))
+ VG_(HT_ResetIter)(s_malloc_list);
+ while ((mc = VG_(HT_Next)(s_malloc_list)))
{
nblocks++;
nbytes += mc->size;
@@ -333,8 +352,8 @@
nbytes, nblocks);
VG_(message)(Vg_DebugMsg,
"malloc/free: %lu allocs, %lu frees, %lu bytes allocated.",
- DRD_(s_cmalloc_n_mallocs),
- DRD_(s_cmalloc_n_frees), DRD_(s_cmalloc_bs_mallocd));
+ s_cmalloc_n_mallocs,
+ s_cmalloc_n_frees, s_cmalloc_bs_mallocd);
if (VG_(clo_verbosity) > 1)
VG_(message)(Vg_DebugMsg, " ");
}
Modified: branches/DARWIN/drd/drd_malloc_wrappers.h
===================================================================
--- branches/DARWIN/drd/drd_malloc_wrappers.h 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/drd_malloc_wrappers.h 2009-05-03 23:14:55 UTC (rev 9738)
@@ -37,6 +37,8 @@
void DRD_(register_malloc_wrappers)(const StartUsingMem start_callback,
const StopUsingMem stop_callback);
+void DRD_(malloclike_block)(const ThreadId tid, const Addr p, const SizeT size);
+Bool DRD_(freelike_block)(const ThreadId tid, const Addr p);
Bool DRD_(heap_addrinfo)(Addr const a,
Addr* const data,
SizeT* const size,
Modified: branches/DARWIN/drd/drd_segment.c
===================================================================
--- branches/DARWIN/drd/drd_segment.c 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/drd_segment.c 2009-05-03 23:14:55 UTC (rev 9738)
@@ -38,6 +38,7 @@
/* Local variables. */
+static ULong s_segment_merge_count;
static ULong s_segments_created_count;
static ULong s_segments_alive_count;
static ULong s_max_segments_alive_count;
@@ -215,6 +216,8 @@
VG_(message)(Vg_UserMsg, "%s", msg);
}
+ s_segment_merge_count++;
+
// Keep sg1->stacktrace.
// Keep sg1->vc.
// Merge sg2->bm into sg1->bm.
@@ -258,3 +261,8 @@
{
return s_max_segments_alive_count;
}
+
+ULong DRD_(sg_get_segment_merge_count)(void)
+{
+ return s_segment_merge_count;
+}
Modified: branches/DARWIN/drd/drd_segment.h
===================================================================
--- branches/DARWIN/drd/drd_segment.h 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/drd_segment.h 2009-05-03 23:14:55 UTC (rev 9738)
@@ -70,6 +70,7 @@
ULong DRD_(sg_get_segments_created_count)(void);
ULong DRD_(sg_get_segments_alive_count)(void);
ULong DRD_(sg_get_max_segments_alive_count)(void);
+ULong DRD_(sg_get_segment_merge_count)(void);
#endif // __SEGMENT_H
Modified: branches/DARWIN/drd/tests/Makefile.am
===================================================================
--- branches/DARWIN/drd/tests/Makefile.am 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/tests/Makefile.am 2009-05-03 23:14:55 UTC (rev 9738)
@@ -27,6 +27,8 @@
circular_buffer.stderr.exp-with-atomic-builtins \
circular_buffer.stderr.exp-without-atomic-builtins \
circular_buffer.vgtest \
+ custom_alloc.vgtest \
+ custom_alloc.stderr.exp \
drd_bitmap_test.stderr.exp \
drd_bitmap_test.stdout.exp \
drd_bitmap_test.vgtest \
@@ -134,6 +136,8 @@
sem_as_mutex.vgtest \
sem_as_mutex2.stderr.exp \
sem_as_mutex2.vgtest \
+ sem_as_mutex3.stderr.exp \
+ sem_as_mutex3.vgtest \
sigalrm.stderr.exp \
sigalrm.vgtest \
tc01_simple_race.stderr.exp \
@@ -173,7 +177,8 @@
tc17_sembar.vgtest \
tc18_semabuse.stderr.exp \
tc18_semabuse.vgtest \
- tc19_shadowmem.stderr.exp \
+ tc19_shadowmem.stderr.exp-32bit \
+ tc19_shadowmem.stderr.exp-64bit \
tc19_shadowmem.vgtest \
tc20_verifywrap.stderr.exp-glibc2.3 \
tc20_verifywrap.stderr.exp-glibc2.5 \
Copied: branches/DARWIN/drd/tests/custom_alloc.stderr.exp (from rev 9733, trunk/drd/tests/custom_alloc.stderr.exp)
===================================================================
--- branches/DARWIN/drd/tests/custom_alloc.stderr.exp (rev 0)
+++ branches/DARWIN/drd/tests/custom_alloc.stderr.exp 2009-05-03 23:14:55 UTC (rev 9738)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Copied: branches/DARWIN/drd/tests/custom_alloc.vgtest (from rev 9733, trunk/drd/tests/custom_alloc.vgtest)
===================================================================
--- branches/DARWIN/drd/tests/custom_alloc.vgtest (rev 0)
+++ branches/DARWIN/drd/tests/custom_alloc.vgtest 2009-05-03 23:14:55 UTC (rev 9738)
@@ -0,0 +1 @@
+prog: ../../memcheck/tests/custom_alloc
Modified: branches/DARWIN/drd/tests/drd_bitmap_test.c
===================================================================
--- branches/DARWIN/drd/tests/drd_bitmap_test.c 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/tests/drd_bitmap_test.c 2009-05-03 23:14:55 UTC (rev 9738)
@@ -74,7 +74,7 @@
int equal;
equal = DRD_(bm_equal)(bm1, bm2);
- if (! equal)
+ if (s_verbose && ! equal)
{
VG_(printf)("Bitmaps are different.\n");
VG_(printf)("Bitmap 1:\n");
@@ -167,16 +167,17 @@
struct bitmap* bm1;
struct bitmap* bm2;
+ const Addr lb = ADDR0_COUNT - 2 * BITS_PER_UWORD;
+ const Addr ub = ADDR0_COUNT + 2 * BITS_PER_UWORD;
+
assert(outer_loop_step >= 1);
assert(inner_loop_step >= 1);
bm1 = DRD_(bm_new)();
bm2 = DRD_(bm_new)();
- for (i = ADDR0_COUNT - 2 * BITS_PER_UWORD;
- i < ADDR0_COUNT + 2 * BITS_PER_UWORD;
- i += outer_loop_step)
+ for (i = lb; i < ub; i += outer_loop_step)
{
- for (j = i + 1; j < ADDR0_COUNT + 2 * BITS_PER_UWORD; j += inner_loop_step)
+ for (j = i + 1; j < ub; j += inner_loop_step)
{
DRD_(bm_access_range_load)(bm1, i, j);
DRD_(bm_clear_load)(bm1, i, j);
@@ -240,7 +241,7 @@
i < ADDR0_COUNT + 2 * BITS_PER_UWORD;
i += outer_loop_step)
{
- for (j = i + 1; j < ADDR0_COUNT + 2 * BITS_PER_UWORD; j += inner_loop_step)
+ for (j = i + 1; j < ub; j += inner_loop_step)
{
DRD_(bm_clear_load)(bm1, i, j);
DRD_(bm_access_range_load)(bm1, i, j);
@@ -257,6 +258,7 @@
DRD_(bm_clear_load)(bm1, i, i+8);
DRD_(bm_access_load_8)(bm1, i);
assert(bm_equal_print_diffs(bm1, bm2));
+
DRD_(bm_clear_store)(bm1, i, j);
DRD_(bm_access_range_store)(bm1, i, j);
assert(bm_equal_print_diffs(bm1, bm2));
@@ -272,6 +274,11 @@
DRD_(bm_clear_store)(bm1, i, i+8);
DRD_(bm_access_store_8)(bm1, i);
assert(bm_equal_print_diffs(bm1, bm2));
+
+ DRD_(bm_clear)(bm1, i, j);
+ DRD_(bm_access_range_load)(bm1, i, j);
+ DRD_(bm_access_range_store)(bm1, i, j);
+ assert(bm_equal_print_diffs(bm1, bm2));
}
}
DRD_(bm_delete)(bm2);
Modified: branches/DARWIN/drd/tests/sem_as_mutex.vgtest
===================================================================
--- branches/DARWIN/drd/tests/sem_as_mutex.vgtest 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/tests/sem_as_mutex.vgtest 2009-05-03 23:14:55 UTC (rev 9738)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
-vgopts: --var-info=yes
+vgopts: --check-stack-var=yes --var-info=yes
prog: sem_as_mutex
Modified: branches/DARWIN/drd/tests/sem_as_mutex2.vgtest
===================================================================
--- branches/DARWIN/drd/tests/sem_as_mutex2.vgtest 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/drd/tests/sem_as_mutex2.vgtest 2009-05-03 23:14:55 UTC (rev 9738)
@@ -1,3 +1,4 @@
prereq: ./supported_libpthread
+vgopts: --check-stack-var=yes --var-info=yes
prog: sem_as_mutex
args: -m
Copied: branches/DARWIN/drd/tests/sem_as_mutex3.stderr.exp (from rev 9733, trunk/drd/tests/sem_as_mutex3.stderr.exp)
===================================================================
--- branches/DARWIN/drd/tests/sem_as_mutex3.stderr.exp (rev 0)
+++ branches/DARWIN/drd/tests/sem_as_mutex3.stderr.exp 2009-05-03 23:14:55 UTC (rev 9738)
@@ -0,0 +1,11 @@
+
+Conflicting load by thread 1/1 at 0x........ size 8
+ at 0x........: main (sem_as_mutex.c:?)
+Location 0x........ is 0 bytes inside local var "s_d3"
+declared at sem_as_mutex.c:25, in frame #? of thread 1
+Other segment start (thread 0/2)
+ (thread finished, call stack no longer available)
+Other segment end (thread 0/2)
+ (thread finished, call stack no longer available)
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Copied: branches/DARWIN/drd/tests/sem_as_mutex3.vgtest (from rev 9733, trunk/drd/tests/sem_as_mutex3.vgtest)
===================================================================
--- branches/DARWIN/drd/tests/sem_as_mutex3.vgtest (rev 0)
+++ branches/DARWIN/drd/tests/sem_as_mutex3.vgtest 2009-05-03 23:14:55 UTC (rev 9738)
@@ -0,0 +1,3 @@
+prereq: ./supported_libpthread
+vgopts: --check-stack-var=yes --first-race-only=yes --var-info=yes
+prog: sem_as_mutex
Modified: branches/DARWIN/memcheck/tests/linux/timerfd-syscall.c
===================================================================
--- branches/DARWIN/memcheck/tests/linux/timerfd-syscall.c 2009-05-03 22:53:19 UTC (rev 9737)
+++ branches/DARWIN/memcheck/tests/linux/timerfd-syscall.c 2009-05-03 23:14:55 UTC (rev 9738)
@@ -57,14 +57,23 @@
#ifndef __NR_timerfd_create
#if defined(__x86_64__)
#define __NR_timerfd_create 283
+#elif defined(__i386__)
+#define __NR_timerfd_create 322
+#elif defined(__powerpc__)
+#define __NR_timerfd_create 306
+#else
+#error Cannot detect your architecture!
+#endif
+#endif
+
+#ifndef __NR_timerfd_settime
+#if defined(__x86_64__)
#define __NR_timerfd_settime 286
#define __NR_timerfd_gettime 287
#elif defined(__i386__)
-#define __NR_timerfd_create 322
#define __NR_timerfd_settime 325
#define __NR_timerfd_gettime 326
#elif defined(__powerpc__)
-#define __NR_timerfd_create 306
#define __NR_timerfd_settime 311
#define __NR_timerfd_gettime 312
#else
|
|
From: <sv...@va...> - 2009-05-03 22:53:25
|
Author: njn
Date: 2009-05-03 23:53:19 +0100 (Sun, 03 May 2009)
New Revision: 9737
Log:
Merge part of r9709 (m_signals.c clean-ups) from the DARWIN branch.
Modified:
trunk/coregrind/m_signals.c
trunk/none/tests/Makefile.am
Modified: trunk/coregrind/m_signals.c
===================================================================
--- trunk/coregrind/m_signals.c 2009-05-03 18:50:29 UTC (rev 9736)
+++ trunk/coregrind/m_signals.c 2009-05-03 22:53:19 UTC (rev 9737)
@@ -1757,12 +1757,12 @@
}
static
-void sync_signalhandler_from_outside ( ThreadId tid,
+void sync_signalhandler_from_user ( ThreadId tid,
Int sigNo, vki_siginfo_t *info, struct vki_ucontext *uc )
{
ThreadId qtid;
- /* If some user-process sent us a sync signal (ie, they're not the result
+ /* If some user-process sent us a sync signal (ie. it's not the result
of a faulting instruction), then how we treat it depends on when it
arrives... */
@@ -1890,7 +1890,7 @@
}
static
-void sync_signalhandler_from_inside ( ThreadId tid,
+void sync_signalhandler_from_kernel ( ThreadId tid,
Int sigNo, vki_siginfo_t *info, struct vki_ucontext *uc )
{
/* Check to see if some part of Valgrind itself is interested in faults.
@@ -1963,7 +1963,7 @@
vki_siginfo_t *info, struct vki_ucontext *uc )
{
ThreadId tid = VG_(lwpid_to_vgtid)(VG_(gettid)());
- Bool from_outside;
+ Bool from_user;
if (0)
VG_(printf)("sync_sighandler(%d, %p, %p)\n", sigNo, info, uc);
@@ -1978,14 +1978,14 @@
info->si_code = sanitize_si_code(info->si_code);
- from_outside = !is_signal_from_kernel(info->si_code);
+ from_user = !is_signal_from_kernel(info->si_code);
if (VG_(clo_trace_signals)) {
VG_DMSG("sync signal handler: "
"signal=%d, si_code=%d, EIP=%#lx, eip=%#lx, from %s",
sigNo, info->si_code, VG_(get_IP)(tid),
VG_UCONTEXT_INSTR_PTR(uc),
- ( from_outside ? "outside" : "inside" ));
+ ( from_user ? "user" : "kernel" ));
}
vg_assert(sigNo >= 1 && sigNo <= VG_(max_signal));
@@ -2005,10 +2005,10 @@
(Why do we care?) If the signal is from the user rather than the
kernel, then treat it more like an async signal than a sync signal --
that is, merely queue it for later delivery. */
- if (from_outside) {
- sync_signalhandler_from_outside(tid, sigNo, info, uc);
+ if (from_user) {
+ sync_signalhandler_from_user(tid, sigNo, info, uc);
} else {
- sync_signalhandler_from_inside( tid, sigNo, info, uc);
+ sync_signalhandler_from_kernel( tid, sigNo, info, uc);
}
}
Modified: trunk/none/tests/Makefile.am
===================================================================
--- trunk/none/tests/Makefile.am 2009-05-03 18:50:29 UTC (rev 9736)
+++ trunk/none/tests/Makefile.am 2009-05-03 22:53:19 UTC (rev 9737)
@@ -130,7 +130,8 @@
check_PROGRAMS = \
ansi args \
- async-sigs bitfield1 \
+ async-sigs \
+ bitfield1 \
bug129866 \
closeall coolo_strlen \
discard exec-sigmask execve faultstatus fcntl_setown \
|
|
From: <sv...@va...> - 2009-05-03 18:50:40
|
Author: bart
Date: 2009-05-03 19:50:29 +0100 (Sun, 03 May 2009)
New Revision: 9736
Log:
Removed support for computed bitmaps.
Modified:
branches/DRDDEV/drd/drd_bitmap.c
branches/DRDDEV/drd/drd_bitmap.h
branches/DRDDEV/drd/pub_drd_bitmap.h
Modified: branches/DRDDEV/drd/drd_bitmap.c
===================================================================
--- branches/DRDDEV/drd/drd_bitmap.c 2009-05-03 18:33:45 UTC (rev 9735)
+++ branches/DRDDEV/drd/drd_bitmap.c 2009-05-03 18:50:29 UTC (rev 9736)
@@ -59,16 +59,6 @@
struct bitmap* DRD_(bm_new)()
{
- return bm_new_cb(0);
-}
-
-/** Allocate and initialize a new bitmap structure.
- *
- * @param compute_bitmap2 Callback function for computing the actual bitmap
- * data.
- */
-struct bitmap* bm_new_cb(void (*compute_bitmap2)(UWord, struct bitmap2*))
-{
unsigned i;
struct bitmap* bm;
@@ -89,7 +79,6 @@
}
bm->oset = VG_(OSetGen_Create)(0, 0, VG_(malloc), "drd.bitmap.bn.2",
VG_(free));
- bm->compute_bitmap2 = compute_bitmap2;
s_bitmap_creation_count++;
Modified: branches/DRDDEV/drd/drd_bitmap.h
===================================================================
--- branches/DRDDEV/drd/drd_bitmap.h 2009-05-03 18:33:45 UTC (rev 9735)
+++ branches/DRDDEV/drd/drd_bitmap.h 2009-05-03 18:50:29 UTC (rev 9736)
@@ -65,7 +65,7 @@
/** Number of bits assigned to the least significant component of an address.
*/
-#define ADDR_LSB_BITS 12
+#define ADDR_LSB_BITS 14
/** Mask that has to be applied to an address of type Addr in order to
* compute the least significant part of an address split, after having
@@ -318,7 +318,6 @@
{
struct bm_cache_elem cache[N_CACHE_ELEM];
OSet* oset;
- void (*compute_bitmap2)(const UWord a1, struct bitmap2* bm2);
};
@@ -491,18 +490,7 @@
if (! bm_cache_lookup(bm, a1, &bm2))
{
bm2 = VG_(OSetGen_Lookup)(bm->oset, &a1);
- if (bm2 == 0 && bm->compute_bitmap2)
- {
- bm2 = bm2_insert(bm, a1);
- bm2_clear(bm2);
- /* Compute the second-level bitmap, and insert the pointer to the
- * computed bitmap. Note: this pointer may be NULL. */
- (*bm->compute_bitmap2)(a1, bm2);
- }
- else
- {
- bm_update_cache(bm, a1, bm2);
- }
+ bm_update_cache(bm, a1, bm2);
}
return bm2;
}
@@ -521,7 +509,6 @@
#ifdef ENABLE_DRD_CONSISTENCY_CHECKS
tl_assert(bm);
- tl_assert(bm->compute_bitmap2 == 0);
#endif
if (! bm_cache_lookup(bm, a1, &bm2))
@@ -581,7 +568,6 @@
#ifdef ENABLE_DRD_CONSISTENCY_CHECKS
tl_assert(bm);
- tl_assert(bm->compute_bitmap2 == 0);
#endif
if (bm_cache_lookup(bm, a1, &bm2))
@@ -626,7 +612,6 @@
#ifdef ENABLE_DRD_CONSISTENCY_CHECKS
tl_assert(bm);
- tl_assert(bm->compute_bitmap2 == 0);
#endif
bm2 = bm2_lookup_or_insert_exclusive(bm, address_msb(a1));
@@ -643,7 +628,6 @@
#ifdef ENABLE_DRD_CONSISTENCY_CHECKS
tl_assert(bm);
- tl_assert(bm->compute_bitmap2 == 0);
#endif
bm2 = bm2_lookup_or_insert_exclusive(bm, address_msb(a1));
Modified: branches/DRDDEV/drd/pub_drd_bitmap.h
===================================================================
--- branches/DRDDEV/drd/pub_drd_bitmap.h 2009-05-03 18:33:45 UTC (rev 9735)
+++ branches/DRDDEV/drd/pub_drd_bitmap.h 2009-05-03 18:50:29 UTC (rev 9736)
@@ -62,7 +62,6 @@
/* Function declarations. */
struct bitmap* DRD_(bm_new)(void);
-struct bitmap* bm_new_cb(void (*compute_bitmap2)(UWord, struct bitmap2*));
void DRD_(bm_delete)(struct bitmap* const bm);
void DRD_(bm_access_range)(struct bitmap* const bm,
const Addr a1, const Addr a2,
|
|
From: <sv...@va...> - 2009-05-03 18:33:55
|
Author: bart
Date: 2009-05-03 19:33:45 +0100 (Sun, 03 May 2009)
New Revision: 9735
Log:
Added more tests.
Modified:
branches/DRDDEV/drd/tests/drd_bitmap_test.c
Modified: branches/DRDDEV/drd/tests/drd_bitmap_test.c
===================================================================
--- branches/DRDDEV/drd/tests/drd_bitmap_test.c 2009-05-03 18:33:20 UTC (rev 9734)
+++ branches/DRDDEV/drd/tests/drd_bitmap_test.c 2009-05-03 18:33:45 UTC (rev 9735)
@@ -219,11 +219,6 @@
DRD_(bm_access_range_store)(bm1, i, j);
DRD_(bm_clear)(bm1, i, j);
assert(bm_equal_print_diffs(bm1, bm2));
-
- DRD_(bm_access_range_load)(bm1, i, j);
- DRD_(bm_access_range_store)(bm1, i, j);
- DRD_(bm_clear)(bm1, i, j);
- assert(bm_equal_print_diffs(bm1, bm2));
DRD_(bm_access_load_1)(bm1, i);
DRD_(bm_access_store_1)(bm1, i);
DRD_(bm_clear)(bm1, i, i+1);
@@ -267,6 +262,7 @@
DRD_(bm_clear_load)(bm1, i, i+8);
DRD_(bm_access_load_8)(bm1, i);
assert(bm_equal_print_diffs(bm1, bm2));
+
DRD_(bm_clear_store)(bm1, i, j);
DRD_(bm_access_range_store)(bm1, i, j);
assert(bm_equal_print_diffs(bm1, bm2));
@@ -282,6 +278,11 @@
DRD_(bm_clear_store)(bm1, i, i+8);
DRD_(bm_access_store_8)(bm1, i);
assert(bm_equal_print_diffs(bm1, bm2));
+
+ DRD_(bm_clear)(bm1, i, j);
+ DRD_(bm_access_range_load)(bm1, i, j);
+ DRD_(bm_access_range_store)(bm1, i, j);
+ assert(bm_equal_print_diffs(bm1, bm2));
}
}
DRD_(bm_delete)(bm2);
|