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
(36) |
2
(30) |
|
3
(17) |
4
(21) |
5
(18) |
6
(14) |
7
(23) |
8
(12) |
9
(11) |
|
10
(11) |
11
(12) |
12
(11) |
13
(12) |
14
(11) |
15
(11) |
16
(15) |
|
17
(12) |
18
(15) |
19
(15) |
20
(25) |
21
(26) |
22
(21) |
23
(18) |
|
24
(25) |
25
(28) |
26
(27) |
27
(32) |
28
(13) |
29
(12) |
30
(10) |
|
From: <sv...@va...> - 2005-04-02 17:43:55
|
Author: tom
Date: 2005-04-02 18:43:50 +0100 (Sat, 02 Apr 2005)
New Revision: 3511
Modified:
trunk/coregrind/amd64-linux/syscalls.c
Log:
More amd64 system calls - emacs will now run under valgrind.
Modified: trunk/coregrind/amd64-linux/syscalls.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/syscalls.c 2005-04-02 17:38:59 UTC (rev 3=
510)
+++ trunk/coregrind/amd64-linux/syscalls.c 2005-04-02 17:43:50 UTC (rev 3=
511)
@@ -943,9 +943,9 @@
GENX_(__NR_pause, sys_pause), // 34=20
=20
GENXY(__NR_nanosleep, sys_nanosleep), // 35=20
- // (__NR_getitimer, sys_getitimer), // 36=20
+ GENXY(__NR_getitimer, sys_getitimer), // 36=20
GENX_(__NR_alarm, sys_alarm), // 37=20
- // (__NR_setitimer, sys_setitimer), // 38=20
+ GENXY(__NR_setitimer, sys_setitimer), // 38=20
GENX_(__NR_getpid, sys_getpid), // 39=20
=20
// (__NR_sendfile, sys_sendfile64), // 40=20
@@ -1034,7 +1034,7 @@
=20
GENX_(__NR_getppid, sys_getppid), // 110=20
GENX_(__NR_getpgrp, sys_getpgrp), // 111=20
- // (__NR_setsid, sys_setsid), // 112=20
+ GENX_(__NR_setsid, sys_setsid), // 112=20
// (__NR_setreuid, sys_setreuid), // 113=20
// (__NR_setregid, sys_setregid), // 114=20
=20
@@ -1045,7 +1045,7 @@
LINX_(__NR_setresgid, sys_setresgid), // 119=20
=20
LINXY(__NR_getresgid, sys_getresgid), // 120=20
- // (__NR_getpgid, sys_getpgid), // 121=20
+ GENX_(__NR_getpgid, sys_getpgid), // 121=20
// (__NR_setfsuid, sys_setfsuid), // 122=20
// (__NR_setfsgid, sys_setfsgid), // 123=20
// (__NR_getsid, sys_getsid), // 124=20
|
|
From: <sv...@va...> - 2005-04-02 17:39:05
|
Author: sewardj
Date: 2005-04-02 18:38:59 +0100 (Sat, 02 Apr 2005)
New Revision: 3510
Added:
trunk/coregrind/vg_replace_malloc.c
Removed:
trunk/coregrind/gen_intercepts.pl
trunk/coregrind/vg_replace_malloc.c.base
Modified:
trunk/coregrind/Makefile.am
trunk/coregrind/core.h
trunk/coregrind/vg_symtab2.c
Log:
A major overhaul of how malloc/free intercepts are done. The general
idea is the same -- write functions with special names encoding
sonames and fn names, and have the redir mechanism notice them.
However the way the functions are generated is significantly changed:
* The name mangling scheme has been replaced with one which is just about
simple enough not to need a preprocessing phase. Hence
vg_replace_malloc.c.base is replaced by vg_replace_malloc.c, and
the preprocessor disappears. The demangler in vg_symtab2.c changes
accordingly.
* Kill off the horrendous LIBALIAS macro. In return we have to
enumerate all the redirections longhand, but this is not a big deal.
* Remove use of the GNUisms "attribute alias" and "attribute
protected".
* Remove the hardwired assumption that any C++ new/new[]/etc symbols
we might want to intercept are mangled in GNU style.
* Add more comments.
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-04-02 17:30:19 UTC (rev 3509)
+++ trunk/coregrind/Makefile.am 2005-04-02 17:38:59 UTC (rev 3510)
@@ -37,10 +37,10 @@
EXTRA_DIST =3D \
valgrind.vs \
gen_toolint.pl toolfuncs.def \
- gen_intercepts.pl vg_replace_malloc.c.base
+ gen_intercepts.pl
=20
BUILT_SOURCES =3D vg_toolint.c vg_toolint.h
-CLEANFILES =3D vg_toolint.c vg_toolint.h vg_replace_malloc.c
+CLEANFILES =3D vg_toolint.c vg_toolint.h
=20
valgrind_SOURCES =3D \
ume.c \
@@ -61,6 +61,7 @@
vg_demangle.c \
vg_errcontext.c \
vg_hashtable.c \
+ vg_replace_malloc.c \
vg_main.c \
vg_malloc2.c \
vg_memory.c \
@@ -114,10 +115,6 @@
stage2_LDADD=3D $(stage2_extra) -ldl
=20
=20
-vg_replace_malloc.c: $(srcdir)/gen_intercepts.pl $(srcdir)/vg_replace_ma=
lloc.c.base
- rm -f $@
- $(PERL) $(srcdir)/gen_intercepts.pl < $(srcdir)/vg_replace_malloc.c.bas=
e > $@
-
vg_toolint.c: $(srcdir)/gen_toolint.pl $(srcdir)/toolfuncs.def ./Makefil=
e
rm -f $@
$(PERL) $(srcdir)/gen_toolint.pl callwrap < $(srcdir)/toolfuncs.def=
> $@ || rm -f $@
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-04-02 17:30:19 UTC (rev 3509)
+++ trunk/coregrind/core.h 2005-04-02 17:38:59 UTC (rev 3510)
@@ -468,15 +468,18 @@
A synonym for exit. */
#define VG_USERREQ__LIBC_FREERES_DONE 0x3029
=20
-#define VG_INTERCEPT_PREFIX "_vgi__"
-#define VG_INTERCEPT_PREFIX_LEN 6
-#define VG_INTERCEPT(name) _vgi__##name
-#define VG_INTERCEPT_ALIAS(name) "_vgi__" #name
+/* Intercept prefix stuff. See coregrind/vg_replace_malloc.c for
+ details. Unfortunately the "_vgi_" literal is also hardcoded in
+ that file, so if you change this one you must also change the other
+ one. */
+#define VG_INTERCEPT_PREFIX "_vgi_"
+#define VG_INTERCEPT_PREFIX_LEN 5
=20
-#define VG_WRAPPER_PREFIX "_vgw__"
-#define VG_WRAPPER_PREFIX_LEN 6
-#define VG_WRAPPER(name) _vgw__##name
-#define VG_WRAPPER_ALIAS(name) "_vgw__" #name
+/* Not sure what these are for. Todo: clarify */
+#define VG_WRAPPER_PREFIX "_vgw_"
+#define VG_WRAPPER_PREFIX_LEN 5
+#define VG_WRAPPER(name) _vgw_##name
+#define VG_WRAPPER_ALIAS(name) "_vgw_" #name
=20
=20
struct vg_mallocfunc_info {
Deleted: trunk/coregrind/gen_intercepts.pl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/gen_intercepts.pl 2005-04-02 17:30:19 UTC (rev 3509)
+++ trunk/coregrind/gen_intercepts.pl 2005-04-02 17:38:59 UTC (rev 3510)
@@ -1,49 +0,0 @@
-#!/usr/bin/perl -w
-
-# This file is part of Valgrind, a dynamic binary instrumentation
-# framework.
-#
-# Copyright (C) 2000-2005 Julian Seward=20
-# 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.
-
-use strict;
-
-while(<>) {
- if(/VG_INTERCEPT\s*\(\s*(.*?)\s*,\s*(.*?)\s*\)/) {
- my $ver =3D $1 . ":" . $2;
- ($ver =3D~ /J/) and die "Argh, 'J' in intercept muck...";
- $ver =3D~ s/\*/J2A/g;
- $ver =3D~ s/\+/J2B/g;
- $ver =3D~ s/\-/J2D/g;
- $ver =3D~ s/\./J2E/g;
- $ver =3D~ s/\:/J3A/g;
- s/VG_INTERCEPT\s*\(\s*(.*?)\s*,\s*(.*?)\s*\)/VG_INTERCEPT($ver)/g;
- } elsif(/VG_INTERCEPT_ALIAS\s*\(\s*(.*?)\s*,\s*(.*?)\s*\)/) {
- my $ver =3D $1 . ":" . $2;
- ($ver =3D~ /J/) and die "Argh, 'J' in intercept muck...";
- $ver =3D~ s/\*/J2A/g;
- $ver =3D~ s/\+/J2B/g;
- $ver =3D~ s/\-/J2D/g;
- $ver =3D~ s/\./J2E/g;
- $ver =3D~ s/\:/J3A/g;
- s/VG_INTERCEPT_ALIAS\s*\(\s*(.*?)\s*,\s*(.*?)\s*\)/VG_INTERCEPT_ALIA=
S($ver)/g;
- }
- print $_;
-}
Added: trunk/coregrind/vg_replace_malloc.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_replace_malloc.c 2005-04-02 17:30:19 UTC (rev 3509=
)
+++ trunk/coregrind/vg_replace_malloc.c 2005-04-02 17:38:59 UTC (rev 3510=
)
@@ -0,0 +1,525 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Replacements for malloc() et al, which run on the simulated ---*/
+/*--- CPU. vg_replace_malloc.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward=20
+ 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.
+*/
+
+/* ---------------------------------------------------------------------
+ All the code in this file runs on the SIMULATED CPU. It is intended
+ for various reasons as drop-in replacements for malloc() and friends.
+ These functions have global scope, but are not intended to be called
+ directly. See the comments in coregrind/vg_intercept.c for the
+ gory details.
+
+ This file can be linked into the injected so file for any tool that
+ wishes to know about calls to malloc(). It should define functions
+ TL_(malloc) et al that will be called.
+ ------------------------------------------------------------------ */
+
+#include "valgrind.h" /* for VALGRIND_NON_SIMD_CALL[12] */
+#include "core.h"
+
+/* The general idea is: you can write a function like this:
+
+ retty ENCODE(foo, bar) ( ... args ... )
+ {
+ ... body ...
+ }
+
+ If foo is a Z-encoded soname and bar is an unencoded fn name, then
+ the core's symbol-table reading machinery and redirection machinery
+ will conspire to cause calls to the function 'bar' in object with
+ soname 'foo' to actually be routed to the function written here.
+ We use this below to define dozens of replacements of malloc, free,
+ etc.
+
+ The soname must be a Z-encoded bit of text because sonames can
+ contain dots etc which are not valid symbol names. However, it is
+ better not to Z-encode the function name, because C++ function names
+ are already mangled, and we don't want our own Z encoding to interact
+ badly with them; furthermore there's no point, because mangled C++
+ function names are by definition already valid symbol names.
+ =20
+ It is important that the Z-encoded soname contains no unencoded=20
+ underscores, since the intercept-handlers in vg_symtab2.c detect
+ the end of the soname by looking for the first trailing underscore.
+*/
+
+/* We use a Z-encoding scheme here, a la GHC. This is just about
+ readable enough to make a preprocessor unnecessary.
+
+ The intercept-me function names are encoded as
+
+ _vgi_zEncodedSoname_fnname
+
+ where soname is Z-encoded but fnname isn't.
+
+ The Z-encoding scheme is as follows:
+
+ * --> Za (asterisk)
+ + --> Zp
+ : --> Zc
+ . --> Zd
+ _ --> Zu
+ (space) --> Zs
+ Z --> ZZ
+*/
+
+
+/* It would be nice to be able to write VG_INTERCEPT_PREFIX instead of
+ "_vgi_" here, but I can't figure out how to get cpp to cooperate.
+ If you change this "_vgi_" you should also change the definitiion
+ of VG_INTERCEPT_PREFIX in core.h accordingly.
+*/
+#define ENCODE(libname,fnname) _vgi_##libname##_##fnname
+
+
+/* Some handy mangled names */
+#define m_libstc_plus_plus_star libstdcZpZpZa // libstdc++*
+#define m_libc_dot_so_dot_6 libcZdsoZd6 // libc.so.6
+//#define m_libpgc_dot_so libpgcZdso // libpgc.so
+
+/* 2 Apr 05: the Portland Group compiler, which uses cfront/ARM style
+ mangling, could be supported properly by the redirects in this
+ module. Except we can't because it doesn't put its allocation
+ functions in libpgc.so but instead hardwires them into the
+ compilation unit holding main(), which makes them impossible to
+ intercept directly. Fortunately those fns seem to route everything
+ through to malloc/free.
+*/
+
+extern void _exit(int);
+
+/*------------------------------------------------------------*/
+/*--- Replacing malloc() et al ---*/
+/*------------------------------------------------------------*/
+
+/* This struct is initially empty. Before the first use of any of
+ these functions, we make a client request which fills in the
+ fields.=20
+*/
+static struct vg_mallocfunc_info info;
+static int init_done;
+
+/* Startup hook - called as init section */
+static void init(void) __attribute__((constructor));
+
+// Functions for printing from code within Valgrind, but which runs on t=
he
+// sim'd CPU. They must be functions rather than macros so that va_list=
can
+// be used.
+// Nb: at one point, these were used by multiple files that run on the s=
im'd
+// CPU, and so were *defined* in core.h with the 'weak' attribute. That=
was
+// pretty ugly. It's much better if this is the only file that needs th=
em.
+
+__attribute__((format(__printf__, 1, 2)))
+static int
+internal_printf(char *format, ...)
+{
+ UWord _qzz_res =3D 0;
+ va_list vargs;
+ va_start(vargs, format);
+ VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__INTERNAL_PRINTF,
+ (UWord)format, (UWord)vargs, 0, 0);
+ va_end(vargs);
+ return _qzz_res;
+}
+
+#define MALLOC_TRACE(format, args...) \
+ if (info.clo_trace_malloc) \
+ internal_printf(format, ## args )
+
+#define MAYBE_SLOPPIFY(n) \
+ if (info.clo_sloppy_malloc) { \
+ n =3D (n+(VG_SLOPPY_MALLOC_SZB-1)) & ~(VG_SLOPPY_MALLOC_SZB-1); \
+ }
+
+
+/* Below are new versions of malloc, __builtin_new, free,=20
+ __builtin_delete, calloc, realloc, memalign, and friends.
+
+ None of these functions are called directly - they are not meant to
+ be found by the dynamic linker. But ALL client calls to malloc() and
+ friends wind up here eventually. They get called because vg_replace_=
malloc
+ installs a bunch of code redirects which causes Valgrind to use these
+ functions rather than the ones they're replacing.
+*/
+
+/* Generate a replacement for 'fnname' in object 'soname', which calls
+ 'vg_replacement' to allocate memory. If that fails, return NULL.
+*/
+#define ALLOC_or_NULL(soname, fnname, vg_replacement) \
+ \
+ void* ENCODE(soname,fnname) (SizeT n); \
+ void* ENCODE(soname,fnname) (SizeT n) \
+ { \
+ void* v; \
+ \
+ MALLOC_TRACE(#fnname "(%llu)", (ULong)n ); \
+ MAYBE_SLOPPIFY(n); \
+ if (!init_done) init(); \
+ \
+ v =3D (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, n =
); \
+ MALLOC_TRACE(" =3D %p", v ); \
+ return v; \
+ }
+
+
+/* Generate a replacement for 'fnname' in object 'soname', which calls
+ 'vg_replacement' to allocate memory. If that fails, it bombs the
+ system.
+*/
+#define ALLOC_or_BOMB(soname, fnname, vg_replacement) \
+ \
+ void* ENCODE(soname,fnname) (SizeT n); \
+ void* ENCODE(soname,fnname) (SizeT n) \
+ { \
+ void* v; \
+ \
+ MALLOC_TRACE(#fnname "(%llu)", (ULong)n ); \
+ MAYBE_SLOPPIFY(n); \
+ if (!init_done) init(); \
+ \
+ v =3D (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, n =
); \
+ MALLOC_TRACE(" =3D %p", v ); \
+ if (NULL =3D=3D v) { \
+ VALGRIND_PRINTF_BACKTRACE( \
+ "new/new[] failed and should throw an exception, but Valgrin=
d\n" \
+ " cannot throw exceptions and so is aborting instead. Sor=
ry."); \
+ _exit(1); \
+ } \
+ return v; \
+ }
+
+// Each of these lines generates a replacement function:
+// (from_so, from_fn, v's replacement)
+
+// malloc
+ALLOC_or_NULL(m_libstc_plus_plus_star, malloc, malloc);
+ALLOC_or_NULL(m_libc_dot_so_dot_6, malloc, malloc);
+//ALLOC_or_NULL(m_libpgc_dot_so, malloc, malloc);
+
+// operator new(unsigned int), GNU mangling
+ALLOC_or_BOMB(m_libstc_plus_plus_star, builtin_new, __builtin_new);
+ALLOC_or_BOMB(m_libc_dot_so_dot_6, builtin_new, __builtin_new);
+
+ALLOC_or_BOMB(m_libstc_plus_plus_star, __builtin_new, __builtin_new);
+ALLOC_or_BOMB(m_libc_dot_so_dot_6, __builtin_new, __builtin_new);
+
+ALLOC_or_BOMB(m_libstc_plus_plus_star, _Znwj, __builtin_new);
+ALLOC_or_BOMB(m_libc_dot_so_dot_6, _Znwj, __builtin_new);
+
+// operator new(unsigned int), ARM/cfront mangling
+//ALLOC_or_BOMB(m_libpgc_dot_so, __nw__FUi, __builtin_new);
+
+// operator new(unsigned, std::nothrow_t const&), GNU mangling
+ALLOC_or_NULL(m_libstc_plus_plus_star, _ZnwjRKSt9nothrow_t, __builtin_n=
ew);
+ALLOC_or_NULL(m_libc_dot_so_dot_6, _ZnwjRKSt9nothrow_t, __builtin_n=
ew);
+
+// operator new[](unsigned int), GNU mangling
+ALLOC_or_BOMB(m_libstc_plus_plus_star, __builtin_vec_new, __builtin_vec_=
new );
+ALLOC_or_BOMB(m_libc_dot_so_dot_6, __builtin_vec_new, __builtin_vec_=
new );
+ALLOC_or_BOMB(m_libstc_plus_plus_star, _Znaj, __builtin_vec_=
new );
+ALLOC_or_BOMB(m_libc_dot_so_dot_6, _Znaj, __builtin_vec_=
new );
+
+// operator new[](unsigned, std::nothrow_t const&), GNU mangling
+ALLOC_or_NULL(m_libstc_plus_plus_star, _ZnajRKSt9nothrow_t, __builtin_ve=
c_new );
+ALLOC_or_NULL(m_libc_dot_so_dot_6, _ZnajRKSt9nothrow_t, __builtin_ve=
c_new );
+
+
+/* Generate a replacement for 'fnname' in object 'soname', which calls
+ 'vg_replacement' to free previously allocated memory.
+*/
+#define FREE(soname, fnname, vg_replacement) \
+ \
+ void ENCODE(soname,fnname) (void *p); \
+ void ENCODE(soname,fnname) (void *p) \
+ { \
+ MALLOC_TRACE(#vg_replacement "(%p)", p ); \
+ if (p =3D=3D NULL) \
+ return; \
+ if (!init_done) init(); \
+ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \
+ }
+
+// free
+FREE(m_libstc_plus_plus_star, free, free );
+FREE(m_libc_dot_so_dot_6, free, free );
+
+// cfree
+FREE(m_libstc_plus_plus_star, cfree, free );
+FREE(m_libc_dot_so_dot_6, cfree, free );
+
+// do we really need these?
+FREE(m_libstc_plus_plus_star, __builtin_delete, __builtin_delete );
+FREE(m_libc_dot_so_dot_6, __builtin_delete, __builtin_delete );
+
+// operator delete(void*), GNU mangling
+FREE(m_libstc_plus_plus_star, _ZdlPv, __builtin_delete );
+FREE(m_libc_dot_so_dot_6, _ZdlPv, __builtin_delete );
+
+// operator delete(void*, std::nothrow_t const&), GNU mangling
+FREE(m_libstc_plus_plus_star, _ZdlPvRKSt9nothrow_t, __builtin_delete );
+FREE(m_libc_dot_so_dot_6, _ZdlPvRKSt9nothrow_t, __builtin_delete );
+
+// operator delete[](void*), GNU mangling
+FREE(m_libstc_plus_plus_star, __builtin_vec_delete, __builtin_vec_delet=
e );
+FREE(m_libc_dot_so_dot_6, __builtin_vec_delete, __builtin_vec_delet=
e );
+FREE(m_libstc_plus_plus_star, _ZdaPv, __builtin_vec_delet=
e );
+FREE(m_libc_dot_so_dot_6, _ZdaPv, __builtin_vec_delet=
e );
+
+// operator delete[](void*, std::nothrow_t const&), GNU mangling
+FREE(m_libstc_plus_plus_star, _ZdaPvRKSt9nothrow_t, __builtin_vec_delet=
e );
+FREE(m_libc_dot_so_dot_6, _ZdaPvRKSt9nothrow_t, __builtin_vec_delet=
e );
+
+
+#define CALLOC(soname, fnname) \
+ \
+ void* ENCODE(soname,fnname) ( SizeT nmemb, SizeT size ); \
+ void* ENCODE(soname,fnname) ( SizeT nmemb, SizeT size ) \
+ { \
+ void* v; \
+ \
+ MALLOC_TRACE("calloc(%llu,%llu)", (ULong)nmemb, (ULong)size ); \
+ MAYBE_SLOPPIFY(size); \
+ \
+ if (!init_done) init(); \
+ v =3D (void*)VALGRIND_NON_SIMD_CALL2( info.tl_calloc, nmemb, size =
); \
+ MALLOC_TRACE(" =3D %p", v ); \
+ return v; \
+ }
+
+CALLOC(m_libc_dot_so_dot_6, calloc);
+
+
+#define REALLOC(soname, fnname) \
+ \
+ void* ENCODE(soname,fnname) ( void* ptrV, SizeT new_size ); \
+ void* ENCODE(soname,fnname) ( void* ptrV, SizeT new_size ) \
+ { \
+ void* v; \
+ \
+ MALLOC_TRACE("realloc(%p,%llu)", ptrV, (ULong)new_size ); \
+ MAYBE_SLOPPIFY(new_size); \
+ \
+ if (ptrV =3D=3D NULL) \
+ /* We need to call a malloc-like function; so let's use \
+ one which we know exists. */ \
+ return ENCODE(libcZdsoZd6,malloc) (new_size); \
+ if (new_size <=3D 0) { \
+ ENCODE(libcZdsoZd6,free)(ptrV); \
+ if (info.clo_trace_malloc) \
+ internal_printf(" =3D 0" ); \
+ return NULL; \
+ } \
+ if (!init_done) init(); \
+ v =3D (void*)VALGRIND_NON_SIMD_CALL2( info.tl_realloc, ptrV, new_s=
ize ); \
+ MALLOC_TRACE(" =3D %p", v ); \
+ return v; \
+ }
+
+REALLOC(m_libc_dot_so_dot_6, realloc);
+
+
+#define MEMALIGN(soname, fnname) \
+ \
+ void* ENCODE(soname,fnname) ( SizeT alignment, SizeT n ); \
+ void* ENCODE(soname,fnname) ( SizeT alignment, SizeT n ) \
+ { \
+ void* v; \
+ \
+ MALLOC_TRACE("memalign(al %llu, size %llu)", \
+ (ULong)alignment, (ULong)n ); \
+ MAYBE_SLOPPIFY(n); \
+ \
+ /* Round up to minimum alignment if necessary. */ \
+ if (alignment < VG_MIN_MALLOC_SZB) \
+ alignment =3D VG_MIN_MALLOC_SZB; \
+ \
+ /* Round up to nearest power-of-two if necessary (like glibc). */ =
\
+ while (0 !=3D (alignment & (alignment - 1))) alignment++; \
+ \
+ if (!init_done) init(); \
+ v =3D (void*)VALGRIND_NON_SIMD_CALL2( info.tl_memalign, alignment,=
n ); \
+ MALLOC_TRACE(" =3D %p", v ); \
+ return v; \
+ }
+
+MEMALIGN(m_libc_dot_so_dot_6, memalign);
+
+
+#define VALLOC(soname, fnname) \
+ \
+ void* ENCODE(soname,fnname) ( SizeT size ); \
+ void* ENCODE(soname,fnname) ( SizeT size ) \
+ { \
+ return ENCODE(libcZdsoZd6,memalign)(VKI_PAGE_SIZE, size); \
+ }
+
+VALLOC(m_libc_dot_so_dot_6, valloc);
+
+
+/* Various compatibility wrapper functions, for glibc and libstdc++. */
+
+#define MALLOPT(soname, fnname) \
+ \
+ int ENCODE(soname, fnname) ( int cmd, int value ); \
+ int ENCODE(soname, fnname) ( int cmd, int value ) \
+ { \
+ /* In glibc-2.2.4, 1 denotes a successful return value for \
+ mallopt */ \
+ return 1; \
+ }
+
+MALLOPT(m_libc_dot_so_dot_6, mallopt);
+
+
+#define POSIX_MEMALIGN(soname, fnname) \
+ \
+ int ENCODE(soname, fnname) ( void **memptr, SizeT alignment, SizeT si=
ze ); \
+ int ENCODE(soname, fnname) ( void **memptr, SizeT alignment, SizeT si=
ze ) \
+ { \
+ void *mem; \
+ \
+ /* Test whether the alignment argument is valid. It must be \
+ a power of two multiple of sizeof (void *). */ \
+ if (alignment % sizeof (void *) !=3D 0 \
+ || (alignment & (alignment - 1)) !=3D 0) \
+ return VKI_EINVAL; \
+ \
+ mem =3D ENCODE(libcZdsoZd6,memalign)(alignment, size); \
+ \
+ if (mem !=3D NULL) { \
+ *memptr =3D mem; \
+ return 0; \
+ } \
+ \
+ return VKI_ENOMEM; \
+ }
+
+POSIX_MEMALIGN(m_libc_dot_so_dot_6, posix_memalign);
+
+
+#define MALLOC_USABLE_SIZE(soname, fnname) \
+ \
+ int ENCODE(soname, fnname) ( void* p ); \
+ int ENCODE(soname, fnname) ( void* p ) \
+ { \
+ SizeT pszB; \
+ \
+ MALLOC_TRACE("malloc_usable_size(%p)", p ); \
+ if (NULL =3D=3D p) \
+ return 0; \
+ \
+ if (!init_done) init(); \
+ pszB =3D (SizeT)VALGRIND_NON_SIMD_CALL2( info.arena_payload_szB, \
+ VG_AR_CLIENT, p ); \
+ MALLOC_TRACE(" =3D %llu", (ULong)pszB ); \
+ \
+ return pszB; \
+ }
+
+MALLOC_USABLE_SIZE(m_libc_dot_so_dot_6, malloc_usable_size);
+
+
+/* Bomb out if we get any of these. */
+
+static void panic(const char *str)
+{
+ VALGRIND_PRINTF_BACKTRACE("Program aborting because of call to %s", s=
tr);
+ _exit(99);
+ *(int *)0 =3D 'x';
+}
+
+#define PANIC(soname, fnname) \
+ \
+ void ENCODE(soname, fnname) ( void ); \
+ void ENCODE(soname, fnname) ( void ) \
+ { \
+ panic(#fnname); \
+ }
+
+PANIC(m_libc_dot_so_dot_6, pvalloc);
+PANIC(m_libc_dot_so_dot_6, malloc_stats);
+PANIC(m_libc_dot_so_dot_6, malloc_trim);
+PANIC(m_libc_dot_so_dot_6, malloc_get_state);
+PANIC(m_libc_dot_so_dot_6, malloc_set_state);
+
+
+/* Yet another ugly hack. Cannot include <malloc.h> because we
+ implement functions implemented there with different signatures.
+ This struct definition MUST match the system one. */
+
+/* SVID2/XPG mallinfo structure */
+struct mallinfo {
+ int arena; /* total space allocated from system */
+ int ordblks; /* number of non-inuse chunks */
+ int smblks; /* unused -- always zero */
+ int hblks; /* number of mmapped regions */
+ int hblkhd; /* total space in mmapped regions */
+ int usmblks; /* unused -- always zero */
+ int fsmblks; /* unused -- always zero */
+ int uordblks; /* total allocated space */
+ int fordblks; /* total non-inuse space */
+ int keepcost; /* top-most, releasable (via malloc_trim) space */
+};
+
+#define MALLINFO(soname, fnname) \
+ \
+ struct mallinfo ENCODE(soname, fnname) ( void ); \
+ struct mallinfo ENCODE(soname, fnname) ( void ) \
+ { \
+ /* Should really try to return something a bit more meaningful */ =
\
+ UInt i; \
+ struct mallinfo mi; \
+ UChar* pmi =3D (UChar*)(&mi); \
+ for (i =3D 0; i < sizeof(mi); i++) \
+ pmi[i] =3D 0; \
+ return mi; \
+ }
+
+MALLINFO(m_libc_dot_so_dot_6, mallinfo);
+
+
+/* All the code in here is unused until this function is called */
+
+static void init(void)
+{
+ int res;
+
+ if (init_done)
+ return;
+
+ init_done =3D 1;
+
+ VALGRIND_MAGIC_SEQUENCE(res, -1, VG_USERREQ__GET_MALLOCFUNCS, &info,
+ 0, 0, 0);
+}
+
+/*--------------------------------------------------------------------*/
+/*--- end vg_replace_malloc.c ---*/
+/*--------------------------------------------------------------------*/
Deleted: trunk/coregrind/vg_replace_malloc.c.base
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_replace_malloc.c.base 2005-04-02 17:30:19 UTC (rev=
3509)
+++ trunk/coregrind/vg_replace_malloc.c.base 2005-04-02 17:38:59 UTC (rev=
3510)
@@ -1,365 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Replacements for malloc() et al, which run on the simulated ---*/
-/*--- CPU. vg_replace_malloc.c ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Julian Seward=20
- 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.
-*/
-
-/* ---------------------------------------------------------------------
- All the code in this file runs on the SIMULATED CPU. It is intended
- for various reasons as drop-in replacements for malloc() and friends.
- These functions have global scope, but are not intended to be called
- directly. See the comments in coregrind/vg_intercept.c for the
- gory details.
-
- This file can be linked into the injected so file for any tool that
- wishes to know about calls to malloc(). It should define functions
- TL_(malloc) et al that will be called.
- ------------------------------------------------------------------ */
-
-#include "valgrind.h" /* for VALGRIND_NON_SIMD_CALL[12] */
-#include "core.h"
-
-// Nb: the last line is repeated -- once for the declaration, once for t=
he
-// definition. If we don't have the declaration there GCC complains.
-#define LIBALIAS(ret, name, args) \
- ret VG_INTERCEPT(soname:libstdc++*, __libc_##name) args \
- __attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name))=
, \
- visibility("protected"))); \
- ret VG_INTERCEPT(soname:libc.so.6, __libc_##name) args \
- __attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name))=
, \
- visibility("protected"))); \
- ret VG_INTERCEPT(soname:libstdc++*, __##name) args \
- __attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name))=
, \
- visibility("protected"))); \
- ret VG_INTERCEPT(soname:libc.so.6, __##name) args \
- __attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name))=
, \
- visibility("protected"))); \
- ret VG_INTERCEPT(soname:libstdc++*, ##name) args \
- __attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name))=
, \
- visibility("protected"))); \
- ret VG_INTERCEPT(soname:libc.so.6, ##name) args; \
- ret VG_INTERCEPT(soname:libc.so.6, ##name) args
-
-extern void _exit(int);
-
-/*------------------------------------------------------------*/
-/*--- Replacing malloc() et al ---*/
-/*------------------------------------------------------------*/
-
-static struct vg_mallocfunc_info info;
-static int init_done;
-
-/* Startup hook - called as init section */
-static void init(void) __attribute__((constructor));
-
-// Functions for printing from code within Valgrind, but which runs on t=
he
-// sim'd CPU. They must be functions rather than macros so that va_list=
can
-// be used.
-// Nb: at one point, these were used by multiple files that run on the s=
im'd
-// CPU, and so were *defined* in core.h with the 'weak' attribute. That=
was
-// pretty ugly. It's much better if this is the only file that needs th=
em.
-
-__attribute__((format(__printf__, 1, 2)))
-static int
-internal_printf(char *format, ...)
-{
- UWord _qzz_res =3D 0;
- va_list vargs;
- va_start(vargs, format);
- VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__INTERNAL_PRINTF,
- (UWord)format, (UWord)vargs, 0, 0);
- va_end(vargs);
- return _qzz_res;
-}
-
-#define MALLOC_TRACE(format, args...) \
- if (info.clo_trace_malloc) \
- internal_printf(format, ## args )
-
-#define MAYBE_SLOPPIFY(n) \
- if (info.clo_sloppy_malloc) { \
- n =3D (n+(VG_SLOPPY_MALLOC_SZB-1)) & ~(VG_SLOPPY_MALLOC_SZB-1); \
- }
-
-/* Below are new versions of malloc, __builtin_new, free,=20
- __builtin_delete, calloc, realloc, memalign, and friends.
-
- None of these functions are called directly - they are not meant to
- be found by the dynamic linker. But ALL client calls to malloc() and
- friends wind up here eventually. They get called because vg_replace_=
malloc
- installs a bunch of code redirects which causes Valgrind to use these
- functions rather than the ones they're replacing. */
-
-#define ALLOC(fff, vgfff) \
-LIBALIAS(void *, fff, (SizeT n)) \
-{ \
- void* v; \
- \
- MALLOC_TRACE(#fff "(%llu)", (ULong)n ); \
- MAYBE_SLOPPIFY(n); \
- if (!init_done) init(); \
- \
- v =3D (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vgfff, n ); \
- MALLOC_TRACE(" =3D %p", v ); \
- return v; \
-}
-
-#define ALLOC2(fff, vgfff) \
-LIBALIAS(void *, fff, (SizeT n)) \
-{ \
- void* v; \
- \
- MALLOC_TRACE(#fff "(%llu)", (ULong)n ); \
- MAYBE_SLOPPIFY(n); \
- if (!init_done) init(); \
- \
- v =3D (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vgfff, n ); \
- MALLOC_TRACE(" =3D %p", v ); \
- if (NULL =3D=3D v) { \
- VALGRIND_PRINTF_BACKTRACE( \
- "new/new[] failed and should throw an exception, but Valgrind\n=
" \
- " cannot throw exceptions and so is aborting instead. Sorry.=
"); \
- _exit(1); \
- } \
- return v; \
-}
-ALLOC( malloc, malloc );
-ALLOC2(__builtin_new, __builtin_new );
-ALLOC2(_Znwj, __builtin_new );
-
-// operator new(unsigned, std::nothrow_t const&)
-ALLOC( _ZnwjRKSt9nothrow_t, __builtin_new );
-
-ALLOC2(__builtin_vec_new, __builtin_vec_new );
-ALLOC2(_Znaj, __builtin_vec_new );
-
-// operator new[](unsigned, std::nothrow_t const&)
-ALLOC( _ZnajRKSt9nothrow_t, __builtin_vec_new );
-
-#define FREE(fff, vgfff) \
-LIBALIAS(void, fff, (void *p)) \
-{ \
- MALLOC_TRACE(#fff "(%p)", p ); \
- if (p =3D=3D NULL) \
- return; \
- if (!init_done) init(); \
- (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vgfff, p ); \
-}
-FREE( free, free );
-FREE( cfree, free );
-FREE( __builtin_delete, __builtin_delete );
-FREE( _ZdlPv, __builtin_delete );
-
-// operator delete(void*, std::nothrow_t const&)
-FREE( _ZdlPvRKSt9nothrow_t, __builtin_delete );
-
-FREE( __builtin_vec_delete, __builtin_vec_delete );
-FREE( _ZdaPv, __builtin_vec_delete );
-
-// operator delete[](void*, std::nothrow_t const&)
-FREE( _ZdaPvRKSt9nothrow_t, __builtin_vec_delete );
-
-
-LIBALIAS(void*, calloc, ( SizeT nmemb, SizeT size ))
-{
- void* v;
-
- MALLOC_TRACE("calloc(%llu,%llu)", (ULong)nmemb, (ULong)size );
- MAYBE_SLOPPIFY(size);
-
- if (!init_done) init();
- v =3D (void*)VALGRIND_NON_SIMD_CALL2( info.tl_calloc, nmemb, size );
- MALLOC_TRACE(" =3D %p", v );
- return v;
-}
-
-LIBALIAS(void*, realloc, ( void* ptrV, SizeT new_size ))
-{
- void* v;
-
- MALLOC_TRACE("realloc(%p,%llu)", ptrV, (ULong)new_size );
- MAYBE_SLOPPIFY(new_size);
-
- if (ptrV =3D=3D NULL)
- return VG_INTERCEPT(soname:libc.so.6, malloc)(new_size);
- if (new_size <=3D 0) {
- VG_INTERCEPT(soname:libc.so.6, free)(ptrV);
- if (info.clo_trace_malloc)=20
- internal_printf(" =3D 0" );
- return NULL;
- } =20
- if (!init_done) init();
- v =3D (void*)VALGRIND_NON_SIMD_CALL2( info.tl_realloc, ptrV, new_size=
);
- MALLOC_TRACE(" =3D %p", v );
- return v;
-}
-
-
-LIBALIAS(void*, memalign, ( SizeT alignment, SizeT n ))
-{
- void* v;
-
- MALLOC_TRACE("memalign(al %llu, size %llu)", (ULong)alignment, (ULong=
)n );
- MAYBE_SLOPPIFY(n);
-
- // Round up to minimum alignment if necessary.
- if (alignment < VG_MIN_MALLOC_SZB) alignment =3D VG_MIN_MALLOC_SZB;
-
- // Round up to nearest power-of-two if necessary (like glibc).
- while (0 !=3D (alignment & (alignment - 1))) alignment++;
-
- if (!init_done) init();
- v =3D (void*)VALGRIND_NON_SIMD_CALL2( info.tl_memalign, alignment, n =
);
- MALLOC_TRACE(" =3D %p", v );
- return v;
-}
-
-
-LIBALIAS(void*, valloc, ( SizeT size ))
-{
- return VG_INTERCEPT(soname:libc.so.6, memalign)(VKI_PAGE_SIZE, size);
-}
-
-
-/* Various compatibility wrapper functions, for glibc and libstdc++. */
-
-LIBALIAS(int, mallopt, ( int cmd, int value ))
-{
- /* In glibc-2.2.4, 1 denotes a successful return value for mallopt */
- return 1;
-}
-
-
-LIBALIAS(int, posix_memalign, ( void **memptr, SizeT alignment, SizeT si=
ze ))
-{
- void *mem;
-
- /* Test whether the alignment argument is valid. It must be a power=
of
- two multiple of sizeof (void *). */
- if (alignment % sizeof (void *) !=3D 0 || (alignment & (alignment - =
1)) !=3D 0)
- return VKI_EINVAL /*22*/ /*EINVAL*/;
-
- mem =3D VG_INTERCEPT(soname:libc.so.6, memalign)(alignment, size);
-
- if (mem !=3D NULL) {
- *memptr =3D mem;
- return 0;
- }
-
- return VKI_ENOMEM /*12*/ /*ENOMEM*/;
-}
-
-LIBALIAS(int, malloc_usable_size, ( void* p ))
-{=20
- SizeT pszB;
- =20
- MALLOC_TRACE("malloc_usable_size(%p)", p );
- if (NULL =3D=3D p)
- return 0;
-
- if (!init_done) init();
- pszB =3D (SizeT)VALGRIND_NON_SIMD_CALL2( info.arena_payload_szB,=20
- VG_AR_CLIENT, p );
- MALLOC_TRACE(" =3D %llu", (ULong)pszB );
-
- return pszB;
-}
-
-
-/* Bomb out if we get any of these. */
-
-static void panic(const char *str)
-{
- VALGRIND_PRINTF_BACKTRACE("Program aborting because of call to %s", s=
tr);
- =20
- _exit(99);
- *(int *)0 =3D 'x';
-}
-
-// As for LIBALIAS, we have the declaration to shut GCC up.
-#define PANIC(x) \
- void VG_INTERCEPT(soname:libc.so.6, ## x)(void); \
- void VG_INTERCEPT(soname:libc.so.6, ## x)(void) \
- { \
- panic(#x); \
- }
-
-PANIC(pvalloc);
-PANIC(malloc_stats);
-PANIC(malloc_trim);
-PANIC(malloc_get_state);
-PANIC(malloc_set_state);
-
-
-/* Yet another ugly hack. Cannot include <malloc.h> because we
- implement functions implemented there with different signatures.
- This struct definition MUST match the system one. */
-
-/* SVID2/XPG mallinfo structure */
-struct mallinfo {
- int arena; /* total space allocated from system */
- int ordblks; /* number of non-inuse chunks */
- int smblks; /* unused -- always zero */
- int hblks; /* number of mmapped regions */
- int hblkhd; /* total space in mmapped regions */
- int usmblks; /* unused -- always zero */
- int fsmblks; /* unused -- always zero */
- int uordblks; /* total allocated space */
- int fordblks; /* total non-inuse space */
- int keepcost; /* top-most, releasable (via malloc_trim) space */
-};
-
-LIBALIAS(struct mallinfo, mallinfo, ( void ))
-{
- /* Should really try to return something a bit more meaningful */
- UInt i;
- struct mallinfo mi;
- UChar* pmi =3D (UChar*)(&mi);
- for (i =3D 0; i < sizeof(mi); i++)
- pmi[i] =3D 0;
- return mi;
-}
-
-/* All the code in here is unused until this function is called */
-
-static void init(void)
-{
- int res;
-
- if (init_done)
- return;
-
- init_done =3D 1;
-
- VALGRIND_MAGIC_SEQUENCE(res, -1, VG_USERREQ__GET_MALLOCFUNCS, &info,
- 0, 0, 0);
-}
-
-/*--------------------------------------------------------------------*/
-/*--- end vg_replace_malloc.c ---*/
-/*--------------------------------------------------------------------*/
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-04-02 17:30:19 UTC (rev 3509)
+++ trunk/coregrind/vg_symtab2.c 2005-04-02 17:38:59 UTC (rev 3510)
@@ -799,73 +799,121 @@
return False;
}
=20
-/*
- * Demangle an intercept symbol into library:func form
+/* Demangle an intercept symbol into library:func form
+ eg "_vgi_libcZdsoZd6__ZdlPv" --> "libc.so.6:_ZdlPv"
+ Uses the Z-encoding scheme described in vg_replace_malloc.c.
+ Returns True if demangle OK, False otherwise.
*/
=20
static Bool
intercept_demangle(const Char* symbol, Char* result, Int nbytes)
{
- int i, j =3D 0;
- int len =3D VG_(strlen)(symbol);
+# define EMIT(ch) \
+ do { \
+ if (j >=3D nbytes) \
+ result[j-1] =3D 0; \
+ else \
+ result[j++] =3D ch; \
+ } while (0)
=20
- for(i =3D VG_INTERCEPT_PREFIX_LEN; i < len; i++) {
- if(symbol[i] =3D=3D 'J') {
+ Bool error =3D False;
+ Int i, j =3D 0;
+ Int len =3D VG_(strlen)(symbol);
+ if (0) VG_(printf)("idm: %s\n", symbol);
+
+ i =3D VG_INTERCEPT_PREFIX_LEN;
+
+ /* Chew though the Z-encoded soname part. */
+ while (True) {
+
+ if (i >=3D len)=20
+ break;
+
+ if (symbol[i] =3D=3D '_')
+ /* We found the underscore following the Z-encoded soname.
+ Just copy the rest literally. */
+ break;
+
+ if (symbol[i] !=3D 'Z') {
+ EMIT(symbol[i]);
i++;
- vg_assert('J' !=3D symbol[i]);
- if((symbol[i] >=3D '0' && symbol[i] <=3D '9') ||
- (symbol[i] >=3D 'a' && symbol[i] <=3D 'f') ||
- (symbol[i] >=3D 'A' && symbol[i] <=3D 'F'))=20
- {
- int x =3D symbol[i++];
- int y =3D symbol[i];
- if(x >=3D '0' && x <=3D '9') {
- x -=3D '0';
- } else if(x >=3D 'a' && x <=3D 'f') {
- x -=3D 'a';
- } else if(x >=3D 'A' && x <=3D 'F') {
- x -=3D 'A';
- }
- if(y >=3D '0' && y <=3D '9') {
- y -=3D '0';
- } else if(y >=3D 'a' && y <=3D 'f') {
- y =3D y - 'a' + 10;
- } else if(y >=3D 'A' && y <=3D 'F') {
- y =3D y - 'A' + 10;
- } else {
- return False;
- }
- result[j] =3D (x << 4) | y;
- } else {
- return False;
- }
- } else {
- result[j] =3D symbol[i];
+ continue;
}
- if(j >=3D nbytes) {
- result[j] =3D '\0';
- return True;
+
+ /* We've got a Z-escape. Act accordingly. */
+ i++;
+ if (i >=3D len) {
+ /* Hmm, Z right at the end. Something's wrong. */
+ error =3D True;
+ EMIT('Z');
+ break;
}
- j++;
+ switch (symbol[i]) {
+ case 'a': EMIT('*'); break;
+ case 'p': EMIT('+'); break;
+ case 'c': EMIT(':'); break;
+ case 'd': EMIT('.'); break;
+ case 'u': EMIT('_'); break;
+ case 's': EMIT(' '); break;
+ case 'Z': EMIT('Z'); break;
+ default: error =3D True; EMIT('Z'); EMIT(symbol[i]); break;
+ }
+ i++;
}
- result[j] =3D '\0';
+
+ if (error || i >=3D len || symbol[i] !=3D '_') {
+ /* Something's wrong. Give up. */
+ VG_(message)(Vg_UserMsg, "intercept: error demangling: %s", symbol=
);
+ EMIT(0);
+ return False;
+ }
+
+ /* Copy the rest of the string verbatim. */
+ i++;
+ EMIT(':');
+ while (True) {
+ if (i >=3D len)
+ break;
+ EMIT(symbol[i]);
+ i++;
+ }
+
+ EMIT(0);
+ if (0) VG_(printf)("%s\n", result);
return True;
+
+# undef EMIT
}
=20
static
void handle_intercept( SegInfo* si, Char* symbol, ElfXX_Sym* sym)
{
- Int len =3D VG_(strlen)(symbol) + 1 - VG_INTERCEPT_PREFIX_LEN;
- Char *lib =3D VG_(arena_malloc)(VG_AR_SYMTAB, len);
+ Bool ok;
+ Int len =3D VG_(strlen)(symbol) + 1 - VG_INTERCEPT_PREFIX_LEN;
+ Char *lib =3D VG_(arena_malloc)(VG_AR_SYMTAB, len+8);
Char *func;
=20
- intercept_demangle(symbol, lib, len);
- func =3D lib + VG_(strlen)(lib)-1;
+ /* Put "soname:" at the start of lib. */
+ lib[0] =3D 's';
+ lib[1] =3D 'o';
+ lib[2] =3D 'n';
+ lib[3] =3D 'a';
+ lib[4] =3D 'm';
+ lib[5] =3D 'e';
+ lib[6] =3D ':';
+ lib[7] =3D 0;
=20
- while(*func !=3D ':') func--;
- *func =3D '\0';
+ ok =3D intercept_demangle(symbol, lib+7, len);
+ if (ok) {
+ func =3D lib + VG_(strlen)(lib)-1;
=20
- VG_(add_redirect_sym_to_addr)(lib, func+1, si->offset + sym->st_value=
);
+ while(*func !=3D ':') func--;
+ *func =3D '\0';
+
+ if (0) VG_(printf)("lib A%sZ, func A%sZ\n", lib, func+1);
+ VG_(add_redirect_sym_to_addr)(lib, func+1, si->offset + sym->st_va=
lue);
+ }
+
VG_(arena_free)(VG_AR_SYMTAB, lib);
}
=20
|
|
From: <sv...@va...> - 2005-04-02 17:30:23
|
Author: tom
Date: 2005-04-02 18:30:19 +0100 (Sat, 02 Apr 2005)
New Revision: 3509
Modified:
trunk/cachegrind/amd64/cg_arch.c
trunk/cachegrind/x86/cg_arch.c
Log:
Get cache detection going again on x86.
Modified: trunk/cachegrind/amd64/cg_arch.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/cachegrind/amd64/cg_arch.c 2005-04-02 17:26:07 UTC (rev 3508)
+++ trunk/cachegrind/amd64/cg_arch.c 2005-04-02 17:30:19 UTC (rev 3509)
@@ -250,17 +250,16 @@
{
Int level, ret;
Char vendor_id[13];
- /* Trap for illegal instruction, in case it's a really old processor =
that
- * doesn't support CPUID. */
- if (VG_(has_cpuid)()) {
- VG_(cpuid)(0, &level, (int*)&vendor_id[0],=20
- (int*)&vendor_id[8], (int*)&vendor_id[4]); =
=20
- vendor_id[12] =3D '\0';
- } else {
+
+ if (!VG_(has_cpuid)()) {
VG_(message)(Vg_DebugMsg, "CPUID instruction not supported");
return -1;
}
=20
+ VG_(cpuid)(0, &level, (int*)&vendor_id[0],=20
+ (int*)&vendor_id[8], (int*)&vendor_id[4]); =20
+ vendor_id[12] =3D '\0';
+
if (0 =3D=3D level) {
VG_(message)(Vg_DebugMsg, "CPUID level is 0, early Pentium?\n");
return -1;
Modified: trunk/cachegrind/x86/cg_arch.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/cachegrind/x86/cg_arch.c 2005-04-02 17:26:07 UTC (rev 3508)
+++ trunk/cachegrind/x86/cg_arch.c 2005-04-02 17:30:19 UTC (rev 3509)
@@ -35,7 +35,6 @@
// Probably only works for Intel and AMD chips, and probably only for so=
me of
// them.=20
=20
-#if 0
static void micro_ops_warn(Int actual_size, Int used_size, Int line_size=
)
{
VG_(message)(Vg_DebugMsg,=20
@@ -245,25 +244,18 @@
=20
return 0;
}
-#endif
=20
static=20
Int get_caches_from_CPUID(cache_t* I1c, cache_t* D1c, cache_t* L2c)
{
- VG_(message)(Vg_DebugMsg, "Can't auto-detect CPUID yet, giving up");
- return -1;
-#if 0
Int level, ret;
Char vendor_id[13];
-// tl_assert(res =3D=3D 0);
-//
-// res =3D VG_(sigaction)( VKI_SIGILL, &sigill_new, &sigill_saved );
-// tl_assert(res =3D=3D 0);
=20
if (!VG_(has_cpuid)()) {
VG_(message)(Vg_DebugMsg, "CPUID instruction not supported");
return -1;
}
+
VG_(cpuid)(0, &level, (int*)&vendor_id[0],=20
(int*)&vendor_id[8], (int*)&vendor_id[4]); =20
vendor_id[12] =3D '\0';
@@ -305,7 +297,6 @@
L2c->size *=3D 1024;
=20
return ret;
-#endif
}
=20
=20
|
|
From: <sv...@va...> - 2005-04-02 17:26:11
|
Author: tom
Date: 2005-04-02 18:26:07 +0100 (Sat, 02 Apr 2005)
New Revision: 3508
Modified:
trunk/cachegrind/amd64/cg_arch.c
Log:
Make cache detection work on amd64.
Modified: trunk/cachegrind/amd64/cg_arch.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/cachegrind/amd64/cg_arch.c 2005-04-02 17:25:34 UTC (rev 3507)
+++ trunk/cachegrind/amd64/cg_arch.c 2005-04-02 17:26:07 UTC (rev 3508)
@@ -35,7 +35,6 @@
// Probably only works for Intel and AMD chips, and probably only for so=
me of
// them.=20
=20
-#if 0
static void micro_ops_warn(Int actual_size, Int used_size, Int line_size=
)
{
VG_(message)(Vg_DebugMsg,=20
@@ -246,48 +245,19 @@
return 0;
}
=20
-static jmp_buf cpuid_jmpbuf;
-
-static
-void cpuid_SIGILL_handler(int signum)
-{
- __builtin_longjmp(cpuid_jmpbuf, 1);
-}
-
static=20
Int get_caches_from_CPUID(cache_t* I1c, cache_t* D1c, cache_t* L2c)
{
- Int level, res, ret;
+ Int level, ret;
Char vendor_id[13];
- struct vki_sigaction sigill_new, sigill_saved;
-
- /* Install own SIGILL handler */
- sigill_new.ksa_handler =3D cpuid_SIGILL_handler;
- sigill_new.sa_flags =3D 0;
- sigill_new.sa_restorer =3D NULL;
- res =3D VG_(sigemptyset)( &sigill_new.sa_mask );
- tl_assert(res =3D=3D 0);
-
- res =3D VG_(sigaction)( VKI_SIGILL, &sigill_new, &sigill_saved );
- tl_assert(res =3D=3D 0);
-
/* Trap for illegal instruction, in case it's a really old processor =
that
* doesn't support CPUID. */
- if (__builtin_setjmp(cpuid_jmpbuf) =3D=3D 0) {
+ if (VG_(has_cpuid)()) {
VG_(cpuid)(0, &level, (int*)&vendor_id[0],=20
(int*)&vendor_id[8], (int*)&vendor_id[4]); =
=20
vendor_id[12] =3D '\0';
-
- /* Restore old SIGILL handler */
- res =3D VG_(sigaction)( VKI_SIGILL, &sigill_saved, NULL );
- tl_assert(res =3D=3D 0);
-
} else {
VG_(message)(Vg_DebugMsg, "CPUID instruction not supported");
-
- /* Restore old SIGILL handler */
- res =3D VG_(sigaction)( VKI_SIGILL, &sigill_saved, NULL );
- tl_assert(res =3D=3D 0);
return -1;
}
=20
@@ -303,19 +273,6 @@
} else if (0 =3D=3D VG_(strcmp)(vendor_id, "AuthenticAMD")) {
ret =3D AMD_cache_info(I1c, D1c, L2c);
=20
- } else if (0 =3D=3D VG_(strcmp)(vendor_id, "CentaurHauls")) {
- /* Total kludge. Pretend to be a VIA Nehemiah. */
- D1c->size =3D 64;
- D1c->assoc =3D 16;
- D1c->line_size =3D 16;
- I1c->size =3D 64;
- I1c->assoc =3D 4;
- I1c->line_size =3D 16;
- L2c->size =3D 64;
- L2c->assoc =3D 16;
- L2c->line_size =3D 16;
- ret =3D 0;
-
} else {
VG_(message)(Vg_DebugMsg, "CPU vendor ID not recognised (%s)",
vendor_id);
@@ -329,24 +286,11 @@
=20
return ret;
}
-#endif
=20
=20
void VGA_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c,
Bool all_caches_clo_defined)
{
- // Set caches to default.
- *I1c =3D (cache_t) { 65536, 2, 64 };
- *D1c =3D (cache_t) { 65536, 2, 64 };
- *L2c =3D (cache_t) { 524288, 8, 64 };
-
- if (1) {
- VG_(message)(Vg_DebugMsg,=20
- "Warning: Couldn't auto-detect cache config, using on=
e "
- "or more defaults ");
- }
-
-#if 0
Int res;
=20
// Set caches to default.
@@ -363,7 +307,6 @@
"Warning: Couldn't auto-detect cache config, using on=
e "
"or more defaults ");
}
-#endif
}
=20
/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2005-04-02 17:25:38
|
Author: tom Date: 2005-04-02 18:25:34 +0100 (Sat, 02 Apr 2005) New Revision: 3507 Modified: trunk/coregrind/Makefile.am Log: Remove vg_instrument.c from the makefile. 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-04-02 17:16:25 UTC (rev 3506) +++ trunk/coregrind/Makefile.am 2005-04-02 17:25:34 UTC (rev 3507) @@ -61,7 +61,6 @@ vg_demangle.c \ vg_errcontext.c \ vg_hashtable.c \ - vg_instrument.c \ vg_main.c \ vg_malloc2.c \ vg_memory.c \ |
|
From: <sv...@va...> - 2005-04-02 17:16:30
|
Author: sewardj Date: 2005-04-02 18:16:25 +0100 (Sat, 02 Apr 2005) New Revision: 3506 Removed: trunk/coregrind/vg_instrument.c Log: Get rid of apparently-redundant file. Deleted: trunk/coregrind/vg_instrument.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_instrument.c 2005-04-02 17:01:52 UTC (rev 3505) +++ trunk/coregrind/vg_instrument.c 2005-04-02 17:16:25 UTC (rev 3506) @@ -1,36 +0,0 @@ - -/*--------------------------------------------------------------------*/ -/*--- Higher-level UCode sequence builders ---*/ -/*--- vg_instrument.c ---*/ -/*--------------------------------------------------------------------*/ - -/* - This file is part of Valgrind, a dynamic binary instrumentation - framework. - - Copyright (C) 2000-2005 Nicholas Nethercote - nj...@ca... - - 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. -*/ - -/*--------------------------------------------------------------------*/ -/*--- end vg_instrument.c ---*/ -/*--------------------------------------------------------------------*/ - - |
|
From: <sv...@va...> - 2005-04-02 17:01:55
|
Author: tom
Date: 2005-04-02 18:01:52 +0100 (Sat, 02 Apr 2005)
New Revision: 3505
Modified:
trunk/coregrind/amd64/state.c
Log:
Assert that cpuid is available - this is just done to force the
code from cpuid.S to be pulled in so that tools can use it.
Modified: trunk/coregrind/amd64/state.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/state.c 2005-04-02 17:01:07 UTC (rev 3504)
+++ trunk/coregrind/amd64/state.c 2005-04-02 17:01:52 UTC (rev 3505)
@@ -45,6 +45,7 @@
Bool VGA_(getArchAndSubArch)( /*OUT*/VexArch* vex_arch,=20
/*OUT*/VexSubArch* vex_subarch )
{
+ vg_assert(VG_(has_cpuid)());
*vex_arch =3D VexArchAMD64;
*vex_subarch =3D VexSubArch_NONE;
return True;
|
|
From: <sv...@va...> - 2005-04-02 17:01:12
|
Author: tom
Date: 2005-04-02 18:01:07 +0100 (Sat, 02 Apr 2005)
New Revision: 3504
Modified:
trunk/coregrind/amd64/cpuid.S
Log:
Get VG_(has_cpuid) and VG_(cpuid) working on amd64.
Modified: trunk/coregrind/amd64/cpuid.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/cpuid.S 2005-04-02 15:53:01 UTC (rev 3503)
+++ trunk/coregrind/amd64/cpuid.S 2005-04-02 17:01:07 UTC (rev 3504)
@@ -28,23 +28,59 @@
The GNU General Public License is contained in the file COPYING.
*/
=20
-#if 0
-
#include "core_asm.h"
=20
/*
+ Bool VG_(has_cpuid)(void)
+ */
+.globl VG_(has_cpuid)
+VG_(has_cpuid):
+ movq $1, %rax
+ ret
+
+/*
int VG_(cpuid)(UInt eax,
UInt *eax_ret, UInt *ebx_ret, UInt *ecx_ret, UInt *ed=
x_ret)
*/
.globl VG_(cpuid)
VG_(cpuid):
- ud2
+ pushq %rbp
+ movq %rsp, %rbp
+ pushq %rbx
+ movl %edi, %eax
+ movq %rdx, %rdi
+ movq %rcx, %r9
+ /*
+ eax_ret now in %rsi
+ ebx_ret now in %rdi
+ ecx_ret now in %r9
+ edx_ret now in %r8
+ */
+ cpuid
+ testq %rsi, %rsi
+ jz 1f
+ movl %eax, (%rsi)
+1:
+ testq %rdi, %rdi
+ jz 2f
+ movl %ebx, (%rdi)
+2:
+ testq %r9, %r9
+ jz 3f
+ movl %ecx, (%r9)
+3:
+ testq %r8, %r8
+ jz 4f
+ movl %edx, (%r8)
+4:
+ popq %rbx
+ movq %rbp, %rsp
+ popq %rbp
+ ret
=20
/* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",@progbits
=20
-#endif /* 0 */
-
##--------------------------------------------------------------------##
##--- end ---##
##--------------------------------------------------------------------##
|
|
From: <sv...@va...> - 2005-04-02 15:53:05
|
Author: tom
Date: 2005-04-02 16:53:01 +0100 (Sat, 02 Apr 2005)
New Revision: 3503
Added:
trunk/coregrind/amd64-linux/core_platform.c
trunk/coregrind/x86-linux/core_platform.c
Modified:
trunk/coregrind/amd64-linux/Makefile.am
trunk/coregrind/core.h
trunk/coregrind/vg_main.c
trunk/coregrind/vg_redir.c
trunk/coregrind/vg_symtab2.c
trunk/coregrind/x86-linux/Makefile.am
Log:
Add VGP_(setup_redirects) to the platform specific layers and use
it to setup vsyscall redirects on amd64 and the _dl_sysinfo_int80
redirect on x86.
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-04-02 15:04:15 UTC (rev =
3502)
+++ trunk/coregrind/amd64-linux/Makefile.am 2005-04-02 15:53:01 UTC (rev =
3503)
@@ -11,6 +11,7 @@
=20
=20
libplatform_a_SOURCES =3D \
+ core_platform.c \
ldt.c \
syscall.S \
syscalls.c
Added: 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-04-02 15:04:15 UTC (=
rev 3502)
+++ trunk/coregrind/amd64-linux/core_platform.c 2005-04-02 15:53:01 UTC (=
rev 3503)
@@ -0,0 +1,28 @@
+#include "core.h"
+
+/* Rerouted entry point for __NR_gettimeofday */
+static void amd64_linux_rerouted__vgettimeofday(void)
+{
+asm(
+" movq $96, %rax\n"
+" syscall\n"
+);
+}
+
+/* Rerouted entry point for __NR_time */
+static void amd64_linux_rerouted__vtime(void)
+{
+asm(
+" movq $201, %rax\n"
+" syscall\n"
+);
+}
+
+void VGP_(setup_redirects)(void)
+{
+ /* Redirect vsyscalls to local versions */
+ VG_(add_redirect_addr_to_addr)(0xFFFFFFFFFF600000ULL,
+ (Addr)amd64_linux_rerouted__vgettimeof=
day);
+ VG_(add_redirect_addr_to_addr)(0xFFFFFFFFFF600400ULL,
+ (Addr)amd64_linux_rerouted__vtime);
+}
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-04-02 15:04:15 UTC (rev 3502)
+++ trunk/coregrind/core.h 2005-04-02 15:53:01 UTC (rev 3503)
@@ -915,8 +915,10 @@
/* Redirection machinery */
extern Addr VG_(code_redirect) ( Addr orig );
=20
-extern void VG_(add_redirect_addr)(const Char *from_lib, const Char *fro=
m_sym,
- Addr to_addr);
+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);
extern Bool VG_(resolve_redir)(CodeRedirect *redir, const SegInfo *si);
=20
@@ -1777,6 +1779,10 @@
struct vki_ucontext *uc,
Bool restart);
=20
+/*
+ Do any platform specific redirects.
+ */
+extern void VGP_(setup_redirects)(void);
=20
///* -------------------------------------------------------------------=
--
// Thread modelling
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-04-02 15:04:15 UTC (rev 3502)
+++ trunk/coregrind/vg_main.c 2005-04-02 15:53:01 UTC (rev 3503)
@@ -2724,6 +2724,7 @@
// p: init_tt_tc [so it can call VG_(search_transtab) safely]
//--------------------------------------------------------------
VG_(setup_code_redirect_table)();
+ VGP_(setup_redirects)();
=20
//--------------------------------------------------------------
// Verbosity message
Modified: 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-04-02 15:04:15 UTC (rev 3502)
+++ trunk/coregrind/vg_redir.c 2005-04-02 15:53:01 UTC (rev 3503)
@@ -132,6 +132,76 @@
return from_resolved(redir) && to_resolved(redir);
}
=20
+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 */
Bool VG_(resolve_redir)(CodeRedirect *redir, const SegInfo *si)
@@ -186,75 +256,8 @@
redir->from_lib, redir->from_sym, redir->from_addr,=20
redir->to_lib, redir->to_sym, redir->to_addr);
=20
- if (resolved) {
- 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 (resolved) add_resolved(redir);
=20
- 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 already called functio=
n" );
- VG_(message)(Vg_UserMsg,
- " %s (%p -> %p)",
- redir->from_sym, redir->from_addr, redir->to_addr );
- }
- VG_(discard_translations)((Addr64)redir->from_addr, 1);
- }
-
- {
- CodeRedirect *r =3D VG_(SkipList_Find_Exact)(&sk_resolved_redir, &r=
edir->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 duplicated\n",
- redir->from_lib, redir->from_sym, redir->from_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 -> wrappe=
r)",
- 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;
- }
- }
-
return resolved;
}
=20
@@ -285,8 +288,8 @@
}
=20
/* Redirect a lib/symbol reference to a function at lib/symbol */
-static void add_redirect_sym(const Char *from_lib, const Char *from_sym,
- const Char *to_lib, const Char *to_sym)
+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);
=20
@@ -315,8 +318,8 @@
}
=20
/* Redirect a lib/symbol reference to a function at addr */
-void VG_(add_redirect_addr)(const Char *from_lib, const Char *from_sym,
- Addr to_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);
=20
@@ -330,6 +333,11 @@
redir->to_sym =3D NULL;
redir->to_addr =3D to_addr;
=20
+ 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 (!VG_(resolve_redir_allsegs)(redir)) {
@@ -339,6 +347,29 @@
}
}
=20
+/* 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)
{
@@ -371,45 +402,12 @@
return redir;
}
=20
-/* HACK! This should be done properly (see ~/NOTES.txt) */
-#ifdef __amd64__
-/* Rerouted entry points for __NR_vgettimeofday and __NR_vtime.
- 96 =3D=3D __NR_gettimeofday
- 201 =3D=3D __NR_time
-*/
-static void amd64_linux_rerouted__vgettimeofday(void)
-{
-asm(
-" movq $96, %rax\n"
-" syscall\n"
-);
-}
-
-static void amd64_linux_rerouted__vtime(void)
-{
-asm(
-" movq $201, %rax\n"
-" syscall\n"
-);
-}
-#endif
-
/* If address 'a' is being redirected, return the redirected-to
address. */
Addr VG_(code_redirect)(Addr a)
{
CodeRedirect* r;
=20
-#ifdef __amd64__
- /* HACK. Reroute the amd64-linux vsyscalls. This should be moved
- out of here into an amd64-linux specific initialisation routine.
- */
- if (a =3D=3D 0xFFFFFFFFFF600000ULL)
- return (Addr)amd64_linux_rerouted__vgettimeofday;
- if (a =3D=3D 0xFFFFFFFFFF600400ULL)
- return (Addr)amd64_linux_rerouted__vtime;
-#endif
-
r =3D VG_(SkipList_Find_Exact)(&sk_resolved_redir, &a);
if (r =3D=3D NULL)
return a;
@@ -421,41 +419,34 @@
=20
void VG_(setup_code_redirect_table) ( 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_addr)("soname:ld-linux.so.2", "_dl_sysinfo_int80",
- VG_(client_trampoline_code)+VG_(tramp_syscall_offset));
- =20
/* 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("soname:libc.so.6", "stpcpy",
- "*vgpreload_memcheck.so*", "stpcpy");
+ add_redirect_sym_to_sym("soname:libc.so.6", "stpcpy",
+ "*vgpreload_memcheck.so*", "stpcpy");
=20
- add_redirect_sym("soname:libc.so.6", "strlen",
- "*vgpreload_memcheck.so*", "strlen");
+ add_redirect_sym_to_sym("soname:libc.so.6", "strlen",
+ "*vgpreload_memcheck.so*", "strlen");
=20
- add_redirect_sym("soname:libc.so.6", "strnlen",
- "*vgpreload_memcheck.so*", "strnlen");
+ add_redirect_sym_to_sym("soname:libc.so.6", "strnlen",
+ "*vgpreload_memcheck.so*", "strnlen");
=20
- add_redirect_sym("soname:ld-linux.so.2", "stpcpy",
- "*vgpreload_memcheck.so*", "stpcpy");
- add_redirect_sym("soname:libc.so.6", "stpcpy",
- "*vgpreload_memcheck.so*", "stpcpy");
+ 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");
=20
- add_redirect_sym("soname:libc.so.6", "strchr",
- "*vgpreload_memcheck.so*", "strchr");
- add_redirect_sym("soname:ld-linux.so.2", "strchr",
- "*vgpreload_memcheck.so*", "strchr");
+ 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");
=20
- add_redirect_sym("soname:libc.so.6", "strchrnul",
- "*vgpreload_memcheck.so*", "glibc232_strchrnul");
+ add_redirect_sym_to_sym("soname:libc.so.6", "strchrnul",
+ "*vgpreload_memcheck.so*", "glibc232_strchrnu=
l");
=20
- add_redirect_sym("soname:libc.so.6", "rawmemchr",
- "*vgpreload_memcheck.so*", "glibc232_rawmemchr");
+ add_redirect_sym_to_sym("soname:libc.so.6", "rawmemchr",
+ "*vgpreload_memcheck.so*", "glibc232_rawmemch=
r");
}
=20
=20
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-04-02 15:04:15 UTC (rev 3502)
+++ trunk/coregrind/vg_symtab2.c 2005-04-02 15:53:01 UTC (rev 3503)
@@ -865,7 +865,7 @@
while(*func !=3D ':') func--;
*func =3D '\0';
=20
- VG_(add_redirect_addr)(lib, func+1, si->offset + sym->st_value);
+ VG_(add_redirect_sym_to_addr)(lib, func+1, si->offset + sym->st_value=
);
VG_(arena_free)(VG_AR_SYMTAB, lib);
}
=20
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-04-02 15:04:15 UTC (rev 35=
02)
+++ trunk/coregrind/x86-linux/Makefile.am 2005-04-02 15:53:01 UTC (rev 35=
03)
@@ -11,6 +11,7 @@
=20
=20
libplatform_a_SOURCES =3D \
+ core_platform.c \
ldt.c \
syscall.S \
syscalls.c
Added: 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-04-02 15:04:15 UTC (re=
v 3502)
+++ trunk/coregrind/x86-linux/core_platform.c 2005-04-02 15:53:01 UTC (re=
v 3503)
@@ -0,0 +1,11 @@
+#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-04-02 15:04:21
|
Author: tom Date: 2005-04-02 16:04:15 +0100 (Sat, 02 Apr 2005) New Revision: 3502 Modified: trunk/docs/64-bit-cleanness Log: It seems deref_UInt is fine - socklen_t is a 32 bit value on amd64. Modified: trunk/docs/64-bit-cleanness =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/docs/64-bit-cleanness 2005-04-02 14:57:43 UTC (rev 3501) +++ trunk/docs/64-bit-cleanness 2005-04-02 15:04:15 UTC (rev 3502) @@ -27,7 +27,6 @@ =20 Others: - search for the following casts: (UInt*), (Int*), (UInt *), (Int *) -- should deref_UInt be deref_UWord?? Is socklen_t word-sized? - vki_sigset_t.sig use: the debug printing in do_setmask() is wrong -- i= t touches sig[1], thus assuming 32-bits. Likewise in handle_SCSS_change= () - client_auxv in vg_main.c is UInt** -- should it be UWord** ? |
|
From: <sv...@va...> - 2005-04-02 14:57:47
|
Author: tom
Date: 2005-04-02 15:57:43 +0100 (Sat, 02 Apr 2005)
New Revision: 3501
Modified:
trunk/coregrind/vg_symtab2.c
Log:
Don't truncate symbol values in ELF symbol tables.
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-04-02 14:46:54 UTC (rev 3500)
+++ trunk/coregrind/vg_symtab2.c 2005-04-02 14:57:43 UTC (rev 3501)
@@ -917,7 +917,7 @@
for (i =3D 1; i < (Int)(o_symtab_sz/sizeof(ElfXX_Sym)); i++) {
ElfXX_Sym* sym =3D & o_symtab[i];
# if 1
- sym_addr =3D si->offset + (UInt)sym->st_value;
+ sym_addr =3D si->offset + sym->st_value;
=20
if (VG_(clo_trace_symtab)) {
VG_(printf)("raw symbol [%d]: ", i);
|
|
From: <sv...@va...> - 2005-04-02 14:47:07
|
Author: tom Date: 2005-04-02 15:46:54 +0100 (Sat, 02 Apr 2005) New Revision: 3500 Modified: trunk/docs/64-bit-cleanness Log: Remove a coupld of entries that have been dealt with. Modified: trunk/docs/64-bit-cleanness =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/docs/64-bit-cleanness 2005-04-02 11:39:56 UTC (rev 3499) +++ trunk/docs/64-bit-cleanness 2005-04-02 14:46:54 UTC (rev 3500) @@ -20,8 +20,6 @@ "OTHER_BITS". =20 Symbol table stuff: -- is vg_dwarf.h 32-bit specific? -- Elf32_* constants everywhere in vg_symtab2.c, blecch - symtab -- 32-bit specific stuff in here? eg. search for "(UInt)sym->st_value" - stabtype_parser -- all those literal 4's as args to VG_(st_mkint) -- a= re they |
|
From: <sv...@va...> - 2005-04-02 11:40:00
|
Author: tom
Date: 2005-04-02 12:39:56 +0100 (Sat, 02 Apr 2005)
New Revision: 3499
Modified:
trunk/coregrind/amd64-linux/syscalls.c
Log:
Even more amd64 system calls.
Modified: trunk/coregrind/amd64-linux/syscalls.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/syscalls.c 2005-04-01 23:38:37 UTC (rev 3=
498)
+++ trunk/coregrind/amd64-linux/syscalls.c 2005-04-02 11:39:56 UTC (rev 3=
499)
@@ -1078,11 +1078,11 @@
GENX_(__NR_sched_get_priority_max, sys_sched_get_priority_max), // =
146=20
GENX_(__NR_sched_get_priority_min, sys_sched_get_priority_min), // =
147=20
// (__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // =
148=20
- // (__NR_mlock, sys_mlock), // =
149=20
+ GENX_(__NR_mlock, sys_mlock), // =
149=20
=20
- // (__NR_munlock, sys_munlock), // 150=20
- // (__NR_mlockall, sys_mlockall), // 151=20
- // (__NR_munlockall, sys_munlockall), // 152=20
+ GENX_(__NR_munlock, sys_munlock), // 150=20
+ GENX_(__NR_mlockall, sys_mlockall), // 151=20
+ GENX_(__NR_munlockall, sys_munlockall), // 152=20
// (__NR_vhangup, sys_vhangup), // 153=20
// (__NR_modify_ldt, sys_modify_ldt), // 154=20
=20
@@ -1094,7 +1094,7 @@
=20
GENX_(__NR_setrlimit, sys_setrlimit), // 160=20
GENX_(__NR_chroot, sys_chroot), // 161=20
- // (__NR_sync, sys_sync), // 162=20
+ GENX_(__NR_sync, sys_sync), // 162=20
// (__NR_acct, sys_acct), // 163=20
// (__NR_settimeofday, sys_settimeofday), // 164=20
=20
@@ -1147,12 +1147,12 @@
// (__NR_sched_getaffinity, sys_sched_getaffinity), // 204=20
=20
// (__NR_set_thread_area, sys_ni_syscall), // 205=20
- // (__NR_io_setup, sys_io_setup), // 206=20
- // (__NR_io_destroy, sys_io_destroy), // 207=20
- // (__NR_io_getevents, sys_io_getevents), // 208=20
- // (__NR_io_submit, sys_io_submit), // 209=20
+ LINX_(__NR_io_setup, sys_io_setup), // 206=20
+ LINX_(__NR_io_destroy, sys_io_destroy), // 207=20
+ LINXY(__NR_io_getevents, sys_io_getevents), // 208=20
+ LINX_(__NR_io_submit, sys_io_submit), // 209=20
=20
- // (__NR_io_cancel, sys_io_cancel), // 210=20
+ LINXY(__NR_io_cancel, sys_io_cancel), // 210=20
// (__NR_get_thread_area, sys_ni_syscall), // 211=20
// (__NR_lookup_dcookie, sys_lookup_dcookie), // 212=20
// (__NR_epoll_create, sys_epoll_create), // 213=20
|
|
From: <sv...@va...> - 2005-04-02 11:13:56
|
Author: paulus Date: 2005-04-02 12:13:52 +0100 (Sat, 02 Apr 2005) New Revision: 104 Modified: trunk/downloads/pmk/pmk.html Log: Mention that I'm currently working on porting 2.4.0. Modified: trunk/downloads/pmk/pmk.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/downloads/pmk/pmk.html 2005-04-02 11:10:53 UTC (rev 103) +++ trunk/downloads/pmk/pmk.html 2005-04-02 11:13:52 UTC (rev 104) @@ -12,3 +12,5 @@ <a href=3D"/downloads/pmk/valgrind-2.3.0.CVS-ppc-041217.tar.bz2"> valgrind-2.3.0.CVS-ppc-041217 (tar.bz2)</a> [920kB].</p> </ul> + +<p>A port of the Valgrind 2.4.0 release is currently under development.<= /p> |
|
From: <sv...@va...> - 2005-04-02 11:11:21
|
Author: paulus Date: 2005-04-02 12:10:53 +0100 (Sat, 02 Apr 2005) New Revision: 103 Added: trunk/downloads/pmk/valgrind-2.2.0-ppc.tar.bz2 trunk/downloads/pmk/valgrind-2.3.0.CVS-ppc-041217.tar.bz2 Modified: trunk/downloads/pmk/pmk.html trunk/downloads/variants.html Log: Added tar.bz2 files for the existing PPC versions of Valgrind, plus links to them. Modified: trunk/downloads/pmk/pmk.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/downloads/pmk/pmk.html 2005-03-31 15:31:53 UTC (rev 102) +++ trunk/downloads/pmk/pmk.html 2005-04-02 11:10:53 UTC (rev 103) @@ -1,5 +1,14 @@ <h3>Paul Mackerras' Stuff</h3> =20 -<p>Coming soon ... ...</p> +<p>Currently there are two versions of the PowerPC/Linux port available:= </p> =20 +<ul> +<li><p> A version of the Valgrind 2.2.0 release for PowerPC: +<a href=3D"/downloads/pmk/valgrind-2.2.0-ppc.tar.bz2">valgrind-2.2.0-ppc +(tar.bz2)</a> [984kB] - 1 Sep 2004.</p> =20 +<li><p> A more recent version based on the Valgrind development version +from CVS as of 17 December 2004: +<a href=3D"/downloads/pmk/valgrind-2.3.0.CVS-ppc-041217.tar.bz2"> +valgrind-2.3.0.CVS-ppc-041217 (tar.bz2)</a> [920kB].</p> +</ul> Added: trunk/downloads/pmk/valgrind-2.2.0-ppc.tar.bz2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: trunk/downloads/pmk/valgrind-2.2.0-ppc.tar.bz2 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/downloads/pmk/valgrind-2.3.0.CVS-ppc-041217.tar.bz2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: trunk/downloads/pmk/valgrind-2.3.0.CVS-ppc-041217.ta= r.bz2 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/downloads/variants.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/downloads/variants.html 2005-03-31 15:31:53 UTC (rev 102) +++ trunk/downloads/variants.html 2005-04-02 11:10:53 UTC (rev 103) @@ -61,7 +61,8 @@ =20 =20 <p><b>Paul Mackerras</b> has=20 -<a href=3D"/downloads/variants.html?pmk">some stuff too</a>.</p> +<a href=3D"/downloads/variants.html?pmk">ported Valgrind to run on +32-bit PowerPC Linux</a> machines.</p> =20 =20 <p><b>Adam Gundy</b> <arg at cyberscience com> supplied |
|
From: Bryan O'S. <bo...@se...> - 2005-04-02 06:30:12
|
On Fri, 2005-04-01 at 18:46 +0100, Julian Seward wrote: > Hmm, ok. Back to the drawing board. I might stare at the ldso > stuff to see how hard it would be to get it to work on amd64. If you need other amd64-specific stuff, you should look at klibc. It uses an unusual and non-standard dynamic linking mechanism, so that won't be useful to you, but the rest works. You may also want to look at rtldi for dynamic loading. I don't know how applicable to your needs it is, but it seems to be x86-specific again. <b |
|
From: <js...@ac...> - 2005-04-02 03:02:07
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-04-02 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_mmx: valgrind ./insn_mmx insn_mmxext: (skipping, prereq failed: ../../../tests/cputest x86-mmxext) insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 201 tests, 5 stderr failures, 0 stdout failures ================= memcheck/tests/pth_once (stderr) memcheck/tests/scalar (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/writev (stderr) corecheck/tests/fdleak_fcntl (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <to...@co...> - 2005-04-02 02:37:08
|
Nightly build on dunsmere ( athlon, Fedora Core 3 ) started at 2005-04-02 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 == 185 tests, 81 stderr failures, 2 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/badaddrvalue (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badfree (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badloop (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/badrw (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/clientperm (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/doublefree (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/errs1 (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/exitprog (stderr) memcheck/tests/fprw (stderr) memcheck/tests/fwrite (stderr) memcheck/tests/inits (stderr) memcheck/tests/inline (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/malloc1 (stderr) memcheck/tests/malloc2 (stderr) memcheck/tests/malloc3 (stderr) memcheck/tests/manuel1 (stderr) memcheck/tests/manuel2 (stderr) memcheck/tests/manuel3 (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/memalign2 (stderr) memcheck/tests/memalign_test (stderr) memcheck/tests/memcmptest (stderr) memcheck/tests/mempool (stderr) memcheck/tests/metadata (stderr) memcheck/tests/mismatches (stderr) memcheck/tests/mmaptest (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stderr) memcheck/tests/null_socket (stderr) memcheck/tests/overlap (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/post-syscall (stderr) memcheck/tests/realloc1 (stderr) memcheck/tests/realloc2 (stderr) memcheck/tests/realloc3 (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_exit_group (stderr) memcheck/tests/scalar_fork (stderr) memcheck/tests/scalar_supp (stderr) memcheck/tests/scalar_vfork (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/signal2 (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/str_tester (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp2 (stderr) memcheck/tests/suppfree (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/writev (stderr) memcheck/tests/x86/fpeflags (stderr) memcheck/tests/x86/pushfpopf (stderr) memcheck/tests/x86/tronical (stderr) memcheck/tests/zeropage (stderr) cachegrind/tests/chdir (stderr) cachegrind/tests/dlclose (stderr) cachegrind/tests/x86/fpu-28-108 (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <to...@co...> - 2005-04-02 02:29:02
|
Nightly build on dunsmere ( Fedora Core 3 ) started at 2005-04-02 03:20:03 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int sh: line 1: 31212 Segmentation fault VALGRINDLIB=/tmp/valgrind.5503/valgrind/.in_place /tmp/valgrind.5503/valgrind/./coregrind/valgrind --command-line-only=yes --memcheck:leak-check=no --addrcheck:leak-check=no --tool=none ./int >int.stdout.out 2>int.stderr.out pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 207 tests, 2 stderr failures, 0 stdout failures ================= memcheck/tests/scalar (stderr) memcheck/tests/scalar_supp (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-02 02:25:43
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-04-02 03:25:01 BST Checking out vex source tree ... done Building vex ... failed Last 20 lines of log.verbose follow A vex/auxprogs/genoffsets.c A vex/COPYING A vex/test_main.h A vex/Makefile-icc A vex/Makefile Checked out revision 1116. /tmp/valgrind.6007/vex rm -f priv/ir/irdefs.o priv/ir/irmatch.o priv/ir/iropt.o priv/main/vex_main.o priv/main/vex_globals.o priv/main/vex_util.o priv/host-x86/hdefs.o priv/host-amd64/hdefs.o priv/host-arm/hdefs.o priv/host-ppc32/hdefs.o priv/host-x86/isel.o priv/host-amd64/isel.o priv/host-arm/isel.o priv/host-ppc32/isel.o priv/host-generic/h_generic_regs.o priv/host-generic/h_generic_simd64.o priv/host-generic/reg_alloc2.o priv/guest-generic/g_generic_x87.o priv/guest-x86/ghelpers.o priv/guest-amd64/ghelpers.o priv/guest-arm/ghelpers.o priv/guest-ppc32/ghelpers.o priv/guest-x86/toIR.o priv/guest-amd64/toIR.o priv/guest-arm/toIR.o priv/guest-ppc32/toIR.o libvex.a vex test_main.o \ priv/main/vex_svnversion.h \ pub/libvex_guest_offsets.h rm -f priv/main/vex_svnversion.h echo -n "\"" > priv/main/vex_svnversion.h svnversion -n . >> priv/main/vex_svnversion.h echo "\"" >> priv/main/vex_svnversion.h gcc -Wall -g -o auxprogs/genoffsets auxprogs/genoffsets.c ./auxprogs/genoffsets > pub/libvex_guest_offsets.h gcc -g -O -Wall -Wmissing-prototypes -Wshadow -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wmissing-declarations -fpie -Ipub -Ipriv -o priv/ir/irdefs.o \ -c priv/ir/irdefs.c cc1: unrecognized option `-fpie' make: *** [priv/ir/irdefs.o] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-02 02:22:23
|
Nightly build on audi ( Red Hat 9 ) started at 2005-04-02 03:15:01 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow fpu_lazy_eflags: valgrind ./fpu_lazy_eflags insn_basic: valgrind ./insn_basic insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 206 tests, 1 stderr failure, 0 stdout failures ================= memcheck/tests/scalar (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-02 02:20:42
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-04-02 03:20:02 BST Checking out vex source tree ... done Building vex ... failed Last 20 lines of log.verbose follow A vex/auxprogs/genoffsets.c A vex/COPYING A vex/test_main.h A vex/Makefile-icc A vex/Makefile Checked out revision 1116. /tmp/valgrind.21425/vex rm -f priv/ir/irdefs.o priv/ir/irmatch.o priv/ir/iropt.o priv/main/vex_main.o priv/main/vex_globals.o priv/main/vex_util.o priv/host-x86/hdefs.o priv/host-amd64/hdefs.o priv/host-arm/hdefs.o priv/host-ppc32/hdefs.o priv/host-x86/isel.o priv/host-amd64/isel.o priv/host-arm/isel.o priv/host-ppc32/isel.o priv/host-generic/h_generic_regs.o priv/host-generic/h_generic_simd64.o priv/host-generic/reg_alloc2.o priv/guest-generic/g_generic_x87.o priv/guest-x86/ghelpers.o priv/guest-amd64/ghelpers.o priv/guest-arm/ghelpers.o priv/guest-ppc32/ghelpers.o priv/guest-x86/toIR.o priv/guest-amd64/toIR.o priv/guest-arm/toIR.o priv/guest-ppc32/toIR.o libvex.a vex test_main.o \ priv/main/vex_svnversion.h \ pub/libvex_guest_offsets.h rm -f priv/main/vex_svnversion.h echo -n "\"" > priv/main/vex_svnversion.h svnversion -n . >> priv/main/vex_svnversion.h echo "\"" >> priv/main/vex_svnversion.h gcc -Wall -g -o auxprogs/genoffsets auxprogs/genoffsets.c ./auxprogs/genoffsets > pub/libvex_guest_offsets.h gcc -g -O -Wall -Wmissing-prototypes -Wshadow -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wmissing-declarations -fpie -Ipub -Ipriv -o priv/ir/irdefs.o \ -c priv/ir/irdefs.c cc1: unrecognized option `-fpie' make: *** [priv/ir/irdefs.o] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-02 02:16:44
|
Nightly build on ginetta ( Red Hat 8.0 ) started at 2005-04-02 03:10:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 205 tests, 3 stderr failures, 0 stdout failures ================= memcheck/tests/pth_once (stderr) memcheck/tests/scalar (stderr) memcheck/tests/threadederrno (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-02 02:15:58
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-04-02 03:15:02 BST Checking out vex source tree ... done Building vex ... failed Last 20 lines of log.verbose follow A vex/auxprogs/genoffsets.c A vex/COPYING A vex/test_main.h A vex/Makefile-icc A vex/Makefile Checked out revision 1116. /tmp/valgrind.10791/vex rm -f priv/ir/irdefs.o priv/ir/irmatch.o priv/ir/iropt.o priv/main/vex_main.o priv/main/vex_globals.o priv/main/vex_util.o priv/host-x86/hdefs.o priv/host-amd64/hdefs.o priv/host-arm/hdefs.o priv/host-ppc32/hdefs.o priv/host-x86/isel.o priv/host-amd64/isel.o priv/host-arm/isel.o priv/host-ppc32/isel.o priv/host-generic/h_generic_regs.o priv/host-generic/h_generic_simd64.o priv/host-generic/reg_alloc2.o priv/guest-generic/g_generic_x87.o priv/guest-x86/ghelpers.o priv/guest-amd64/ghelpers.o priv/guest-arm/ghelpers.o priv/guest-ppc32/ghelpers.o priv/guest-x86/toIR.o priv/guest-amd64/toIR.o priv/guest-arm/toIR.o priv/guest-ppc32/toIR.o libvex.a vex test_main.o \ priv/main/vex_svnversion.h \ pub/libvex_guest_offsets.h rm -f priv/main/vex_svnversion.h echo -n "\"" > priv/main/vex_svnversion.h svnversion -n . >> priv/main/vex_svnversion.h echo "\"" >> priv/main/vex_svnversion.h gcc -Wall -g -o auxprogs/genoffsets auxprogs/genoffsets.c ./auxprogs/genoffsets > pub/libvex_guest_offsets.h gcc -g -O -Wall -Wmissing-prototypes -Wshadow -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wmissing-declarations -fpie -Ipub -Ipriv -o priv/ir/irdefs.o \ -c priv/ir/irdefs.c cc1: unrecognized option `-fpie' make: *** [priv/ir/irdefs.o] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-02 02:15:52
|
Nightly build on standard ( Red Hat 7.2 ) started at 2005-04-02 03:00:01 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 205 tests, 6 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/pth_once (stderr) memcheck/tests/scalar (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/vgtest_ume (stderr) addrcheck/tests/leak-tree (stderr) make: *** [regtest] Error 1 |