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
(33) |
3
(25) |
4
(22) |
5
(22) |
6
(21) |
7
(19) |
|
8
(29) |
9
(34) |
10
(29) |
11
(37) |
12
(36) |
13
(28) |
14
(25) |
|
15
(28) |
16
(23) |
17
(36) |
18
(21) |
19
(12) |
20
(14) |
21
(10) |
|
22
(7) |
23
(15) |
24
(41) |
25
(15) |
26
(9) |
27
(7) |
28
(6) |
|
29
(16) |
30
(24) |
31
(22) |
|
|
|
|
|
From: <sv...@va...> - 2005-05-29 17:05:52
|
Author: njn Date: 2005-05-29 18:05:49 +0100 (Sun, 29 May 2005) New Revision: 3810 Removed: trunk/coregrind/x86-linux/platform-private.h Log: Remove unused file. Deleted: trunk/coregrind/x86-linux/platform-private.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/x86-linux/platform-private.h 2005-05-29 17:03:54 UTC = (rev 3809) +++ trunk/coregrind/x86-linux/platform-private.h 2005-05-29 17:05:49 UTC = (rev 3810) @@ -1,10 +0,0 @@ -#ifndef _X86_LINUX_PRIVATE_H -#define _X86_LINUX_PRIVATE_H - -/* These are addresses within VGA_(blocking_syscall). See syscall.S for= details. */ -extern const Word VGA_(blksys_setup); -extern const Word VGA_(blksys_restart); -extern const Word VGA_(blksys_complete); -extern const Word VGA_(blksys_committed); - -#endif /* _X86_LINUX_PRIVATE_H */ |
|
From: <sv...@va...> - 2005-05-29 17:03:57
|
Author: njn
Date: 2005-05-29 18:03:54 +0100 (Sun, 29 May 2005)
New Revision: 3809
Added:
trunk/coregrind/pub_core_redir.h
Log:
Forgot to add pub_core_redir.h when committing the m_redir module.
Added: trunk/coregrind/pub_core_redir.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_redir.h 2005-05-29 17:01:48 UTC (rev 3808)
+++ trunk/coregrind/pub_core_redir.h 2005-05-29 17:03:54 UTC (rev 3809)
@@ -0,0 +1,83 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Code redirections. pub_core_redir.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward
+ js...@ac...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __PUB_CORE_REDIR_H
+#define __PUB_CORE_REDIR_H
+
+//--------------------------------------------------------------------
+// PURPOSE: This module deals with:
+// - code redirection: intercepting calls to client functions, and
+// pointing them to a different piece of code.
+// - function wrapping: add calls to code before and after client
+// functions execute, for inspection and/or modification.
+//
+// Nb: It's possible that this should be two modules.
+//--------------------------------------------------------------------
+
+/* Redirection machinery */
+extern Addr VG_(code_redirect) ( Addr orig );
+
+/* Set up some default redirects */
+extern void VG_(setup_code_redirect_table) ( void );
+
+extern void VG_(add_redirect_sym_to_addr)(const Char *from_lib,
+ const Char *from_sym,
+ Addr to_addr);
+extern void VG_(add_redirect_addr_to_addr)(Addr from_addr, Addr to_addr)=
;
+extern void VG_(resolve_seg_redirs)(SegInfo *si);
+
+/* Wrapping machinery */
+enum return_type {
+ RT_RETURN,
+ RT_LONGJMP,
+ RT_EXIT,
+};
+
+typedef struct _FuncWrapper FuncWrapper;
+struct _FuncWrapper {
+ void *(*before)(va_list args);
+ void (*after) (void *nonce, enum return_type, Word retval);
+};
+
+extern void VG_(wrap_function)(Addr eip, const FuncWrapper *wrapper);
+extern const FuncWrapper *VG_(is_wrapped)(Addr eip);
+extern Bool VG_(is_wrapper_return)(Addr eip);
+
+/* Primary interface for adding wrappers for client-side functions. */
+extern CodeRedirect *VG_(add_wrapper)(const Char *from_lib, const Char *=
from_sym,
+ const FuncWrapper *wrapper);
+
+extern Bool VG_(is_resolved)(const CodeRedirect *redir);
+
+#endif // __PUB_CORE_REDIR_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2005-05-29 17:01:51
|
Author: njn
Date: 2005-05-29 18:01:48 +0100 (Sun, 29 May 2005)
New Revision: 3808
Added:
trunk/coregrind/m_redir.c
Removed:
trunk/coregrind/amd64-linux/core_platform.c
trunk/coregrind/vg_redir.c
trunk/coregrind/x86-linux/core_platform.c
Modified:
trunk/coregrind/Makefile.am
trunk/coregrind/amd64-linux/Makefile.am
trunk/coregrind/arm-linux/Makefile.am
trunk/coregrind/core.h
trunk/coregrind/m_translate.c
trunk/coregrind/vg_main.c
trunk/coregrind/vg_symtab2.c
trunk/coregrind/x86-linux/Makefile.am
Log:
Modularised m_redir. As a side-effect, managed to remove
$PLATFORM/core_platform.c and $PLATFORM/libplatform.a, hooray.
Modified: trunk/coregrind/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/Makefile.am 2005-05-29 16:23:17 UTC (rev 3807)
+++ trunk/coregrind/Makefile.am 2005-05-29 17:01:48 UTC (rev 3808)
@@ -45,6 +45,7 @@
pub_core_hashtable.h \
pub_core_mallocfree.h \
pub_core_options.h \
+ pub_core_redir.h \
pub_core_replacemalloc.h\
pub_core_sigframe.h \
pub_core_skiplist.h \
@@ -79,6 +80,7 @@
m_hashtable.c \
m_mallocfree.c \
m_options.c \
+ m_redir.c \
m_skiplist.c \
m_stacktrace.c \
m_tooliface.c \
@@ -95,19 +97,16 @@
vg_symtab2.c \
vg_threadmodel.c \
vg_pthreadmodel.c \
- vg_redir.c \
vg_dwarf.c \
vg_stabs.c \
vg_symtypes.c
=20
-## libplatform.a must be before libarch.a and libos.a, it seems.
stage2_extra=3D \
m_dispatch/libdispatch.a \
m_demangle/libdemangle.a \
m_aspacemgr/libaspacemgr.a \
m_sigframe/libsigframe.a \
m_syscalls/libsyscalls.a \
- ${VG_PLATFORM}/libplatform.a \
${VG_ARCH}/libarch.a \
${VG_OS}/libos.a \
@VEX_DIR@/libvex.a
Modified: trunk/coregrind/amd64-linux/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/amd64-linux/Makefile.am 2005-05-29 16:23:17 UTC (rev =
3807)
+++ trunk/coregrind/amd64-linux/Makefile.am 2005-05-29 17:01:48 UTC (rev =
3808)
@@ -4,9 +4,3 @@
noinst_HEADERS =3D \
core_platform.h \
vki_unistd.h
-
-noinst_LIBRARIES =3D libplatform.a
-
-
-libplatform_a_SOURCES =3D \
- core_platform.c
Deleted: trunk/coregrind/amd64-linux/core_platform.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/amd64-linux/core_platform.c 2005-05-29 16:23:17 UTC (=
rev 3807)
+++ trunk/coregrind/amd64-linux/core_platform.c 2005-05-29 17:01:48 UTC (=
rev 3808)
@@ -1,10 +0,0 @@
-#include "core.h"
-
-void VGP_(setup_redirects)(void)
-{
- /* Redirect vsyscalls to local versions */
- VG_(add_redirect_addr_to_addr)(0xFFFFFFFFFF600000ULL,
- VG_(client_trampoline_code)+VG_(tramp_=
gettimeofday_offset));
- VG_(add_redirect_addr_to_addr)(0xFFFFFFFFFF600400ULL,
- VG_(client_trampoline_code)+VG_(tramp_=
time_offset));
-}
Modified: trunk/coregrind/arm-linux/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/arm-linux/Makefile.am 2005-05-29 16:23:17 UTC (rev 38=
07)
+++ trunk/coregrind/arm-linux/Makefile.am 2005-05-29 17:01:48 UTC (rev 38=
08)
@@ -4,8 +4,3 @@
noinst_HEADERS =3D \
core_platform.h \
vki_unistd.h
-
-noinst_LIBRARIES =3D libplatform.a
-
-libplatform_a_SOURCES =3D
-
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/core.h 2005-05-29 16:23:17 UTC (rev 3807)
+++ trunk/coregrind/core.h 2005-05-29 17:01:48 UTC (rev 3808)
@@ -489,45 +489,6 @@
=20
=20
/* ---------------------------------------------------------------------
- Exports of vg_redir.c
- ------------------------------------------------------------------ */
-
-/* Redirection machinery */
-extern Addr VG_(code_redirect) ( Addr orig );
-
-/* Set up some default redirects */
-extern void VG_(setup_code_redirect_table) ( void );
-
-extern void VG_(add_redirect_sym_to_addr)(const Char *from_lib,
- const Char *from_sym,
- Addr to_addr);
-extern void VG_(add_redirect_addr_to_addr)(Addr from_addr, Addr to_addr)=
;
-extern void VG_(resolve_seg_redirs)(SegInfo *si);
-
-/* Wrapping machinery */
-enum return_type {
- RT_RETURN,
- RT_LONGJMP,
- RT_EXIT,
-};
-
-typedef struct _FuncWrapper FuncWrapper;
-struct _FuncWrapper {
- void *(*before)(va_list args);
- void (*after) (void *nonce, enum return_type, Word retval);
-};
-
-extern void VG_(wrap_function)(Addr eip, const FuncWrapper *wrapper);
-extern const FuncWrapper *VG_(is_wrapped)(Addr eip);
-extern Bool VG_(is_wrapper_return)(Addr eip);
-
-/* Primary interface for adding wrappers for client-side functions. */
-extern CodeRedirect *VG_(add_wrapper)(const Char *from_lib, const Char *=
from_sym,
- const FuncWrapper *wrapper);
-
-extern Bool VG_(is_resolved)(const CodeRedirect *redir);
-
-/* ---------------------------------------------------------------------
Exports of vg_main.c
------------------------------------------------------------------ */
=20
@@ -688,13 +649,6 @@
extern Bool VGA_(client_requests)(ThreadId tid, UWord *args);
=20
=20
-// ---------------------------------------------------------------------
-// Platform-specific things defined in eg. x86/*.c
-// ---------------------------------------------------------------------
-
-// Do any platform specific redirects.
-extern void VGP_(setup_redirects)(void);
-
///* -------------------------------------------------------------------=
--
// Thread modelling
// ------------------------------------------------------------------ =
*/
Copied: trunk/coregrind/m_redir.c (from rev 3807, trunk/coregrind/vg_redi=
r.c)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_redir.c 2005-05-29 16:23:17 UTC (rev 3807)
+++ trunk/coregrind/m_redir.c 2005-05-29 17:01:48 UTC (rev 3808)
@@ -0,0 +1,726 @@
+/*--------------------------------------------------------------------*/
+/*--- Management of function redirection and wrapping. ---*/
+/*--- vg_redir.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, an extensible x86 protected-mode
+ emulator for monitoring program execution on x86-Unixes.
+
+ Copyright (C) 2000-2005 Julian Seward=20
+ js...@ac...
+ Copyright (C) 2003-2005 Jeremy Fitzhardinge
+ je...@go...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+#include "core.h"
+#include "vg_symtab2.h"
+
+#include "pub_core_aspacemgr.h"
+#include "pub_core_skiplist.h"
+#include "pub_core_options.h"
+#include "pub_core_redir.h"
+#include "pub_core_transtab.h"
+
+/*------------------------------------------------------------*/
+/*--- General purpose redirection. ---*/
+/*------------------------------------------------------------*/
+
+/*
+ wraps and redirections, indexed by from_addr
+
+ Redirection and wrapping are two distinct mechanisms which Valgrind
+ can use to change the client's control flow.
+
+ Redirection intercepts a call to a client function, and re-points it
+ to a new piece of code (presumably functionally equivalent). The
+ original code is never run.
+
+ Wrapping does call the client's original code, but calls "before"
+ and "after" functions which can inspect (and perhaps modify) the
+ function's arguments and return value.
+ */
+struct _CodeRedirect {
+ enum redir_type {
+ R_REDIRECT, /* plain redirection */
+ R_WRAPPER, /* wrap with valgrind-internal code */
+ R_CLIENT_WRAPPER, /* wrap with client-side code */
+ } type;
+ =20
+ const Char *from_lib; /* library qualifier pattern */
+ const Char *from_sym; /* symbol */
+ Addr from_addr; /* old addr */
+
+ /* used for redirection */
+ const Char *to_lib; /* library qualifier pattern */
+ const Char *to_sym; /* symbol */
+ Addr to_addr; /* new addr */
+
+ /* used for wrapping */
+ const FuncWrapper *wrapper;
+
+ CodeRedirect *next; /* next pointer on unresolved list */
+};
+
+static Char *straddr(void *p)
+{
+ static Char buf[16];
+
+ VG_(sprintf)(buf, "%p", *(Addr *)p);
+
+ return buf;
+}
+
+static SkipList sk_resolved_redir =3D VG_SKIPLIST_INIT(CodeRedirect, fro=
m_addr,=20
+ VG_(cmp_Addr), straddr, VG_AR_SYMTAB);
+static CodeRedirect *unresolved_redir =3D NULL;
+
+static Bool match_lib(const Char *pattern, const SegInfo *si)
+{
+ /* pattern =3D=3D NULL matches everything, otherwise use globbing
+
+ If the pattern starts with:
+ file:, then match filename
+ soname:, then match soname
+ something else, match filename
+ */
+ const Char *name =3D si->filename;
+
+ if (pattern =3D=3D NULL)
+ return True;
+
+ if (VG_(strncmp)(pattern, "file:", 5) =3D=3D 0) {
+ pattern +=3D 5;
+ name =3D si->filename;
+ }
+ if (VG_(strncmp)(pattern, "soname:", 7) =3D=3D 0) {
+ pattern +=3D 7;
+ name =3D si->soname;
+ }
+
+ if (name =3D=3D NULL)
+ return False;
+ =20
+ return VG_(string_match)(pattern, name);
+}
+
+static inline Bool from_resolved(const CodeRedirect *redir)
+{
+ return redir->from_addr !=3D 0;
+}
+
+static inline Bool to_resolved(const CodeRedirect *redir)
+{
+ if (redir->type =3D=3D R_REDIRECT)
+ return redir->to_addr !=3D 0;
+ vg_assert(redir->wrapper !=3D NULL);
+ return True;
+}
+
+Bool VG_(is_resolved)(const CodeRedirect *redir)
+{
+ return from_resolved(redir) && to_resolved(redir);
+}
+
+static void add_resolved(CodeRedirect *redir)
+{
+ switch(redir->type) {
+ case R_REDIRECT:
+ if (VG_(clo_trace_redir)) {
+ VG_(message)(Vg_DebugMsg, " redir resolved (%s:%s=3D%p -> ",
+ redir->from_lib, redir->from_sym, redir->from_addr=
);
+ VG_(message)(Vg_DebugMsg, " %s:%s=3D%p)",
+ redir->to_lib, redir->to_sym, redir->to_addr);
+ }
+
+ if (VG_(search_transtab)(NULL, (Addr64)redir->from_addr, False)) {
+ /* For some given (from, to) redir, the "from" function got
+ called before the .so containing "to" became available. We
+ know this because there is already a translation for the
+ entry point of the original "from". So the redirect will
+ never actually take effect unless that translation is
+ discarded. =20
+
+ Note, we only really need to discard the first bb of the
+ old entry point, and so we avoid the problem of having to
+ figure out how big that bb was -- since it is at least 1
+ byte of original code, we can just pass 1 as the original
+ size to invalidate_translations() and it will indeed get
+ rid of the translation.=20
+
+ Note, this is potentially expensive -- discarding
+ translations causes complete unchaining. =20
+ */
+ if (VG_(clo_verbosity) > 2 && VG_(clo_trace_redir)) {
+ VG_(message)(Vg_UserMsg, =20
+ "Discarding translation due to redirect of alre=
ady called function" );
+ VG_(message)(Vg_UserMsg,
+ " %s (%p -> %p)",
+ redir->from_sym, redir->from_addr, redir->to_ad=
dr );
+ }
+ VG_(discard_translations)((Addr64)redir->from_addr, 1);
+ }
+
+ {
+ CodeRedirect *r =3D VG_(SkipList_Find_Exact)(&sk_resolved_redir=
, &redir->from_addr);
+
+ if (r =3D=3D NULL)
+ VG_(SkipList_Insert)(&sk_resolved_redir, redir);
+ else {
+ /* XXX leak redir */
+ if (VG_(clo_trace_redir))
+ VG_(message)(Vg_DebugMsg, " redir %s:%s:%p->%s:%s:%p dup=
licated\n",
+ redir->from_lib, redir->from_sym, redir->fro=
m_addr,
+ redir->to_lib, redir->to_sym, redir->to_addr=
);
+ }
+ }
+ break;
+
+ case R_WRAPPER:
+ if (VG_(clo_trace_redir)) {
+ VG_(message)(Vg_DebugMsg, " wrapper resolved (%s:%s=3D%p -> wr=
apper)",
+ redir->from_lib, redir->from_sym, redir->from_addr=
);
+ }
+
+ /* XXX redir leaked */
+ //VG_(wrap_function)(redir->from_addr, redir->wrapper);
+ break;
+
+ case R_CLIENT_WRAPPER:
+ VG_(core_panic)("not implemented");
+ break;
+ }
+}
+
+/* Resolve a redir using si if possible, and add it to the resolved
+ list */
+static Bool resolve_redir(CodeRedirect *redir, const SegInfo *si)
+{
+ Bool resolved;
+
+ vg_assert(si !=3D NULL);
+ vg_assert(si->seg !=3D NULL);
+
+ /* no redirection from Valgrind segments */
+ if (si->seg->flags & SF_VALGRIND)
+ return False;
+
+ resolved =3D VG_(is_resolved)(redir);
+
+ if (0 && VG_(clo_trace_redir))
+ VG_(printf)(" consider FROM binding %s:%s -> %s:%s in %s(%s)\n",
+ redir->from_lib, redir->from_sym,
+ redir->to_lib, redir->to_sym,
+ si->filename, si->soname);
+
+ vg_assert(!resolved);
+
+ if (!from_resolved(redir)) {
+ vg_assert(redir->from_sym !=3D NULL);
+
+ if (match_lib(redir->from_lib, si)) {
+ redir->from_addr =3D VG_(reverse_search_one_symtab)(si, redir->from_sy=
m);
+ if (VG_(clo_trace_redir) && redir->from_addr !=3D 0)
+ VG_(printf)(" bind FROM: %p =3D %s:%s\n",=20
+ redir->from_addr,redir->from_lib, redir->from_sy=
m );
+ }
+ }
+
+ if (!to_resolved(redir)) {
+ vg_assert(redir->type =3D=3D R_REDIRECT);
+ vg_assert(redir->to_sym !=3D NULL);
+
+ if (match_lib(redir->to_lib, si)) {
+ redir->to_addr =3D VG_(reverse_search_one_symtab)(si, redir->to_sym);
+ if (VG_(clo_trace_redir) && redir->to_addr !=3D 0)
+ VG_(printf)(" bind TO: %p =3D %s:%s\n",=20
+ redir->to_addr,redir->to_lib, redir->to_sym );
+
+ }
+ }
+
+ resolved =3D from_resolved(redir) && to_resolved(redir);
+
+ if (0 && VG_(clo_trace_redir))
+ VG_(printf)("resolve_redir: %s:%s from=3D%p %s:%s to=3D%p\n",
+ redir->from_lib, redir->from_sym, redir->from_addr,=20
+ redir->to_lib, redir->to_sym, redir->to_addr);
+
+ if (resolved) add_resolved(redir);
+
+ return resolved;
+}
+
+static Bool resolve_redir_allsegs(CodeRedirect *redir)
+{
+ const SegInfo *si;
+
+ for(si =3D VG_(next_seginfo)(NULL);=20
+ si !=3D NULL;=20
+ si =3D VG_(next_seginfo)(si))
+ {
+ if (resolve_redir(redir, si))
+ return True;
+ }
+ return False;
+}
+
+/* Go through the complete redir list, resolving as much as possible wit=
h this SegInfo.
+
+ This should be called when a new SegInfo symtab is loaded.
+ */
+void VG_(resolve_seg_redirs)(SegInfo *si)
+{
+ CodeRedirect **prevp =3D &unresolved_redir;
+ CodeRedirect *redir, *next;
+
+ if (VG_(clo_trace_redir))
+ VG_(printf)("Considering redirs to/from %s(soname=3D%s)\n",
+ si->filename, si->soname);
+
+ /* visit each unresolved redir - if it becomes resolved, then
+ remove it from the unresolved list */
+ for(redir =3D unresolved_redir; redir !=3D NULL; redir =3D next) {
+ next =3D redir->next;
+
+ if (resolve_redir(redir, si)) {
+ *prevp =3D next;
+ redir->next =3D NULL;
+ } else
+ prevp =3D &redir->next;
+ }
+}
+
+/* Redirect a lib/symbol reference to a function at lib/symbol */
+static void add_redirect_sym_to_sym(const Char *from_lib, const Char *fr=
om_sym,
+ const Char *to_lib, const Char *to_sym)
+{
+ CodeRedirect *redir =3D VG_(SkipNode_Alloc)(&sk_resolved_redir);
+
+ redir->type =3D R_REDIRECT;
+
+ redir->from_lib =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_lib);
+ redir->from_sym =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_sym);
+ redir->from_addr =3D 0;
+
+ redir->to_lib =3D VG_(arena_strdup)(VG_AR_SYMTAB, to_lib);
+ redir->to_sym =3D VG_(arena_strdup)(VG_AR_SYMTAB, to_sym);
+ redir->to_addr =3D 0;
+
+ if (VG_(clo_verbosity) >=3D 2 && VG_(clo_trace_redir))
+ VG_(message)(Vg_UserMsg,=20
+ "REDIRECT %s(%s) to %s(%s)",
+ from_lib, from_sym, to_lib, to_sym);
+
+ /* Check against all existing segments to see if this redirection
+ can be resolved immediately */
+ if (!resolve_redir_allsegs(redir)) {
+ /* nope, add to list */
+ redir->next =3D unresolved_redir;
+ unresolved_redir =3D redir;
+ }
+}
+
+/* Redirect a lib/symbol reference to a function at addr */
+void VG_(add_redirect_sym_to_addr)(const Char *from_lib, const Char *fro=
m_sym,
+ Addr to_addr)
+{
+ CodeRedirect *redir =3D VG_(SkipNode_Alloc)(&sk_resolved_redir);
+
+ redir->type =3D R_REDIRECT;
+
+ redir->from_lib =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_lib);
+ redir->from_sym =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_sym);
+ redir->from_addr =3D 0;
+
+ redir->to_lib =3D NULL;
+ redir->to_sym =3D NULL;
+ redir->to_addr =3D to_addr;
+
+ if (VG_(clo_verbosity) >=3D 2 && VG_(clo_trace_redir))
+ VG_(message)(Vg_UserMsg,=20
+ "REDIRECT %s(%s) to %p",
+ from_lib, from_sym, to_addr);
+
+ /* Check against all existing segments to see if this redirection
+ can be resolved immediately */
+ if (!resolve_redir_allsegs(redir)) {
+ /* nope, add to list */
+ redir->next =3D unresolved_redir;
+ unresolved_redir =3D redir;
+ }
+}
+
+/* Redirect a function at from_addr to a function at to_addr */
+void VG_(add_redirect_addr_to_addr)(Addr from_addr, Addr to_addr)
+{
+ CodeRedirect *redir =3D VG_(SkipNode_Alloc)(&sk_resolved_redir);
+
+ redir->type =3D R_REDIRECT;
+
+ redir->from_lib =3D NULL;
+ redir->from_sym =3D NULL;
+ redir->from_addr =3D from_addr;
+
+ redir->to_lib =3D NULL;
+ redir->to_sym =3D NULL;
+ redir->to_addr =3D to_addr;
+
+ if (VG_(clo_verbosity) >=3D 2 && VG_(clo_trace_redir))
+ VG_(message)(Vg_UserMsg,=20
+ "REDIRECT %p to %p",
+ from_addr, to_addr);
+
+ add_resolved(redir);
+}
+
+CodeRedirect *VG_(add_wrapper)(const Char *from_lib, const Char *from_sy=
m,
+ const FuncWrapper *wrapper)
+{
+ CodeRedirect *redir =3D VG_(SkipNode_Alloc)(&sk_resolved_redir);
+
+ if (0)
+ VG_(printf)("adding wrapper for %s:%s -> (%p,%p)\n",
+ from_lib, from_sym, wrapper->before, wrapper->after);
+
+ redir->type =3D R_WRAPPER;
+
+ redir->from_lib =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_lib);
+ redir->from_sym =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_sym);
+ redir->from_addr =3D 0;
+
+ redir->to_lib =3D NULL;
+ redir->to_sym =3D NULL;
+ redir->to_addr =3D 0;
+
+ redir->wrapper =3D wrapper;
+ =20
+ /* Check against all existing segments to see if this redirection
+ can be resolved immediately */
+ if (!resolve_redir_allsegs(redir)) {
+ /* nope, add to list */
+ redir->next =3D unresolved_redir;
+ unresolved_redir =3D redir;
+ }
+
+ return redir;
+}
+
+/* If address 'a' is being redirected, return the redirected-to
+ address. */
+Addr VG_(code_redirect)(Addr a)
+{
+ CodeRedirect* r;
+
+ r =3D VG_(SkipList_Find_Exact)(&sk_resolved_redir, &a);
+ if (r =3D=3D NULL)
+ return a;
+
+ vg_assert(r->to_addr !=3D 0);
+
+ return r->to_addr;
+}
+
+void VG_(setup_code_redirect_table) ( void )
+{
+ /* Overenthusiastic use of PLT bypassing by the glibc people also
+ means we need to patch the following functions to our own
+ implementations of said, in mac_replace_strmem.c.
+ */
+ add_redirect_sym_to_sym("soname:libc.so.6", "stpcpy",
+ "*vgpreload_memcheck.so*", "stpcpy");
+
+ add_redirect_sym_to_sym("soname:ld-linux.so.2", "strlen",
+ "*vgpreload_memcheck.so*", "strlen");
+ add_redirect_sym_to_sym("soname:libc.so.6", "strlen",
+ "*vgpreload_memcheck.so*", "strlen");
+
+ add_redirect_sym_to_sym("soname:libc.so.6", "strnlen",
+ "*vgpreload_memcheck.so*", "strnlen");
+
+ add_redirect_sym_to_sym("soname:ld-linux.so.2", "stpcpy",
+ "*vgpreload_memcheck.so*", "stpcpy");
+ add_redirect_sym_to_sym("soname:libc.so.6", "stpcpy",
+ "*vgpreload_memcheck.so*", "stpcpy");
+
+ add_redirect_sym_to_sym("soname:libc.so.6", "strchr",
+ "*vgpreload_memcheck.so*", "strchr");
+ add_redirect_sym_to_sym("soname:ld-linux.so.2", "strchr",
+ "*vgpreload_memcheck.so*", "strchr");
+
+ /* apparently index is the same thing as strchr */
+ add_redirect_sym_to_sym("soname:ld-linux.so.2", "index",
+ "*vgpreload_memcheck.so*", "strchr");
+
+ add_redirect_sym_to_sym("soname:libc.so.6", "strchrnul",
+ "*vgpreload_memcheck.so*", "glibc232_strchrnu=
l");
+
+ add_redirect_sym_to_sym("soname:libc.so.6", "rawmemchr",
+ "*vgpreload_memcheck.so*", "glibc232_rawmemch=
r");
+
+ /* amd64-linux (glibc 2.3.3, SuSE 9.2) */
+ /* apparently index is the same thing as strchr */
+ add_redirect_sym_to_sym("soname:libc.so.6", "index",
+ "*vgpreload_memcheck.so*", "strchr");
+ add_redirect_sym_to_sym("soname:ld-linux-x86-64.so.2", "index",
+ "*vgpreload_memcheck.so*", "strchr");
+
+ add_redirect_sym_to_sym("soname:libc.so.6", "strcpy",
+ "*vgpreload_memcheck.so*", "strcpy");
+
+ add_redirect_sym_to_sym("soname:ld-linux-x86-64.so.2", "strcmp",
+ "*vgpreload_memcheck.so*", "strcmp");
+ add_redirect_sym_to_sym("soname:libc.so.6", "strcmp",
+ "*vgpreload_memcheck.so*", "strcmp");
+
+ add_redirect_sym_to_sym("soname:ld-linux-x86-64.so.2", "strlen",
+ "*vgpreload_memcheck.so*", "strlen");
+
+#if defined(VGP_x86_linux)
+ /* Redirect _dl_sysinfo_int80, which is glibc's default system call
+ routine, to the routine in our trampoline page so that the
+ special sysinfo unwind hack in m_stacktrace.c will kick in. */
+ VG_(add_redirect_sym_to_addr)("soname:ld-linux.so.2", "_dl_sysinfo_in=
t80",
+ VG_(client_trampoline_code)+VG_(tramp_s=
yscall_offset));
+#elif defined(VGP_amd64_linux)
+ /* Redirect vsyscalls to local versions */
+ VG_(add_redirect_addr_to_addr)(0xFFFFFFFFFF600000ULL,
+ VG_(client_trampoline_code)+VG_(tramp_=
gettimeofday_offset));
+ VG_(add_redirect_addr_to_addr)(0xFFFFFFFFFF600400ULL,
+ VG_(client_trampoline_code)+VG_(tramp_=
time_offset));
+#else
+# error Unknown platform
+#endif
+}
+
+//:: /*------------------------------------------------------------*/
+//:: /*--- General function wrapping. ---*/
+//:: /*------------------------------------------------------------*/
+//::=20
+//:: /*=20
+//:: TODO:
+//:: - hook into the symtab machinery
+//:: - client-side wrappers?
+//:: - better interfaces for before() functions to get to arguments
+//:: - handle munmap of code (dlclose())
+//:: - handle thread exit
+//:: - handle longjmp
+//:: */
+//:: struct callkey {
+//:: ThreadId tid; /* calling thread */
+//:: Addr esp; /* address of args on stack */
+//:: Addr eip; /* return address */
+//:: };
+//::=20
+//:: struct call_instance {
+//:: struct callkey key;
+//::=20
+//:: const FuncWrapper *wrapper;
+//:: void *nonce;
+//:: };
+//::=20
+//:: static inline Addr addrcmp(Addr a, Addr b)
+//:: {
+//:: if (a < b)
+//:: return -1;
+//:: else if (a > b)
+//:: return 1;
+//:: else=20
+//:: return 0;
+//:: }
+//::=20
+//:: static inline Int cmp(UInt a, UInt b)
+//:: {
+//:: if (a < b)
+//:: return -1;
+//:: else if (a > b)
+//:: return 1;
+//:: else=20
+//:: return 0;
+//:: }
+//::=20
+//:: static Int keycmp(const void *pa, const void *pb)
+//:: {
+//:: const struct callkey *a =3D (const struct callkey *)pa;
+//:: const struct callkey *b =3D (const struct callkey *)pb;
+//:: Int ret;
+//::=20
+//:: if ((ret =3D cmp(a->tid, b->tid)))
+//:: return ret;
+//::=20
+//:: if ((ret =3D addrcmp(a->esp, b->esp)))
+//:: return ret;
+//::=20
+//:: return addrcmp(a->eip, b->eip);
+//:: }
+//::=20
+//:: /* List of wrapped call invocations which are currently active */
+//:: static SkipList wrapped_frames =3D VG_SKIPLIST_INIT(struct call_ins=
tance, key, keycmp,=20
+//:: NULL, VG_AR_SYMTAB);
+//::=20
+//:: static struct call_instance *find_call(Addr retaddr, Addr argsp, Th=
readId tid)
+//:: {
+//:: struct callkey key =3D { tid, argsp, retaddr };
+//::=20
+//:: return VG_(SkipList_Find_Exact)(&wrapped_frames, &key);
+//:: }
+//::=20
+//:: static void wrapper_return(Addr retaddr);
+//::=20
+//:: /* Called from generated code via helper */
+//:: void VG_(wrap_before)(ThreadState *tst, const FuncWrapper *wrapper)
+//:: {
+//:: Addr retaddr =3D VGA_RETADDR(tst->arch);
+//:: Addr argp =3D (Addr)&VGA_FUNC_ARG(tst->arch, 0);
+//:: void *nonce =3D NULL;
+//:: Bool mf =3D VG_(my_fault);
+//:: VG_(my_fault) =3D True;
+//::=20
+//:: if (wrapper->before) {
+//:: va_list args =3D VGA_VA_LIST(tst->arch);
+//:: nonce =3D (*wrapper->before)(args);
+//:: }
+//::=20
+//:: if (wrapper->after) {
+//:: /* If there's an after function, make sure it gets called */
+//:: struct call_instance *call;
+//::=20
+//:: call =3D find_call(retaddr, argp, tst->tid);
+//::=20
+//:: if (call !=3D NULL) {
+//:: /* Found a stale outstanding call; clean it up and recycle
+//:: the structure */
+//:: if (call->wrapper->after)
+//:: (*call->wrapper->after)(call->nonce, RT_LONGJMP, 0);
+//:: } else {
+//:: call =3D VG_(SkipNode_Alloc)(&wrapped_frames);
+//:: =20
+//:: call->key.tid =3D tst->tid;
+//:: call->key.esp =3D argp;
+//:: call->key.eip =3D retaddr;
+//::=20
+//:: VG_(SkipList_Insert)(&wrapped_frames, call);
+//::=20
+//:: wrapper_return(retaddr);
+//:: }
+//::=20
+//:: call->wrapper =3D wrapper;
+//:: call->nonce =3D nonce;
+//:: } else=20
+//:: vg_assert(nonce =3D=3D NULL);
+//::=20
+//:: VG_(my_fault) =3D mf;
+//:: }
+//::=20
+//:: /* Called from generated code via helper */
+//:: void VG_(wrap_after)(ThreadState *tst)
+//:: {
+//:: Addr EIP =3D VGA_INSTR_PTR(tst->arch); /* instruction after call=
*/
+//:: Addr ESP =3D VGA_STACK_PTR(tst->arch); /* pointer to args */
+//:: Word ret =3D VGA_RETVAL(tst->arch); /* return value */
+//:: struct call_instance *call;
+//:: Bool mf =3D VG_(my_fault);
+//::=20
+//:: VG_(my_fault) =3D True;
+//:: call =3D find_call(EIP, ESP, tst->tid);
+//::=20
+//:: if (0)
+//:: VG_(printf)("wrap_after(%p,%p,%d) -> %p\n", EIP, ESP, tst->ti=
d, call);
+//::=20
+//:: if (call !=3D NULL) {
+//:: if (call->wrapper->after)
+//:: (*call->wrapper->after)(call->nonce, RT_RETURN, ret);
+//::=20
+//:: VG_(SkipList_Remove)(&wrapped_frames, &call->key);
+//:: VG_(SkipNode_Free)(&wrapped_frames, call);
+//:: }
+//:: VG_(my_fault) =3D mf;
+//:: }
+//::=20
+//::=20
+//:: struct wrapped_function {
+//:: Addr eip; /* eip of function entrypoint */
+//:: const FuncWrapper *wrapper;
+//:: };
+//::=20
+//:: struct wrapper_return {
+//:: Addr eip; /* return address */
+//:: };
+//::=20
+//:: /* A mapping from eip of wrapped function entrypoints to actual wra=
ppers */
+//:: static SkipList wrapped_functions =3D VG_SKIPLIST_INIT(struct wrapp=
ed_function, eip, VG_(cmp_Addr),
+//:: NULL, VG_AR_SYMTAB);
+//::=20
+//:: /* A set of EIPs which are return addresses for wrapped functions *=
/
+//:: static SkipList wrapper_returns =3D VG_SKIPLIST_INIT(struct wrapper=
_return, eip, VG_(cmp_Addr),
+//:: NULL, VG_AR_SYMTAB);
+//::=20
+//:: /* Wrap function starting at eip */
+//:: void VG_(wrap_function)(Addr eip, const FuncWrapper *wrapper)
+//:: {
+//:: struct wrapped_function *func;
+//::=20
+//:: if (0)
+//:: VG_(printf)("wrapping %p with (%p,%p)\n", eip, wrapper->befor=
e, wrapper->after);
+//::=20
+//:: func =3D VG_(SkipList_Find_Exact)(&wrapped_functions, &eip);
+//::=20
+//:: if (func =3D=3D NULL) {
+//:: func =3D VG_(SkipNode_Alloc)(&wrapped_functions);
+//:: VG_(invalidate_translations)(eip, 1, True);
+//::=20
+//:: func->eip =3D eip;
+//:: VG_(SkipList_Insert)(&wrapped_functions, func);
+//:: }
+//::=20
+//:: func->wrapper =3D wrapper;
+//:: }
+//::=20
+//:: const FuncWrapper *VG_(is_wrapped)(Addr eip)
+//:: {
+//:: struct wrapped_function *func =3D VG_(SkipList_Find_Exact)(&wrap=
ped_functions, &eip);
+//::=20
+//:: if (func)
+//:: return func->wrapper;
+//:: return NULL;
+//:: }
+//::=20
+//:: Bool VG_(is_wrapper_return)(Addr eip)
+//:: {
+//:: struct wrapper_return *ret =3D VG_(SkipList_Find_Exact)(&wrapper=
_returns, &eip);
+//::=20
+//:: return ret !=3D NULL;
+//:: }
+//::=20
+//:: /* Mark eip as being the return address of a wrapper, so that the
+//:: codegen will generate the appropriate call. */
+//:: void wrapper_return(Addr eip)
+//:: {
+//:: struct wrapper_return *ret;
+//::=20
+//:: if (VG_(is_wrapper_return)(eip))
+//:: return;
+//::=20
+//:: VG_(invalidate_translations)(eip, 1, True);
+//::=20
+//:: ret =3D VG_(SkipNode_Alloc)(&wrapper_returns);
+//:: ret->eip =3D eip;
+//::=20
+//:: VG_(SkipList_Insert)(&wrapper_returns, ret);
+//:: }
Modified: trunk/coregrind/m_translate.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_translate.c 2005-05-29 16:23:17 UTC (rev 3807)
+++ trunk/coregrind/m_translate.c 2005-05-29 17:01:48 UTC (rev 3808)
@@ -32,6 +32,7 @@
#include "core.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_options.h"
+#include "pub_core_redir.h"
#include "pub_core_tooliface.h"
#include "pub_core_translate.h"
#include "pub_core_transtab.h"
Modified: trunk/coregrind/vg_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_main.c 2005-05-29 16:23:17 UTC (rev 3807)
+++ trunk/coregrind/vg_main.c 2005-05-29 17:01:48 UTC (rev 3808)
@@ -37,6 +37,7 @@
#include "pub_core_errormgr.h"
#include "pub_core_execontext.h"
#include "pub_core_options.h"
+#include "pub_core_redir.h"
#include "pub_core_syscalls.h"
#include "pub_core_tooliface.h"
#include "pub_core_transtab.h"
@@ -2794,7 +2795,6 @@
//--------------------------------------------------------------
VG_(debugLog)(1, "main", "Initialise redirects\n");
VG_(setup_code_redirect_table)();
- VGP_(setup_redirects)();
=20
//--------------------------------------------------------------
// Verbosity message
Deleted: trunk/coregrind/vg_redir.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_redir.c 2005-05-29 16:23:17 UTC (rev 3807)
+++ trunk/coregrind/vg_redir.c 2005-05-29 17:01:48 UTC (rev 3808)
@@ -1,710 +0,0 @@
-/*--------------------------------------------------------------------*/
-/*--- Management of function redirection and wrapping. ---*/
-/*--- vg_redir.c ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, an extensible x86 protected-mode
- emulator for monitoring program execution on x86-Unixes.
-
- Copyright (C) 2000-2005 Julian Seward=20
- js...@ac...
- Copyright (C) 2003-2005 Jeremy Fitzhardinge
- je...@go...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-#include "core.h"
-#include "vg_symtab2.h"
-
-#include "pub_core_aspacemgr.h"
-#include "pub_core_skiplist.h"
-#include "pub_core_options.h"
-#include "pub_core_transtab.h"
-
-/*------------------------------------------------------------*/
-/*--- General purpose redirection. ---*/
-/*------------------------------------------------------------*/
-
-/*
- wraps and redirections, indexed by from_addr
-
- Redirection and wrapping are two distinct mechanisms which Valgrind
- can use to change the client's control flow.
-
- Redirection intercepts a call to a client function, and re-points it
- to a new piece of code (presumably functionally equivalent). The
- original code is never run.
-
- Wrapping does call the client's original code, but calls "before"
- and "after" functions which can inspect (and perhaps modify) the
- function's arguments and return value.
- */
-struct _CodeRedirect {
- enum redir_type {
- R_REDIRECT, /* plain redirection */
- R_WRAPPER, /* wrap with valgrind-internal code */
- R_CLIENT_WRAPPER, /* wrap with client-side code */
- } type;
- =20
- const Char *from_lib; /* library qualifier pattern */
- const Char *from_sym; /* symbol */
- Addr from_addr; /* old addr */
-
- /* used for redirection */
- const Char *to_lib; /* library qualifier pattern */
- const Char *to_sym; /* symbol */
- Addr to_addr; /* new addr */
-
- /* used for wrapping */
- const FuncWrapper *wrapper;
-
- CodeRedirect *next; /* next pointer on unresolved list */
-};
-
-static Char *straddr(void *p)
-{
- static Char buf[16];
-
- VG_(sprintf)(buf, "%p", *(Addr *)p);
-
- return buf;
-}
-
-static SkipList sk_resolved_redir =3D VG_SKIPLIST_INIT(CodeRedirect, fro=
m_addr,=20
- VG_(cmp_Addr), straddr, VG_AR_SYMTAB);
-static CodeRedirect *unresolved_redir =3D NULL;
-
-static Bool match_lib(const Char *pattern, const SegInfo *si)
-{
- /* pattern =3D=3D NULL matches everything, otherwise use globbing
-
- If the pattern starts with:
- file:, then match filename
- soname:, then match soname
- something else, match filename
- */
- const Char *name =3D si->filename;
-
- if (pattern =3D=3D NULL)
- return True;
-
- if (VG_(strncmp)(pattern, "file:", 5) =3D=3D 0) {
- pattern +=3D 5;
- name =3D si->filename;
- }
- if (VG_(strncmp)(pattern, "soname:", 7) =3D=3D 0) {
- pattern +=3D 7;
- name =3D si->soname;
- }
-
- if (name =3D=3D NULL)
- return False;
- =20
- return VG_(string_match)(pattern, name);
-}
-
-static inline Bool from_resolved(const CodeRedirect *redir)
-{
- return redir->from_addr !=3D 0;
-}
-
-static inline Bool to_resolved(const CodeRedirect *redir)
-{
- if (redir->type =3D=3D R_REDIRECT)
- return redir->to_addr !=3D 0;
- vg_assert(redir->wrapper !=3D NULL);
- return True;
-}
-
-Bool VG_(is_resolved)(const CodeRedirect *redir)
-{
- return from_resolved(redir) && to_resolved(redir);
-}
-
-static void add_resolved(CodeRedirect *redir)
-{
- switch(redir->type) {
- case R_REDIRECT:
- if (VG_(clo_trace_redir)) {
- VG_(message)(Vg_DebugMsg, " redir resolved (%s:%s=3D%p -> ",
- redir->from_lib, redir->from_sym, redir->from_addr=
);
- VG_(message)(Vg_DebugMsg, " %s:%s=3D%p)",
- redir->to_lib, redir->to_sym, redir->to_addr);
- }
-
- if (VG_(search_transtab)(NULL, (Addr64)redir->from_addr, False)) {
- /* For some given (from, to) redir, the "from" function got
- called before the .so containing "to" became available. We
- know this because there is already a translation for the
- entry point of the original "from". So the redirect will
- never actually take effect unless that translation is
- discarded. =20
-
- Note, we only really need to discard the first bb of the
- old entry point, and so we avoid the problem of having to
- figure out how big that bb was -- since it is at least 1
- byte of original code, we can just pass 1 as the original
- size to invalidate_translations() and it will indeed get
- rid of the translation.=20
-
- Note, this is potentially expensive -- discarding
- translations causes complete unchaining. =20
- */
- if (VG_(clo_verbosity) > 2 && VG_(clo_trace_redir)) {
- VG_(message)(Vg_UserMsg, =20
- "Discarding translation due to redirect of alre=
ady called function" );
- VG_(message)(Vg_UserMsg,
- " %s (%p -> %p)",
- redir->from_sym, redir->from_addr, redir->to_ad=
dr );
- }
- VG_(discard_translations)((Addr64)redir->from_addr, 1);
- }
-
- {
- CodeRedirect *r =3D VG_(SkipList_Find_Exact)(&sk_resolved_redir=
, &redir->from_addr);
-
- if (r =3D=3D NULL)
- VG_(SkipList_Insert)(&sk_resolved_redir, redir);
- else {
- /* XXX leak redir */
- if (VG_(clo_trace_redir))
- VG_(message)(Vg_DebugMsg, " redir %s:%s:%p->%s:%s:%p dup=
licated\n",
- redir->from_lib, redir->from_sym, redir->fro=
m_addr,
- redir->to_lib, redir->to_sym, redir->to_addr=
);
- }
- }
- break;
-
- case R_WRAPPER:
- if (VG_(clo_trace_redir)) {
- VG_(message)(Vg_DebugMsg, " wrapper resolved (%s:%s=3D%p -> wr=
apper)",
- redir->from_lib, redir->from_sym, redir->from_addr=
);
- }
-
- /* XXX redir leaked */
- //VG_(wrap_function)(redir->from_addr, redir->wrapper);
- break;
-
- case R_CLIENT_WRAPPER:
- VG_(core_panic)("not implemented");
- break;
- }
-}
-
-/* Resolve a redir using si if possible, and add it to the resolved
- list */
-static Bool resolve_redir(CodeRedirect *redir, const SegInfo *si)
-{
- Bool resolved;
-
- vg_assert(si !=3D NULL);
- vg_assert(si->seg !=3D NULL);
-
- /* no redirection from Valgrind segments */
- if (si->seg->flags & SF_VALGRIND)
- return False;
-
- resolved =3D VG_(is_resolved)(redir);
-
- if (0 && VG_(clo_trace_redir))
- VG_(printf)(" consider FROM binding %s:%s -> %s:%s in %s(%s)\n",
- redir->from_lib, redir->from_sym,
- redir->to_lib, redir->to_sym,
- si->filename, si->soname);
-
- vg_assert(!resolved);
-
- if (!from_resolved(redir)) {
- vg_assert(redir->from_sym !=3D NULL);
-
- if (match_lib(redir->from_lib, si)) {
- redir->from_addr =3D VG_(reverse_search_one_symtab)(si, redir->from_sy=
m);
- if (VG_(clo_trace_redir) && redir->from_addr !=3D 0)
- VG_(printf)(" bind FROM: %p =3D %s:%s\n",=20
- redir->from_addr,redir->from_lib, redir->from_sy=
m );
- }
- }
-
- if (!to_resolved(redir)) {
- vg_assert(redir->type =3D=3D R_REDIRECT);
- vg_assert(redir->to_sym !=3D NULL);
-
- if (match_lib(redir->to_lib, si)) {
- redir->to_addr =3D VG_(reverse_search_one_symtab)(si, redir->to_sym);
- if (VG_(clo_trace_redir) && redir->to_addr !=3D 0)
- VG_(printf)(" bind TO: %p =3D %s:%s\n",=20
- redir->to_addr,redir->to_lib, redir->to_sym );
-
- }
- }
-
- resolved =3D from_resolved(redir) && to_resolved(redir);
-
- if (0 && VG_(clo_trace_redir))
- VG_(printf)("resolve_redir: %s:%s from=3D%p %s:%s to=3D%p\n",
- redir->from_lib, redir->from_sym, redir->from_addr,=20
- redir->to_lib, redir->to_sym, redir->to_addr);
-
- if (resolved) add_resolved(redir);
-
- return resolved;
-}
-
-static Bool resolve_redir_allsegs(CodeRedirect *redir)
-{
- const SegInfo *si;
-
- for(si =3D VG_(next_seginfo)(NULL);=20
- si !=3D NULL;=20
- si =3D VG_(next_seginfo)(si))
- {
- if (resolve_redir(redir, si))
- return True;
- }
- return False;
-}
-
-/* Go through the complete redir list, resolving as much as possible wit=
h this SegInfo.
-
- This should be called when a new SegInfo symtab is loaded.
- */
-void VG_(resolve_seg_redirs)(SegInfo *si)
-{
- CodeRedirect **prevp =3D &unresolved_redir;
- CodeRedirect *redir, *next;
-
- if (VG_(clo_trace_redir))
- VG_(printf)("Considering redirs to/from %s(soname=3D%s)\n",
- si->filename, si->soname);
-
- /* visit each unresolved redir - if it becomes resolved, then
- remove it from the unresolved list */
- for(redir =3D unresolved_redir; redir !=3D NULL; redir =3D next) {
- next =3D redir->next;
-
- if (resolve_redir(redir, si)) {
- *prevp =3D next;
- redir->next =3D NULL;
- } else
- prevp =3D &redir->next;
- }
-}
-
-/* Redirect a lib/symbol reference to a function at lib/symbol */
-static void add_redirect_sym_to_sym(const Char *from_lib, const Char *fr=
om_sym,
- const Char *to_lib, const Char *to_sym)
-{
- CodeRedirect *redir =3D VG_(SkipNode_Alloc)(&sk_resolved_redir);
-
- redir->type =3D R_REDIRECT;
-
- redir->from_lib =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_lib);
- redir->from_sym =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_sym);
- redir->from_addr =3D 0;
-
- redir->to_lib =3D VG_(arena_strdup)(VG_AR_SYMTAB, to_lib);
- redir->to_sym =3D VG_(arena_strdup)(VG_AR_SYMTAB, to_sym);
- redir->to_addr =3D 0;
-
- if (VG_(clo_verbosity) >=3D 2 && VG_(clo_trace_redir))
- VG_(message)(Vg_UserMsg,=20
- "REDIRECT %s(%s) to %s(%s)",
- from_lib, from_sym, to_lib, to_sym);
-
- /* Check against all existing segments to see if this redirection
- can be resolved immediately */
- if (!resolve_redir_allsegs(redir)) {
- /* nope, add to list */
- redir->next =3D unresolved_redir;
- unresolved_redir =3D redir;
- }
-}
-
-/* Redirect a lib/symbol reference to a function at addr */
-void VG_(add_redirect_sym_to_addr)(const Char *from_lib, const Char *fro=
m_sym,
- Addr to_addr)
-{
- CodeRedirect *redir =3D VG_(SkipNode_Alloc)(&sk_resolved_redir);
-
- redir->type =3D R_REDIRECT;
-
- redir->from_lib =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_lib);
- redir->from_sym =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_sym);
- redir->from_addr =3D 0;
-
- redir->to_lib =3D NULL;
- redir->to_sym =3D NULL;
- redir->to_addr =3D to_addr;
-
- if (VG_(clo_verbosity) >=3D 2 && VG_(clo_trace_redir))
- VG_(message)(Vg_UserMsg,=20
- "REDIRECT %s(%s) to %p",
- from_lib, from_sym, to_addr);
-
- /* Check against all existing segments to see if this redirection
- can be resolved immediately */
- if (!resolve_redir_allsegs(redir)) {
- /* nope, add to list */
- redir->next =3D unresolved_redir;
- unresolved_redir =3D redir;
- }
-}
-
-/* Redirect a function at from_addr to a function at to_addr */
-void VG_(add_redirect_addr_to_addr)(Addr from_addr, Addr to_addr)
-{
- CodeRedirect *redir =3D VG_(SkipNode_Alloc)(&sk_resolved_redir);
-
- redir->type =3D R_REDIRECT;
-
- redir->from_lib =3D NULL;
- redir->from_sym =3D NULL;
- redir->from_addr =3D from_addr;
-
- redir->to_lib =3D NULL;
- redir->to_sym =3D NULL;
- redir->to_addr =3D to_addr;
-
- if (VG_(clo_verbosity) >=3D 2 && VG_(clo_trace_redir))
- VG_(message)(Vg_UserMsg,=20
- "REDIRECT %p to %p",
- from_addr, to_addr);
-
- add_resolved(redir);
-}
-
-CodeRedirect *VG_(add_wrapper)(const Char *from_lib, const Char *from_sy=
m,
- const FuncWrapper *wrapper)
-{
- CodeRedirect *redir =3D VG_(SkipNode_Alloc)(&sk_resolved_redir);
-
- if (0)
- VG_(printf)("adding wrapper for %s:%s -> (%p,%p)\n",
- from_lib, from_sym, wrapper->before, wrapper->after);
-
- redir->type =3D R_WRAPPER;
-
- redir->from_lib =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_lib);
- redir->from_sym =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_sym);
- redir->from_addr =3D 0;
-
- redir->to_lib =3D NULL;
- redir->to_sym =3D NULL;
- redir->to_addr =3D 0;
-
- redir->wrapper =3D wrapper;
- =20
- /* Check against all existing segments to see if this redirection
- can be resolved immediately */
- if (!resolve_redir_allsegs(redir)) {
- /* nope, add to list */
- redir->next =3D unresolved_redir;
- unresolved_redir =3D redir;
- }
-
- return redir;
-}
-
-/* If address 'a' is being redirected, return the redirected-to
- address. */
-Addr VG_(code_redirect)(Addr a)
-{
- CodeRedirect* r;
-
- r =3D VG_(SkipList_Find_Exact)(&sk_resolved_redir, &a);
- if (r =3D=3D NULL)
- return a;
-
- vg_assert(r->to_addr !=3D 0);
-
- return r->to_addr;
-}
-
-void VG_(setup_code_redirect_table) ( void )
-{
- /* Overenthusiastic use of PLT bypassing by the glibc people also
- means we need to patch the following functions to our own
- implementations of said, in mac_replace_strmem.c.
- */
- add_redirect_sym_to_sym("soname:libc.so.6", "stpcpy",
- "*vgpreload_memcheck.so*", "stpcpy");
-
- add_redirect_sym_to_sym("soname:ld-linux.so.2", "strlen",
- "*vgpreload_memcheck.so*", "strlen");
- add_redirect_sym_to_sym("soname:libc.so.6", "strlen",
- "*vgpreload_memcheck.so*", "strlen");
-
- add_redirect_sym_to_sym("soname:libc.so.6", "strnlen",
- "*vgpreload_memcheck.so*", "strnlen");
-
- add_redirect_sym_to_sym("soname:ld-linux.so.2", "stpcpy",
- "*vgpreload_memcheck.so*", "stpcpy");
- add_redirect_sym_to_sym("soname:libc.so.6", "stpcpy",
- "*vgpreload_memcheck.so*", "stpcpy");
-
- add_redirect_sym_to_sym("soname:libc.so.6", "strchr",
- "*vgpreload_memcheck.so*", "strchr");
- add_redirect_sym_to_sym("soname:ld-linux.so.2", "strchr",
- "*vgpreload_memcheck.so*", "strchr");
-
- /* apparently index is the same thing as strchr */
- add_redirect_sym_to_sym("soname:ld-linux.so.2", "index",
- "*vgpreload_memcheck.so*", "strchr");
-
- add_redirect_sym_to_sym("soname:libc.so.6", "strchrnul",
- "*vgpreload_memcheck.so*", "glibc232_strchrnu=
l");
-
- add_redirect_sym_to_sym("soname:libc.so.6", "rawmemchr",
- "*vgpreload_memcheck.so*", "glibc232_rawmemch=
r");
-
- /* amd64-linux (glibc 2.3.3, SuSE 9.2) */
- /* apparently index is the same thing as strchr */
- add_redirect_sym_to_sym("soname:libc.so.6", "index",
- "*vgpreload_memcheck.so*", "strchr");
- add_redirect_sym_to_sym("soname:ld-linux-x86-64.so.2", "index",
- "*vgpreload_memcheck.so*", "strchr");
-
- add_redirect_sym_to_sym("soname:libc.so.6", "strcpy",
- "*vgpreload_memcheck.so*", "strcpy");
-
- add_redirect_sym_to_sym("soname:ld-linux-x86-64.so.2", "strcmp",
- "*vgpreload_memcheck.so*", "strcmp");
- add_redirect_sym_to_sym("soname:libc.so.6", "strcmp",
- "*vgpreload_memcheck.so*", "strcmp");
-
- add_redirect_sym_to_sym("soname:ld-linux-x86-64.so.2", "strlen",
- "*vgpreload_memcheck.so*", "strlen");
-}
-
-
-//:: /*------------------------------------------------------------*/
-//:: /*--- General function wrapping. ---*/
-//:: /*------------------------------------------------------------*/
-//::=20
-//:: /*=20
-//:: TODO:
-//:: - hook into the symtab machinery
-//:: - client-side wrappers?
-//:: - better interfaces for before() functions to get to arguments
-//:: - handle munmap of code (dlclose())
-//:: - handle thread exit
-//:: - handle longjmp
-//:: */
-//:: struct callkey {
-//:: ThreadId tid; /* calling thread */
-//:: Addr esp; /* address of args on stack */
-//:: Addr eip; /* return address */
-//:: };
-//::=20
-//:: struct call_instance {
-//:: struct callkey key;
-//::=20
-//:: const FuncWrapper *wrapper;
-//:: void *nonce;
-//:: };
-//::=20
-//:: static inline Addr addrcmp(Addr a, Addr b)
-//:: {
-//:: if (a < b)
-//:: return -1;
-//:: else if (a > b)
-//:: return 1;
-//:: else=20
-//:: return 0;
-//:: }
-//::=20
-//:: static inline Int cmp(UInt a, UInt b)
-//:: {
-//:: if (a < b)
-//:: return -1;
-//:: else if (a > b)
-//:: return 1;
-//:: else=20
-//:: return 0;
-//:: }
-//::=20
-//:: static Int keycmp(const void *pa, const void *pb)
-//:: {
-//:: const struct callkey *a =3D (const struct callkey *)pa;
-//:: const struct callkey *b =3D (const struct callkey *)pb;
-//:: Int ret;
-//::=20
-//:: if ((ret =3D cmp(a->tid, b->tid)))
-//:: return ret;
-//::=20
-//:: if ((ret =3D addrcmp(a->esp, b->esp)))
-//:: return ret;
-//::=20
-//:: return addrcmp(a->eip, b->eip);
-//:: }
-//::=20
-//:: /* List of wrapped call invocations which are currently active */
-//:: static SkipList wrapped_frames =3D VG_SKIPLIST_INIT(struct call_ins=
tance, key, keycmp,=20
-//:: NULL, VG_AR_SYMTAB);
-//::=20
-//:: static struct call_instance *find_call(Addr retaddr, Addr argsp, Th=
readId tid)
-//:: {
-//:: struct callkey key =3D { tid, argsp, retaddr };
-//::=20
-//:: return VG_(SkipList_Find_Exact)(&wrapped_frames, &key);
-//:: }
-//::=20
-//:: static void wrapper_return(Addr retaddr);
-//::=20
-//:: /* Called from generated code via helper */
-//:: void VG_(wrap_before)(ThreadState *tst, const FuncWrapper *wrapper)
-//:: {
-//:: Addr retaddr =3D VGA_RETADDR(tst->arch);
-//:: Addr argp =3D (Addr)&VGA_FUNC_ARG(tst->arch, 0);
-//:: void *nonce =3D NULL;
-//:: Bool mf =3D VG_(my_fault);
-//:: VG_(my_fault) =3D True;
-//::=20
-//:: if (wrapper->before) {
-//:: va_list args =3D VGA_VA_LIST(tst->arch);
-//:: nonce =3D (*wrapper->before)(args);
-//:: }
-//::=20
-//:: if (wrapper->after) {
-//:: /* If there's an after function, make sure it gets called */
-//:: struct call_instance *call;
-//::=20
-//:: call =3D find_call(retaddr, argp, tst->tid);
-//::=20
-//:: if (call !=3D NULL) {
-//:: /* Found a stale outstanding call; clean it up and recycle
-//:: the structure */
-//:: if (call->wrapper->after)
-//:: (*call->wrapper->after)(call->nonce, RT_LONGJMP, 0);
-//:: } else {
-//:: call =3D VG_(SkipNode_Alloc)(&wrapped_frames);
-//:: =20
-//:: call->key.tid =3D tst->tid;
-//:: call->key.esp =3D argp;
-//:: call->key.eip =3D retaddr;
-//::=20
-//:: VG_(SkipList_Insert)(&wrapped_frames, call);
-//::=20
-//:: wrapper_return(retaddr);
-//:: }
-//::=20
-//:: call->wrapper =3D wrapper;
-//:: call->nonce =3D nonce;
-//:: } else=20
-//:: vg_assert(nonce =3D=3D NULL);
-//::=20
-//:: VG_(my_fault) =3D mf;
-//:: }
-//::=20
-//:: /* Called from generated code via helper */
-//:: void VG_(wrap_after)(ThreadState *tst)
-//:: {
-//:: Addr EIP =3D VGA_INSTR_PTR(tst->arch); /* instruction after call=
*/
-//:: Addr ESP =3D VGA_STACK_PTR(tst->arch); /* pointer to args */
-//:: Word ret =3D VGA_RETVAL(tst->arch); /* return value */
-//:: struct call_instance *call;
-//:: Bool mf =3D VG_(my_fault);
-//::=20
-//:: VG_(my_fault) =3D True;
-//:: call =3D find_call(EIP, ESP, tst->tid);
-//::=20
-//:: if (0)
-//:: VG_(printf)("wrap_after(%p,%p,%d) -> %p\n", EIP, ESP, tst->ti=
d, call);
-//::=20
-//:: if (call !=3D NULL) {
-//:: if (call->wrapper->after)
-//:: (*call->wrapper->after)(call->nonce, RT_RETURN, ret);
-//::=20
-//:: VG_(SkipList_Remove)(&wrapped_frames, &call->key);
-//:: VG_(SkipNode_Free)(&wrapped_frames, call);
-//:: }
-//:: VG_(my_fault) =3D mf;
-//:: }
-//::=20
-//::=20
-//:: struct wrapped_function {
-//:: Addr eip; /* eip of function entrypoint */
-//:: const FuncWrapper *wrapper;
-//:: };
-//::=20
-//:: struct wrapper_return {
-//:: Addr eip; /* return address */
-//:: };
-//::=20
-//:: /* A mapping from eip of wrapped function entrypoints to actual wra=
ppers */
-//:: static SkipList wrapped_functions =3D VG_SKIPLIST_INIT(struct wrapp=
ed_function, eip, VG_(cmp_Addr),
-//:: NULL, VG_AR_SYMTAB);
-//::=20
-//:: /* A set of EIPs which are return addresses for wrapped functions *=
/
-//:: static SkipList wrapper_returns =3D VG_SKIPLIST_INIT(struct wrapper=
_return, eip, VG_(cmp_Addr),
-//:: NULL, VG_AR_SYMTAB);
-//::=20
-//:: /* Wrap function starting at eip */
-//:: void VG_(wrap_function)(Addr eip, const FuncWrapper *wrapper)
-//:: {
-//:: struct wrapped_function *func;
-//::=20
-//:: if (0)
-//:: VG_(printf)("wrapping %p with (%p,%p)\n", eip, wrapper->befor=
e, wrapper->after);
-//::=20
-//:: func =3D VG_(SkipList_Find_Exact)(&wrapped_functions, &eip);
-//::=20
-//:: if (func =3D=3D NULL) {
-//:: func =3D VG_(SkipNode_Alloc)(&wrapped_functions);
-//:: VG_(invalidate_translations)(eip, 1, True);
-//::=20
-//:: func->eip =3D eip;
-//:: VG_(SkipList_Insert)(&wrapped_functions, func);
-//:: }
-//::=20
-//:: func->wrapper =3D wrapper;
-//:: }
-//::=20
-//:: const FuncWrapper *VG_(is_wrapped)(Addr eip)
-//:: {
-//:: struct wrapped_function *func =3D VG_(SkipList_Find_Exact)(&wrap=
ped_functions, &eip);
-//::=20
-//:: if (func)
-//:: return func->wrapper;
-//:: return NULL;
-//:: }
-//::=20
-//:: Bool VG_(is_wrapper_return)(Addr eip)
-//:: {
-//:: struct wrapper_return *ret =3D VG_(SkipList_Find_Exact)(&wrapper=
_returns, &eip);
-//::=20
-//:: return ret !=3D NULL;
-//:: }
-//::=20
-//:: /* Mark eip as being the return address of a wrapper, so that the
-//:: codegen will generate the appropriate call. */
-//:: void wrapper_return(Addr eip)
-//:: {
-//:: struct wrapper_return *ret;
-//::=20
-//:: if (VG_(is_wrapper_return)(eip))
-//:: return;
-//::=20
-//:: VG_(invalidate_translations)(eip, 1, True);
-//::=20
-//:: ret =3D VG_(SkipNode_Alloc)(&wrapper_returns);
-//:: ret->eip =3D eip;
-//::=20
-//:: VG_(SkipList_Insert)(&wrapper_returns, ret);
-//:: }
Modified: trunk/coregrind/vg_symtab2.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_symtab2.c 2005-05-29 16:23:17 UTC (rev 3807)
+++ trunk/coregrind/vg_symtab2.c 2005-05-29 17:01:48 UTC (rev 3808)
@@ -36,6 +36,7 @@
#include "pub_core_aspacemgr.h"
#include "pub_core_demangle.h"
#include "pub_core_options.h"
+#include "pub_core_redir.h"
#include "pub_core_tooliface.h"
=20
#include <elf.h> /* ELF defns */
Modified: trunk/coregrind/x86-linux/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/x86-linux/Makefile.am 2005-05-29 16:23:17 UTC (rev 38=
07)
+++ trunk/coregrind/x86-linux/Makefile.am 2005-05-29 17:01:48 UTC (rev 38=
08)
@@ -4,9 +4,3 @@
noinst_HEADERS =3D \
core_platform.h \
vki_unistd.h
-
-noinst_LIBRARIES =3D libplatform.a
-
-
-libplatform_a_SOURCES =3D \
- core_platform.c
Deleted: trunk/coregrind/x86-linux/core_platform.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/x86-linux/core_platform.c 2005-05-29 16:23:17 UTC (re=
v 3807)
+++ trunk/coregrind/x86-linux/core_platform.c 2005-05-29 17:01:48 UTC (re=
v 3808)
@@ -1,11 +0,0 @@
-#include "core.h"
-
-void VGP_(setup_redirects)(void)
-{
- /* Redirect _dl_sysinfo_int80, which is glibc's default system call
- routine, to the routine in our trampoline page so that the
- special sysinfo unwind hack in vg_execontext.c will kick in.
- */
- VG_(add_redirect_sym_to_addr)("soname:ld-linux.so.2", "_dl_sysinfo_in=
t80",
- VG_(client_trampoline_code)+VG_(tramp_s=
yscall_offset));
-}
|
|
From: <sv...@va...> - 2005-05-29 16:23:19
|
Author: njn
Date: 2005-05-29 17:23:17 +0100 (Sun, 29 May 2005)
New Revision: 3807
Modified:
trunk/coregrind/x86-linux/core_platform.h
Log:
Remove remnants of the futex-based semaphore implementation.
Modified: trunk/coregrind/x86-linux/core_platform.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/x86-linux/core_platform.h 2005-05-29 16:05:37 UTC (re=
v 3806)
+++ trunk/coregrind/x86-linux/core_platform.h 2005-05-29 16:23:17 UTC (re=
v 3807)
@@ -73,74 +73,6 @@
a6 =3D arg_block[5]; \
} while (0)
=20
-/* ---------------------------------------------------------------------
- Inline asm for atomic operations for use with futexes
- Taken from futex-2.2/i386.h
- ------------------------------------------------------------------ */
-/* (C) Matthew Kirkwood <ma...@ha...>
- (C) 2002 Rusty Russell IBM <ru...@ru...>
- */
-
-/* Atomic dec: return new value. */
-static __inline__ Int __futex_down(Int *counter)
-{
- Int val;
- UChar eqz;
-
- /* Don't decrement if already negative. */
- val =3D *counter;
- if (val < 0)
- return val;
-
- /* Damn 386: no cmpxchg... */
- __asm__ __volatile__(
- "lock; decl %0; sete %1"
- :"=3Dm" (*counter), "=3Dqm" (eqz)
- :"m" (*counter) : "memory");
-
- /* We know if it's zero... */
- if (eqz) return 0;
- /* Otherwise, we have no way of knowing value. Guess -1 (if
- we're wrong we'll spin). */
- return -1;
-}
-
-/* Atomic inc: return 1 if counter incremented from 0 to 1. */
-static __inline__ Int __futex_up(Int *c)
-{
- Int r =3D 1;
-
- /* This actually tests if result >=3D 1. Damn 386. --RR */
- __asm__ __volatile__ (
- " lock; incl %1\n"
- " jg 1f\n"
- " decl %0\n"
- "1:\n"
- : "=3Dq"(r), "=3Dm"(*c) : "0"(r)
- );
- return r;
-}
-
-/* Simple atomic increment. */
-static __inline__ void __atomic_inc(Int *c)
-{
- __asm__ __volatile__(
- "lock; incl %0"
- :"=3Dm" (*c)
- :"m" (*c));
-}
-
-
-/* Commit the write, so it happens before we send the semaphore to
- anyone else */
-static __inline__ void __futex_commit(void)
-{
- /* Probably overkill, but some non-Intel clones support
- out-of-order stores, according to 2.5.5-pre1's
- linux/include/asm-i386/system.h */
- __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory");
-}
-
#endif // __X86_LINUX_CORE_PLATFORM_H
=20
/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2005-05-29 16:05:46
|
Author: njn
Date: 2005-05-29 17:05:37 +0100 (Sun, 29 May 2005)
New Revision: 3806
Modified:
trunk/coregrind/linux/core_os.h
trunk/coregrind/linux/sema.c
Log:
Removed the unused futex-based semaphore implementation. It can be
added back in later if necessary.
Modified: trunk/coregrind/linux/core_os.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/linux/core_os.h 2005-05-25 21:30:05 UTC (rev 3805)
+++ trunk/coregrind/linux/core_os.h 2005-05-29 16:05:37 UTC (rev 3806)
@@ -32,61 +32,8 @@
#ifndef __LINUX_CORE_OS_H
#define __LINUX_CORE_OS_H
=20
-#define FUTEX_SEMA 0
-
-#if FUTEX_SEMA
-/* ---------------------------------------------------------------------
- Definition for a semaphore. Defined in terms of futex.
-
- Futex semaphore operations taken from futex-2.2/usersem.h
- ------------------------------------------------------------------ */
+/* Not really a semaphore, but use a pipe for a token-passing scheme */
typedef struct {
- int count;
-} vg_sema_t;
-
-extern Int __futex_down_slow(vg_sema_t *, int, struct vki_timespec *);
-extern Int __futex_up_slow(vg_sema_t *);
-
-void VGO_(sema_init)(vg_sema_t *);
-static inline void VGO_(sema_deinit)(vg_sema_t *)=20
-{
-}
-
-static inline void VGO_(sema_down)(vg_sema_t *futx)
-{
- Int val, woken =3D 0;
-
- /* Returns new value */
- while ((val =3D __futex_down(&futx->count)) !=3D 0) {
- Int ret =3D __futex_down_slow(futx, val, NULL);
- if (ret < 0)=20
- return; /* error */
- else if (ret =3D=3D 1)
- return; /* passed */
- else if (ret =3D=3D 0)
- woken =3D 1; /* slept */
- else
- /* loop */;
- }
- /* If we were woken, someone else might be sleeping too: set to -1 */
- if (woken) {
- futx->count =3D -1;
- }
- return;
-}
-
-/* If __futex_up increments count from 0 -> 1, noone was waiting.
- Otherwise, set to 1 and tell kernel to wake them up. */
-static inline void VGO_(sema_up)(vg_sema_t *futx)
-{
- if (!__futex_up(&futx->count))
- __futex_up_slow(futx);
-}
-#else /* !FUTEX_SEMA */
-/*=20
- Not really a semaphore, but use a pipe for a token-passing scheme
- */
-typedef struct {
Int pipe[2];
Int owner_thread; /* who currently has it */
} vg_sema_t;
@@ -96,8 +43,6 @@
void VGO_(sema_down)(vg_sema_t *sema);
void VGO_(sema_up)(vg_sema_t *sema);
=20
-#endif /* FUTEX_SEMA */
-
/* OS-specific thread state */
typedef struct {
/* who we are */
Modified: trunk/coregrind/linux/sema.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/linux/sema.c 2005-05-25 21:30:05 UTC (rev 3805)
+++ trunk/coregrind/linux/sema.c 2005-05-29 16:05:37 UTC (rev 3806)
@@ -31,58 +31,9 @@
=20
#include "core.h"
=20
-#if FUTEX_SEMA
/*=20
- Futex-based semaphore operations.
-
- Taken from futex-2.2/usersem.c
- Based on work by Matthew Kirkwood <ma...@ha...>.=20
-*/
-
-#define FUTEX_PASSED (-(1024 * 1024 * 1024))
-
-static inline Int sys_futex(Int *futex, Int op, Int val, struct vki_time=
spec *rel)
-{
- return VG_(do_syscall)(__NR_futex, futex, op, val, rel);
-}
-
-/* Returns -1 on fail, 0 on wakeup, 1 on pass, 2 on didn't sleep */
-int __futex_down_slow(vg_sema_t *futx, int val, struct vki_timespec *rel=
)
-{
- Int ret;
-
- ret =3D sys_futex(&futx->count, VKI_FUTEX_WAIT, val, rel);
- if (ret =3D=3D 0) {
- /* <=3D in case someone else decremented it */
- if (futx->count <=3D FUTEX_PASSED) {
- futx->count =3D -1;
- return 1;
- }
- return 0;
- }
- /* EWOULDBLOCK just means value changed before we slept: loop */
- if (ret =3D=3D -VKI_EWOULDBLOCK)
- return 2;
- return -1;
-}
-
-int __futex_up_slow(vg_sema_t *futx)
-{
- futx->count =3D 1;
- __futex_commit();
- return sys_futex(&futx->count, VKI_FUTEX_WAKE, 1, NULL);
-}
-
-void VGO_(sema_init)(vg_sema_t *sema)
-{
- sema->count =3D 1;
- __futex_commit();
-}
-
-#else /* !FUTEX_SEMA */
-
-/*=20
- Slower but more portable pipe-based token passing scheme.
+ Slower (than the removed futex-based sema scheme) but more portable
+ pipe-based token passing scheme.
*/
=20
void VGO_(sema_init)(vg_sema_t *sema)
@@ -139,8 +90,6 @@
vg_assert(ret =3D=3D 1);
}
=20
-#endif /* FUTEX_SEMA */
-
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
|
|
From: Jeremy F. <je...@go...> - 2005-05-29 05:28:45
|
Ashley Pittman wrote:
>It's somewhat complicated...
>
>
Er, yep.
>the parent thread calls elan3_detach (an ioctl) and the device driver
>sets some state and wakes up the kernel thread sitting in the lwp ioctl.
>This thread then returns done and the lwp exits. Other than that the
>lwp only returns to user-space to take signals.
>
>
So what makes it return done? What triggers that event?
>That's the theory anyway, it's complicated by the fact that we have
>kernel patches (not just modules) to provide "ptrack" functionality,
>basically the job starts in a container and when the job finishes all
>processes (and sys-v stuff) created in that container also get
>destroyed.
>
>
Is this some extra kernel state which Valgrind needs to understand to do
a correct emulation? How are these containers created? In this case,
would the program running under valgrind create a new container which is
expected to mop up all the threads when the main thread exits? How is a
"job" defined?
>If you are using rms/pdsh/slurm to start jobs then you will be using the
>ptrack code (it's done by the open source "rms" kernel module), if you
>are just running your programs by hand then you won't have the ptrack
>stuff.
>
>It's purpose is to make syscalls on behalf of the nic, the c code on the
>nic sets up a descriptor, generates and interrupt which the lower half
>forwards onto the lwp kernel thread. This thread then makes syscalls
>back into the kernel from the top half as the appropriate user with
>suitable permissions.
>
>
Hm, I think I follow, but I don't see at what point it depends on the
initial thread terminating before one of the child threads (or when they
should all exit together).
In the 2.6 NPTL thread model, exit_group() terminates all threads in the
thread group atomically, so there's no waiting around for things to
terminate (or dependence on termination order). Is this running in a
2.4 thread model, or a 2.6 one? It sounds like the container machinery
has an atomic group termination property similar to exit_group().
J
J
|
|
From: <js...@ac...> - 2005-05-29 02:50:08
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-05-29 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow Nightly build on phoenix ( SuSE 9.1 ) started at 2005-05-29 03:50:00 BST |
|
From: Tom H. <to...@co...> - 2005-05-29 02:35:49
|
Nightly build on dunsmere ( athlon, Fedora Core 3 ) started at 2005-05-29 03:30:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 176 tests, 8 stderr failures, 1 stdout failure ================= memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-29 02:30:40
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-05-29 03:25:01 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 175 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-29 02:20:25
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-05-29 03:15:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 174 tests, 13 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-29 02:19:40
|
Nightly build on dellow ( x86_64, Fedora Core 3 ) started at 2005-05-29 03:10:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 155 tests, 15 stderr failures, 2 stdout failures ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/yield (stdout) |
|
From: Tom H. <th...@cy...> - 2005-05-29 02:05:20
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-05-29 03:00:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 155 tests, 16 stderr failures, 1 stdout failure ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) |
|
From: <js...@ac...> - 2005-05-28 02:50:05
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-05-28 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow Nightly build on phoenix ( SuSE 9.1 ) started at 2005-05-28 03:50:00 BST |
|
From: Tom H. <to...@co...> - 2005-05-28 02:35:59
|
Nightly build on dunsmere ( athlon, Fedora Core 3 ) started at 2005-05-28 03:30:04 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 176 tests, 8 stderr failures, 1 stdout failure ================= memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-28 02:30:32
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-05-28 03:25:01 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 175 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-28 02:20:37
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-05-28 03:15:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 174 tests, 13 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-28 02:19:53
|
Nightly build on dellow ( x86_64, Fedora Core 3 ) started at 2005-05-28 03:10:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 155 tests, 15 stderr failures, 1 stdout failure ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-28 02:05:12
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-05-28 03:00:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 155 tests, 16 stderr failures, 1 stdout failure ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) |
|
From: <js...@ac...> - 2005-05-27 02:50:14
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-05-27 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow Nightly build on phoenix ( SuSE 9.1 ) started at 2005-05-27 03:50:00 BST |
|
From: Tom H. <to...@co...> - 2005-05-27 02:35:50
|
Nightly build on dunsmere ( athlon, Fedora Core 3 ) started at 2005-05-27 03:30:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 176 tests, 8 stderr failures, 1 stdout failure ================= memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-27 02:31:50
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-05-27 03:25:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 175 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-27 02:25:31
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-05-27 03:20:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 174 tests, 5 stderr failures, 1 stdout failure ================= memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/map_unmap (stdout) none/tests/map_unmap (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-27 02:20:23
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-05-27 03:15:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 174 tests, 13 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-27 02:19:38
|
Nightly build on dellow ( x86_64, Fedora Core 3 ) started at 2005-05-27 03:10:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 155 tests, 15 stderr failures, 1 stdout failure ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-27 02:05:13
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-05-27 03:00:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 155 tests, 16 stderr failures, 1 stdout failure ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) |