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
(33) |
2
(15) |
3
(20) |
4
(22) |
5
(13) |
|
6
(12) |
7
(32) |
8
(17) |
9
(31) |
10
(21) |
11
(7) |
12
(13) |
|
13
(13) |
14
(12) |
15
(10) |
16
(8) |
17
(7) |
18
(28) |
19
(5) |
|
20
(5) |
21
(7) |
22
(11) |
23
(7) |
24
(13) |
25
(7) |
26
(7) |
|
27
(7) |
28
(15) |
29
(30) |
30
(21) |
31
(6) |
|
|
|
From: <sv...@va...> - 2008-07-04 21:17:59
|
Author: sewardj
Date: 2008-07-04 22:18:05 +0100 (Fri, 04 Jul 2008)
New Revision: 8363
Log:
Many minor improvements for integer code on amd64-linux.
Modified:
branches/PTRCHECK/exp-ptrcheck/pc_list.c
branches/PTRCHECK/exp-ptrcheck/pc_list.h
branches/PTRCHECK/exp-ptrcheck/pc_main.c
Modified: branches/PTRCHECK/exp-ptrcheck/pc_list.c
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/pc_list.c 2008-07-04 15:34:23 UTC (rev 8362)
+++ branches/PTRCHECK/exp-ptrcheck/pc_list.c 2008-07-04 21:18:05 UTC (rev 8363)
@@ -140,7 +140,7 @@
Interval* Interval__construct(Addr left, Addr right, Bool is_zero,
ExeContext* where, SegStatus status)
{
- if (1) VG_(printf)("Interval__construct(%p,%p,%d)\n",
+ if (0) VG_(printf)("Interval__construct(%p,%p,%d)\n",
left, right, (Int)is_zero);
Interval* o = my_malloc( sizeof(Interval) );
o->left = left;
Modified: branches/PTRCHECK/exp-ptrcheck/pc_list.h
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/pc_list.h 2008-07-04 15:34:23 UTC (rev 8362)
+++ branches/PTRCHECK/exp-ptrcheck/pc_list.h 2008-07-04 21:18:05 UTC (rev 8363)
@@ -50,7 +50,7 @@
//-------------------------------------------------------------------
// Seg is equivalent to Interval, but is an extra abstraction layer that
-// makes things a bit easier for use by Annelid. They're both abstract,
+// makes things a bit easier for use by Ptrcheck. They're both abstract,
// primarily because it's easy to screw up the handling of the is_zero case.
typedef struct _Interval Interval;
typedef struct _Interval* Seg;
Modified: branches/PTRCHECK/exp-ptrcheck/pc_main.c
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/pc_main.c 2008-07-04 15:34:23 UTC (rev 8362)
+++ branches/PTRCHECK/exp-ptrcheck/pc_main.c 2008-07-04 21:18:05 UTC (rev 8363)
@@ -143,7 +143,7 @@
//
// What I am not checking, and would be difficult:
// - mmap(...MAP_FIXED...) is not handled specially. It might be used in
-// ways that fool Annelid into giving false positives.
+// ways that fool Ptrcheck into giving false positives.
//
// - syscalls: for those accessing memory, not checking that the asegs of the
// accessed words match the vseg of the accessing pointer, because the
@@ -154,7 +154,7 @@
// What I am not checking, and would be difficult, but doesn't matter:
// - free(p): similar to syscalls, not checking that the p.vseg matches the
// aseg of the first byte in the block. However, Memcheck does an
-// equivalent "bad free" check using shadow_chunks; indeed, Annelid could
+// equivalent "bad free" check using shadow_chunks; indeed, Ptrcheck could
// do the same check, but there's no point duplicating functionality. So
// no loss, really.
//
@@ -642,7 +642,7 @@
ArithSupp,
SysParamSupp,
}
- AnnelidSuppKind;
+ PtrcheckSuppKind;
/* What kind of error it is. */
typedef
@@ -651,7 +651,7 @@
ArithErr, // bad arithmetic between two segment pointers
SysParamErr, // block straddling >1 segment passed to syscall
}
- AnnelidErrorKind;
+ PtrcheckErrorKind;
// These ones called from generated code.
@@ -724,15 +724,17 @@
switch (VG_(get_error_kind)(e1)) {
- case LoadStoreErr:
- case SysParamErr:
- return VG_STREQ(VG_(get_error_string)(e1), VG_(get_error_string)(e2));
+ case LoadStoreErr:
+ case SysParamErr:
+ tl_assert( VG_(get_error_string)(e1) == NULL );
+ tl_assert( VG_(get_error_string)(e2) == NULL );
+ return True;
- case ArithErr:
- return True;
+ case ArithErr:
+ return True;
- default:
- VG_(tool_panic)("eq_Error: unrecognised error kind");
+ default:
+ VG_(tool_panic)("eq_Error: unrecognised error kind");
}
}
@@ -1115,7 +1117,9 @@
static void new_mem_startup( Addr a, SizeT len, Bool rr, Bool ww, Bool xx )
{
+ if (0) VG_(printf)("new_mem_startup(%p,%lu)\n", a, len);
set_mem_unknown( a, len );
+ add_new_segment( VG_(get_running_tid)(), a, len, SegMmap );
}
//zz // XXX: Currently not doing anything with brk() -- new segments, or not?
@@ -1144,6 +1148,7 @@
// otherwise. Hopefully this is rare, though.
static void new_mem_mmap( Addr a, SizeT len, Bool rr, Bool ww, Bool xx )
{
+ if (0) VG_(printf)("new_mem_mmap(%p,%lu)\n", a, len);
//zz #if 0
//zz Seg seg = NULL;
//zz
@@ -1395,8 +1400,9 @@
# define GOF(_fieldname) \
(offsetof(VexGuestAMD64State,guest_##_fieldname))
- Bool is8 = sz == 8;
- Bool is421 = sz == 4 || sz == 2 || sz == 1;
+ Bool isXmmF = sz == 16 || sz == 8 || sz == 4;
+ Bool is421 = sz == 4 || sz == 2 || sz == 1;
+ Bool is8 = sz == 8;
tl_assert(sz > 0);
tl_assert(host_is_little_endian());
@@ -1427,10 +1433,14 @@
if (o == GOF(RAX)+1 && is421) { o -= 1; o -= 0; goto contains_o; }
if (o == GOF(RCX) && is421) { o -= 0; goto contains_o; }
if (o == GOF(RDX) && is421) { o -= 0; goto contains_o; }
+ if (o == GOF(RDX)+1 && is421) { o -= 1; o -= 0; goto contains_o; }
if (o == GOF(RBX) && is421) { o -= 0; goto contains_o; }
if (o == GOF(RBP) && is421) { o -= 0; goto contains_o; }
if (o == GOF(RSI) && is421) { o -= 0; goto contains_o; }
+ if (o == GOF(RDI) && is421) { o -= 0; goto contains_o; }
+ if (o == GOF(R8) && is421) { o -= 0; goto contains_o; }
if (o == GOF(R9) && is421) { o -= 0; goto contains_o; }
+ if (o == GOF(R11) && is421) { o -= 0; goto contains_o; }
if (o == GOF(R12) && is421) { o -= 0; goto contains_o; }
if (o == GOF(R13) && is421) { o -= 0; goto contains_o; }
if (o == GOF(R14) && is421) { o -= 0; goto contains_o; }
@@ -1438,6 +1448,9 @@
if (o == GOF(FS_ZERO) && is8) goto none;
+ if (o == GOF(XMM0) && isXmmF) goto none;
+ if (o == GOF(XMM1) && isXmmF) goto none;
+
VG_(printf)("get_IntRegInfo(amd64):failing on (%d,%d)\n", o, sz);
tl_assert(0);
# undef GOF
@@ -1718,15 +1731,25 @@
# if defined(__NR_arch_prctl)
case __NR_arch_prctl:
# endif
+ case __NR_clock_gettime:
case __NR_close:
+# if defined(__NR_connect)
+ case __NR_connect:
+# endif
case __NR_exit_group:
case __NR_getcwd:
case __NR_getrlimit:
case __NR_fadvise64:
+ case __NR_fcntl:
case __NR_fstat:
+ case __NR_futex:
# if defined(__NR_fstat64)
case __NR_fstat64:
# endif
+ case __NR_getdents64: // something to do with teeth?
+ case __NR_getxattr:
+ case __NR_ioctl: // ioctl -- assuming no pointers returned
+ case __NR_lstat:
case __NR_mprotect:
case __NR_munmap: // die_mem_munmap already called, segment removed
case __NR_open:
@@ -1734,6 +1757,9 @@
case __NR_set_robust_list:
case __NR_set_thread_area:
case __NR_set_tid_address:
+# if defined(__NR_socket)
+ case __NR_socket:
+# endif
case __NR_rt_sigaction:
case __NR_rt_sigprocmask:
case __NR_stat:
@@ -1748,6 +1774,15 @@
VG_(set_syscall_return_shadows)( tid, (UWord)UNKNOWN, 0 );
break;
+ case __NR_lseek:
+ case __NR_readlink:
+ case __NR_poll:
+ case __NR_pwrite64:
+ case __NR_readv:
+ case __NR_writev:
+ VG_(set_syscall_return_shadows)( tid, (UWord)NONPTR, 0 );
+ break;
+
//zz // These ones don't return a pointer, so don't do anything -- already set
//zz // the segment to UNKNOWN in post_reg_write_default().
//zz // 1: // exit (never seen by skin)
@@ -1925,14 +1960,18 @@
if (sizeof(UWord) == 4) {
return (a > 0x01000000UL && a < 0xFF000000UL);
} else {
- return (a > 0x01000000UL && a < 0xFF00000000000000UL);
+ //return (a > 0x01000000UL && a < 0xFF00000000000000UL);
+ return (a > 0x100000UL && a < 0xFF00000000000000UL);
}
}
static __inline__ VG_REGPARM(1)
Seg nonptr_or_unknown(UWord x)
{
- return ( looks_like_a_pointer(x) ? UNKNOWN : NONPTR );
+ Seg res = looks_like_a_pointer(x) ? UNKNOWN : NONPTR;
+ if (0) VG_(printf)("nonptr_or_unknown %s %p\n",
+ res==UNKNOWN ? "UUU" : "nnn", x);
+ return res;
}
//zz static __attribute__((regparm(1)))
@@ -1945,6 +1984,7 @@
static __inline__
void check_load_or_store(Bool is_write, Addr m, UInt sz, Seg mptr_vseg)
{
+checkSeg(mptr_vseg);
if (UNKNOWN == mptr_vseg) {
// do nothing
@@ -2560,7 +2600,7 @@
-/* Carries around state during Annelid instrumentation. */
+/* Carries around state during Ptrcheck instrumentation. */
typedef
struct {
/* MODIFIED: the superblock being constructed. IRStmts are
@@ -3175,6 +3215,7 @@
case Iop_128HIto64: goto n_or_u_64;
case Iop_128to64: goto n_or_u_64;
case Iop_16Uto64: goto n_or_u_64;
+ case Iop_16Sto64: goto n_or_u_64;
case Iop_32HLto64: goto n_or_u_64;
case Iop_MullS32: goto n_or_u_64;
case Iop_MullU32: goto n_or_u_64;
@@ -4295,12 +4336,12 @@
//zz 0
//zz };
- VG_(details_name) ("Annelid");
+ VG_(details_name) ("Ptrcheck");
VG_(details_version) ("0.0.2");
VG_(details_description) ("a pointer-use checker");
VG_(details_copyright_author)(
- "Copyright (C) 2003, and GNU GPL'd, by Nicholas Nethercote.");
- VG_(details_bug_reports_to) ("nj...@ca...");
+ "Copyright (C) 2003-2008, and GNU GPL'd, by Nicholas Nethercote.");
+ VG_(details_bug_reports_to) ("nj...@va...");
VG_(basic_tool_funcs)( pc_post_clo_init,
pc_instrument,
|
|
From: <sv...@va...> - 2008-07-04 15:34:16
|
Author: bart
Date: 2008-07-04 16:34:23 +0100 (Fri, 04 Jul 2008)
New Revision: 8362
Log:
Changed exp-drd tool name into drd.
Modified:
trunk/coregrind/m_redir.c
trunk/drd/TODO.txt
trunk/drd/Testing.txt
trunk/drd/docs/drd-manual.xml
trunk/drd/drd_main.c
trunk/drd/scripts/run-matinv
trunk/drd/scripts/run-splash2
trunk/drd/tests/filter_stderr
trunk/glibc-2.X-drd.supp
Modified: trunk/coregrind/m_redir.c
===================================================================
--- trunk/coregrind/m_redir.c 2008-07-04 15:14:35 UTC (rev 8361)
+++ trunk/coregrind/m_redir.c 2008-07-04 15:34:23 UTC (rev 8362)
@@ -904,9 +904,9 @@
NULL /* not mandatory - so why bother at all? */
/* glibc-2.6.1 (openSUSE 10.3, ppc32) seems fine without it */
);
- } else if (0 == VG_(strcmp)("exp-drd", VG_(details).name)) {
+ } else if (0 == VG_(strcmp)("drd", VG_(details).name)) {
/* Only continue if symbol information in ld.so.1 is present, */
- /* because otherwise exp-drd's suppression patterns on ld.so do */
+ /* because otherwise drd's suppression patterns on ld.so do */
/* not have any effect. */
add_hardwired_spec(
"ld.so.1", "strlen",
@@ -939,9 +939,9 @@
/* glibc-2.5 (FC6, ppc64) seems fine without it */
);
- } else if (0 == VG_(strcmp)("exp-drd", VG_(details).name)) {
+ } else if (0 == VG_(strcmp)("drd", VG_(details).name)) {
/* Only continue if symbol information in ld64.so.1 is present, */
- /* because otherwise exp-drd's suppression patterns on ld.so do */
+ /* because otherwise drd's suppression patterns on ld.so do */
/* not have any effect. */
add_hardwired_spec(
"ld64.so.1", "strlen",
Modified: trunk/drd/TODO.txt
===================================================================
--- trunk/drd/TODO.txt 2008-07-04 15:14:35 UTC (rev 8361)
+++ trunk/drd/TODO.txt 2008-07-04 15:34:23 UTC (rev 8362)
@@ -4,7 +4,6 @@
Data-race detection algorithm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Propose to rename exp-drd back to drd.
- Memory pool support.
- Find out why DRD reports an error on the POSIX implementation of libgomp.so.
- Add locking order checking. Start from the following information:
Modified: trunk/drd/Testing.txt
===================================================================
--- trunk/drd/Testing.txt 2008-07-04 15:14:35 UTC (rev 8361)
+++ trunk/drd/Testing.txt 2008-07-04 15:34:23 UTC (rev 8362)
@@ -3,21 +3,21 @@
1. Run the regression tests. After having compiled DRD, run the following
command:
- perl tests/vg_regtest exp-drd
+ perl tests/vg_regtest drd
2. Test the slowdown for matinv for various matrix sizes via the script
- exp-drd/scripts/run-matinv (must be about 24 for i == 1 and about
+ drd/scripts/run-matinv (must be about 24 for i == 1 and about
31 for i == 10 with n == 200).
3. Test whether DRD works with standard KDE applications and whether it does
not print any false positives:
- ./vg-in-place --tool=exp-drd kate
- ./vg-in-place --tool=exp-drd --check-stack-var=yes kate
- ./vg-in-place --trace-children=yes --tool=exp-drd knode
- ./vg-in-place --trace-children=yes --tool=exp-drd --check-stack-var=yes knode
- ./vg-in-place --trace-children=yes --tool=exp-drd amarokapp
+ ./vg-in-place --tool=drd kate
+ ./vg-in-place --tool=drd --check-stack-var=yes kate
+ ./vg-in-place --trace-children=yes --tool=drd knode
+ ./vg-in-place --trace-children=yes --tool=drd --check-stack-var=yes knode
+ ./vg-in-place --trace-children=yes --tool=drd amarokapp
4. Test whether DRD works with standard GNOME applications. Expect
race reports triggered by ORBit_RootObject_duplicate() and after
having closed the GNOME terminal window:
- ./vg-in-place --trace-children=yes --tool=exp-drd gnome-terminal
+ ./vg-in-place --trace-children=yes --tool=drd gnome-terminal
5. Test DRD with Firefox. First of all, build and install Firefox 3. Next,
run the following command:
- LD_LIBRARY_PATH=$HOME/software/mozilla-build/dist/lib: ./vg-in-place --trace-children=yes --tool=exp-drd $HOME/software/mozilla-build/dist/bin/firefox-bin
+ LD_LIBRARY_PATH=$HOME/software/mozilla-build/dist/lib: ./vg-in-place --trace-children=yes --tool=drd $HOME/software/mozilla-build/dist/bin/firefox-bin
Modified: trunk/drd/docs/drd-manual.xml
===================================================================
--- trunk/drd/docs/drd-manual.xml 2008-07-04 15:14:35 UTC (rev 8361)
+++ trunk/drd/docs/drd-manual.xml 2008-07-04 15:34:23 UTC (rev 8362)
@@ -8,7 +8,7 @@
<title>DRD: a thread error detector</title>
<para>To use this tool, you must specify
-<computeroutput>--tool=exp-drd</computeroutput>
+<computeroutput>--tool=drd</computeroutput>
on the Valgrind command line.</para>
@@ -549,7 +549,7 @@
detects a data race:
</para>
<programlisting><![CDATA[
-$ valgrind --tool=exp-drd --var-info=yes exp-drd/tests/rwlock_race
+$ valgrind --tool=drd --var-info=yes drd/tests/rwlock_race
...
==9466== Thread 3:
==9466== Conflicting load by thread 3/3 at 0x006020b8 size 4
@@ -683,7 +683,7 @@
longer than the specified threshold. An example:
</para>
<programlisting><![CDATA[
-$ valgrind --tool=exp-drd --exclusive-threshold=10 exp-drd/tests/hold_lock -i 500
+$ valgrind --tool=drd --exclusive-threshold=10 drd/tests/hold_lock -i 500
...
==10668== Acquired at:
==10668== at 0x4C267C8: pthread_mutex_lock (drd_pthread_intercepts.c:395)
@@ -1014,7 +1014,7 @@
libgomp libraries that have been configured with this flag and in
which symbol information is present. For most Linux distributions this
means that you will have to recompile gcc. See also the script
-<literal>exp-drd/scripts/download-and-build-gcc</literal> in the
+<literal>drd/scripts/download-and-build-gcc</literal> in the
Valgrind source tree for an example of how to compile gcc. You will
also have to make sure that the newly compiled
<literal>libgomp.so</literal> library is loaded when OpenMP programs
@@ -1027,7 +1027,7 @@
<para>
As an example, the test OpenMP test program
-<literal>exp-drd/scripts/omp_matinv</literal> triggers a data race
+<literal>drd/scripts/omp_matinv</literal> triggers a data race
when the option -r has been specified on the command line. The data
race is triggered by the following code:
</para>
@@ -1052,7 +1052,7 @@
for the above code:
</para>
<programlisting><![CDATA[
-$ valgrind --check-stack-var=yes --var-info=yes --tool=exp-drd exp-drd/tests/omp_matinv 3 -t 2 -r
+$ valgrind --check-stack-var=yes --var-info=yes --tool=drd drd/tests/omp_matinv 3 -t 2 -r
...
Conflicting store by thread 1/1 at 0x7fefffbc4 size 4
at 0x4014A0: gj.omp_fn.0 (omp_matinv.c:203)
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2008-07-04 15:14:35 UTC (rev 8361)
+++ trunk/drd/drd_main.c 2008-07-04 15:34:23 UTC (rev 8362)
@@ -192,7 +192,7 @@
" reading in all debug information at once may cause an out of\n"
" memory error [no].\n"
"\n"
-" exp-drd options for monitoring process behavior:\n"
+" drd options for monitoring process behavior:\n"
" --trace-addr=<address> Trace all load and store activity for the.\n"
" specified address [off].\n"
" --trace-barrier=yes|no Trace all barrier activity [no].\n"
@@ -1216,7 +1216,7 @@
{
// Basic tool stuff.
- VG_(details_name) ("exp-drd");
+ VG_(details_name) ("drd");
VG_(details_version) (NULL);
VG_(details_description) ("a thread error detector");
VG_(details_copyright_author)("Copyright (C) 2006-2008, and GNU GPL'd,"
Modified: trunk/drd/scripts/run-matinv
===================================================================
--- trunk/drd/scripts/run-matinv 2008-07-04 15:14:35 UTC (rev 8361)
+++ trunk/drd/scripts/run-matinv 2008-07-04 15:34:23 UTC (rev 8362)
@@ -16,7 +16,7 @@
fi
VG="${DRD_SCRIPTS_DIR}/../../vg-in-place"
-MATINV="${DRD_SCRIPTS_DIR}/../../exp-drd/tests/matinv"
+MATINV="${DRD_SCRIPTS_DIR}/../../drd/tests/matinv"
for n in 200 400
@@ -34,6 +34,6 @@
print_runtime_ratio ${avg1} ${stddev1} ${vsz1} ${vszdev1} \
${VG} --tool=none ${MATINV} $n -t$i
print_runtime_ratio ${avg1} ${stddev1} ${vsz1} ${vszdev1} \
- ${VG} --tool=exp-drd ${MATINV} $n -t$i
+ ${VG} --tool=drd ${MATINV} $n -t$i
done
done
Modified: trunk/drd/scripts/run-splash2
===================================================================
--- trunk/drd/scripts/run-splash2 2008-07-04 15:14:35 UTC (rev 8361)
+++ trunk/drd/scripts/run-splash2 2008-07-04 15:34:23 UTC (rev 8362)
@@ -41,12 +41,12 @@
p=4
test_output="${1}-drd-with-stack-var-4.out" \
print_runtime_ratio ${avg4} ${stddev4} ${vsz4} ${vszdev4} \
- $VG --tool=exp-drd --check-stack-var=yes "$@" -p${psep}${p} "${test_args}"
+ $VG --tool=drd --check-stack-var=yes "$@" -p${psep}${p} "${test_args}"
p=4
test_output="${1}-drd-without-stack-var-4.out" \
print_runtime_ratio ${avg4} ${stddev4} ${vsz4} ${vszdev4} \
- $VG --tool=exp-drd --check-stack-var=no "$@" -p${psep}${p} "${test_args}"
+ $VG --tool=drd --check-stack-var=no "$@" -p${psep}${p} "${test_args}"
p=4
test_output="${1}-helgrind-4.out" \
@@ -95,10 +95,10 @@
# 9. Virtual memory size ratio for --tool=none -p1 versus -p1.
# 10. Execution time ratio for --tool=none -p4 versus -p4.
# 11. Virtual memory size ratio for --tool=none -p4 versus -p4.
-# 12. Execution time ratio for --tool=exp-drd --check-stack-var=yes -p4 versus -p4.
-# 13. Virtual memory size ratio for --tool=exp-drd --check-stack-var=yes -p4 versus -p4.
-# 14. Execution time ratio for --tool=exp-drd --check-stack-var=no -p4 versus -p4.
-# 15. Virtual memory size ratio for --tool=exp-drd --check-stack-var=no -p4 versus -p4.
+# 12. Execution time ratio for --tool=drd --check-stack-var=yes -p4 versus -p4.
+# 13. Virtual memory size ratio for --tool=drd --check-stack-var=yes -p4 versus -p4.
+# 14. Execution time ratio for --tool=drd --check-stack-var=no -p4 versus -p4.
+# 15. Virtual memory size ratio for --tool=drd --check-stack-var=no -p4 versus -p4.
# 16. Execution time ratio for --tool=helgrind -p4 versus -p4.
# 17. Virtual memory size ratio for --tool=helgrind -p4 versus -p4.
# 18. Execution time ratio for Intel Thread Checker -p4 versus -p4.
Modified: trunk/drd/tests/filter_stderr
===================================================================
--- trunk/drd/tests/filter_stderr 2008-07-04 15:14:35 UTC (rev 8361)
+++ trunk/drd/tests/filter_stderr 2008-07-04 15:34:23 UTC (rev 8362)
@@ -9,7 +9,7 @@
# Remove libpthread's version number.
# Remove line numbers from stack traces.
sed \
--e "/^exp-drd, a thread error detector\.$/d" \
+-e "/^drd, a thread error detector\.$/d" \
-e "s/^Allocation context: stack of thread \([0-9]*\), offset -[0-9]*$/Allocation context: stack of thread \1, offset .../" \
-e "/^warning: evaluate_Dwarf3_Expr: unhandled DW_OP_.*/d" \
-e "s/, in frame #[0-9]* of thread /, in frame #? of thread /" \
Modified: trunk/glibc-2.X-drd.supp
===================================================================
--- trunk/glibc-2.X-drd.supp 2008-07-04 15:14:35 UTC (rev 8361)
+++ trunk/glibc-2.X-drd.supp 2008-07-04 15:34:23 UTC (rev 8362)
@@ -1,81 +1,81 @@
{
dl
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:_dl_fixup
fun:_dl_runtime_resolve
}
{
dl
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:_dl_fini
fun:exit
}
{
dl-2.6.*
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
obj:/lib*/ld-*.so
fun:exit
}
{
dl-2.6.*
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
obj:/lib*/ld-*.so
obj:/lib*/ld-*.so
obj:/lib*/ld-*.so
}
{
libc
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:__libc_enable_asynccancel
obj:/lib*/libc-*
}
{
libc
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:__libc_disable_asynccancel
obj:/lib*/libc-*
}
{
librt
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:__librt_enable_asynccancel
}
{
librt
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:__librt_disable_asynccancel
}
{
libstdc++
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:_ZN9__gnu_cxx12__atomic_addEPVii
}
{
libstdc++ std::string::string()
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:_ZNSsC1ERKSs
}
{
libstdc++
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:_ZN9__gnu_cxx18__exchange_and_addEPVii
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:start_thread
fun:clone
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
obj:/lib*/libpthread-*.so
fun:start_thread
fun:clone
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:clone
fun:create_thread
fun:pthread_create*
@@ -83,7 +83,7 @@
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
obj:/lib*/libc-*.so
fun:__libc_thread_freeres
fun:start_thread
@@ -91,7 +91,7 @@
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
obj:/lib*/libc-*.so
obj:/lib*/libc-*.so
fun:__libc_thread_freeres
@@ -100,20 +100,20 @@
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:__nptl_deallocate_tsd
fun:start_thread
fun:clone
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:pthread_create@@GLIBC_*
fun:pthread_create*
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:clone
fun:do_clone
fun:pthread_create@@GLIBC_*
@@ -121,52 +121,52 @@
}
{
pthread-glibc2.7-pthread_create
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:memset
fun:pthread_create*
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:pthread_mutex_lock
fun:pthread_mutex_lock
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:__pthread_mutex_cond_lock
fun:pthread_cond_wait@@GLIBC_*
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:clone
fun:pthread_create*
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:do_clone
fun:pthread_create@@GLIBC_*
fun:pthread_create*
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:memset
fun:pthread_create@@GLIBC_*
fun:pthread_create*
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:_dl_allocate_tls_init
fun:pthread_create@@GLIBC_*
fun:pthread_create*
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:memset
fun:_dl_allocate_tls_init
fun:pthread_create@@GLIBC_*
@@ -174,27 +174,27 @@
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:mempcpy
fun:pthread_create@@GLIBC_*
fun:pthread_create*
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:pthread_join
fun:pthread_join
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:allocate_stack
fun:pthread_create*
fun:pthread_create*
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:get_cached_stack
fun:allocate_stack
fun:pthread_create*
@@ -202,12 +202,12 @@
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:__deallocate_stack
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:free_stacks
fun:__deallocate_stack
fun:pthread_join
@@ -215,33 +215,33 @@
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:__free_tcb
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:__pthread_enable_asynccancel
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:__pthread_disable_asynccancel
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:pthread_cancel
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:sigcancel_handler
obj:/lib*/libpthread-*
}
{
pthread-unwind
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:_Unwind_ForcedUnwind
fun:__pthread_unwind
fun:sigcancel_handler
@@ -249,63 +249,63 @@
}
{
pthread-unwind
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:_Unwind_ForcedUnwind
fun:__pthread_unwind
}
{
pthread-unwind
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:_Unwind_GetCFA
fun:unwind_stop
}
{
pthread-unwind
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:uw_update_context
fun:_Unwind_ForcedUnwind_Phase2
}
{
pthread-unwind
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:uw_frame_state_for
fun:_Unwind_ForcedUnwind_Phase2
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:pthread_detach
fun:pthread_detach
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:pthread_getspecific
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:pthread_setspecific
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:pthread_key_delete
}
{
pthread
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
fun:_pthread_cleanup_push_defer
}
{
gomp
- exp-drd:ConflictingAccess
+ drd:ConflictingAccess
obj:/usr/lib*/libgomp.so*
obj:/usr/lib*/libgomp.so*
}
{
libX11-XCreateFontSet
- exp-drd:CondErr
+ drd:CondErr
fun:pthread_cond_init*
fun:_XReply
fun:XListFontsWithInfo
@@ -315,7 +315,7 @@
}
{
libxcb-xcb_wait_for_reply
- exp-drd:CondErr
+ drd:CondErr
fun:pthread_cond_destroy*
fun:xcb_wait_for_reply
}
|
|
From: <sv...@va...> - 2008-07-04 15:14:33
|
Author: bart Date: 2008-07-04 16:14:35 +0100 (Fri, 04 Jul 2008) New Revision: 8361 Log: Renamed exp-drd directory into drd. Moved drd from the experimental tool class to the class of regular tools. Added: trunk/drd/ trunk/drd/drd_main.c trunk/drd/scripts/download-and-build-gcc trunk/drd/tests/Makefile.am trunk/drd/tests/filter_stderr Removed: trunk/drd/docs/README.txt trunk/drd/drd_main.c trunk/drd/scripts/download-and-build-gcc trunk/drd/tests/Makefile.am trunk/drd/tests/abort.cpp trunk/drd/tests/filter_stderr trunk/exp-drd/ Modified: trunk/Makefile.am trunk/README_PACKAGERS trunk/configure.in trunk/docs/xml/manual.xml trunk/drd/Makefile.am trunk/drd/tests/drd_bitmap_test.c [... diff too large to include ...] |
|
From: Julian S. <js...@ac...> - 2008-07-04 15:03:32
|
On Friday 04 July 2008 09:29, Bart Van Assche wrote: > Merging the whole FORMATCHECK branch at once to the trunk is also fine > for me. Who should do this, and when should this happen ? First, get it to the point where you and Dirk consider it to be complete/working/ok for testing (maybe it already is at that point, but you need to make this clear). Then mail the list to say so, so as to give others a chance to test it. > Do we really support compilation of Valgrind with gcc 3.0 and 3.1 ? > These two compiler versions are not supported for compiling the Linux > kernel because these two versions do not compile the kernel code > correctly. If we can support 3.0 and 3.1 without difficulty, I don't see why we shouldn't. I've been trying to build 3.0.4 and then build FORMATCHECK with it, but so far failed for unrelated issues. I'll keep trying over the weekend. J |
|
From: <sv...@va...> - 2008-07-04 14:48:30
|
Author: bart
Date: 2008-07-04 15:48:39 +0100 (Fri, 04 Jul 2008)
New Revision: 8360
Log:
Tool description is now the same as in the manual.
Modified:
trunk/exp-drd/drd_main.c
trunk/exp-drd/tests/filter_stderr
Modified: trunk/exp-drd/drd_main.c
===================================================================
--- trunk/exp-drd/drd_main.c 2008-07-04 14:47:27 UTC (rev 8359)
+++ trunk/exp-drd/drd_main.c 2008-07-04 14:48:39 UTC (rev 8360)
@@ -1218,7 +1218,7 @@
VG_(details_name) ("exp-drd");
VG_(details_version) (NULL);
- VG_(details_description) ("a data race detector");
+ VG_(details_description) ("a thread error detector");
VG_(details_copyright_author)("Copyright (C) 2006-2008, and GNU GPL'd,"
" by Bart Van Assche.");
VG_(details_bug_reports_to) (VG_BUGS_TO);
Modified: trunk/exp-drd/tests/filter_stderr
===================================================================
--- trunk/exp-drd/tests/filter_stderr 2008-07-04 14:47:27 UTC (rev 8359)
+++ trunk/exp-drd/tests/filter_stderr 2008-07-04 14:48:39 UTC (rev 8360)
@@ -9,7 +9,7 @@
# Remove libpthread's version number.
# Remove line numbers from stack traces.
sed \
--e "/^exp-drd, a data race detector\.$/d" \
+-e "/^exp-drd, a thread error detector\.$/d" \
-e "s/^Allocation context: stack of thread \([0-9]*\), offset -[0-9]*$/Allocation context: stack of thread \1, offset .../" \
-e "/^warning: evaluate_Dwarf3_Expr: unhandled DW_OP_.*/d" \
-e "s/, in frame #[0-9]* of thread /, in frame #? of thread /" \
|
|
From: <sv...@va...> - 2008-07-04 14:47:33
|
Author: bart
Date: 2008-07-04 15:47:27 +0100 (Fri, 04 Jul 2008)
New Revision: 8359
Log:
Support .tar.gz archives next to .tar.bz2 archives.
Modified:
trunk/exp-drd/scripts/download-and-build-gcc
Modified: trunk/exp-drd/scripts/download-and-build-gcc
===================================================================
--- trunk/exp-drd/scripts/download-and-build-gcc 2008-07-04 11:47:06 UTC (rev 8358)
+++ trunk/exp-drd/scripts/download-and-build-gcc 2008-07-04 14:47:27 UTC (rev 8359)
@@ -34,7 +34,13 @@
cd ${BUILD} || exit $?
if [ ! -e $DOWNLOADS/$TAR ]; then
- ( cd $DOWNLOADS && wget -q $FSF_MIRROR/gcc/gcc-${GCC_VERSION}/$TAR )
+(
+ if cd $DOWNLOADS; then
+ wget -q $FSF_MIRROR/gcc/gcc-${GCC_VERSION}/$TAR \
+ || { wget -q -O- $FSF_MIRROR/gcc/gcc-${GCC_VERSION}/${TAR%bz2}gz \
+ | gzip -cd | bzip2 -9 >${TAR}; }
+ fi
+)
fi
if [ ! -e $SRC ]; then
|
|
From: <sv...@va...> - 2008-07-04 11:47:00
|
Author: bart
Date: 2008-07-04 12:47:06 +0100 (Fri, 04 Jul 2008)
New Revision: 8358
Log:
Added missing filenames to EXTRA_DIST.
Modified:
trunk/exp-drd/tests/Makefile.am
Modified: trunk/exp-drd/tests/Makefile.am
===================================================================
--- trunk/exp-drd/tests/Makefile.am 2008-07-04 11:45:38 UTC (rev 8357)
+++ trunk/exp-drd/tests/Makefile.am 2008-07-04 11:47:06 UTC (rev 8358)
@@ -18,6 +18,8 @@
EXTRA_DIST = \
$(noinst_SCRIPTS) \
drd_bitmap_test.stderr.exp \
+ drd_bitmap_test.stdout.exp \
+ drd_bitmap_test.vgtest \
fp_race.stderr.exp \
fp_race.vgtest \
fp_race2.stderr.exp \
@@ -31,6 +33,7 @@
hg04_race.stderr.exp \
hg04_race.vgtest \
hg05_race2.stderr.exp \
+ hg05_race2.stderr.exp-powerpc \
hg05_race2.vgtest \
hg06_readshared.stderr.exp \
hg06_readshared.vgtest \
@@ -42,6 +45,7 @@
linuxthreads_det.stderr.exp-linuxthreads \
linuxthreads_det.stdout.exp \
linuxthreads_det.stdout.exp-linuxthreads \
+ linuxthreads_det.vgtest \
matinv.stderr.exp \
matinv.stdout.exp \
matinv.vgtest \
@@ -84,8 +88,8 @@
pth_detached_sem.stderr.exp \
pth_detached_sem.stdout.exp \
pth_detached_sem.vgtest \
- pth_inconsistent_cond_wait.stderr.exp \
- pth_inconsistent_cond_wait.vgtest \
+ pth_inconsistent_cond_wait.stderr.exp \
+ pth_inconsistent_cond_wait.vgtest \
recursive_mutex.stderr.exp \
recursive_mutex.stdout.exp \
recursive_mutex.vgtest \
@@ -141,10 +145,12 @@
tc19_shadowmem.vgtest \
tc20_verifywrap.stderr.exp \
tc20_verifywrap.stderr.exp-glibc2.3 \
+ tc20_verifywrap.stderr.exp-glibc2.8 \
tc20_verifywrap.vgtest \
tc20_verifywrap2.stderr.exp \
tc20_verifywrap2.stderr.exp-glibc2.3 \
tc20_verifywrap2.stderr.exp-glibc2.3-b \
+ tc20_verifywrap2.stderr.exp-glibc2.8 \
tc20_verifywrap2.vgtest \
tc21_pthonce.stderr.exp \
tc21_pthonce.stdout.exp \
@@ -156,7 +162,8 @@
tc23_bogus_condwait.vgtest \
tc24_nonzero_sem.stderr.exp \
tc24_nonzero_sem.vgtest \
- trylock.stderr.exp
+ trylock.stderr.exp \
+ trylock.vgtest
AM_CFLAGS = $(WERROR) -Wall @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter\
-g $(AM_FLAG_M3264_PRI) -DVGA_$(VG_ARCH)=1 -DVGO_$(VG_OS)=1 \
|
|
From: <sv...@va...> - 2008-07-04 11:45:30
|
Author: bart Date: 2008-07-04 12:45:38 +0100 (Fri, 04 Jul 2008) New Revision: 8357 Log: Removed empty file. Removed: trunk/exp-drd/tests/abort.cpp Deleted: trunk/exp-drd/tests/abort.cpp =================================================================== |
|
From: <sv...@va...> - 2008-07-04 11:39:33
|
Author: bart
Date: 2008-07-04 12:39:32 +0100 (Fri, 04 Jul 2008)
New Revision: 8356
Log:
Removed obsolete README.txt.
Removed:
trunk/exp-drd/docs/README.txt
Deleted: trunk/exp-drd/docs/README.txt
===================================================================
--- trunk/exp-drd/docs/README.txt 2008-07-04 10:12:01 UTC (rev 8355)
+++ trunk/exp-drd/docs/README.txt 2008-07-04 11:39:32 UTC (rev 8356)
@@ -1,579 +0,0 @@
-DRD: a Data Race Detector
-=========================
-
-Last update: March 16, 2008 by Bart Van Assche.
-
-
-Introduction
-------------
-
-Multithreading is a concept to model multiple concurrent activities
-within a single process. Each such concurrent activity is called a
-thread. All threads that are active within a process share the same
-set of memory locations. Data is exchanged between threads by writing
-to and reading from the shared memory. Since the invention of the
-multithreading concept, there is an ongoing debate about which way to
-model concurrent activities is better -- shared memory programming or
-message passing. This debate exists because each model has significant
-advantages and disadvantages. While shared memory programming relieves
-the programmer from writing code for the exchange of data between
-concurrent activities and while shared memory programming has a
-performance advantage over message passing, shared memory programming
-is error prone. Shared memory programs can exhibit data races and/or
-deadlocks. Data races are harmful because these may lead to
-unpredictable results and nondeterministic behavior in multithreaded
-programs. There are two ways to detect data races and deadlocks:
-static analysis and runtime detection by a tool. Since there do not
-yet exist any tools that can carry out static analysis of data races
-or deadlocks, the only option to statically detect such anomalies is
-source reading by a human. It takes a huge effort however to detect
-all possible data races or deadlocks via source reading. This is why
-tools for detecting data races and deadlocks at runtime are essential.
-
-Threads can be used to model simultaneous activities in software, to
-allow software to use more than one core of a multiprocessor or both
-at the same time. Most multithreaded server and embedded software
-falls in the first category, while most multithreaded high performance
-computing (HPC) applications fall in the second category. The source
-code syntax for using multithreading depends on the programming
-language and the threading library you want to use. Two common options
-on Unix systems are the POSIX threads library for modeling
-simultaneous activities in C and C++ software and OpenMP for C, C++
-and Fortran HPC applications.
-
-
-Data Races
-----------
-
-Threads in a multithreaded process exchange information by writing to
-and reading from memory locations shared by the threads. Two accesses
-to the same memory location by different threads are called
-conflicting accesses if at least one of these two accesses modifies
-the contents of the memory location.
-
-A deterministic exchange of data between threads is only possible if
-conflicting accesses happen in a well-defined order. It is the role of
-synchronization actions to enforce the runtime execution order of
-conflicting accesses. Examples of such synchronization actions are
-pthread_mutex_lock(), pthread_mutex_unlock(), sem_wait(), sem_post(),
-...
-
-An important concept with regard to the ordering of load and store
-operations on shared memory is the happens-before-1 relation or hb1
-[Adve 1991]. The hb1 relation is a partial order defined over all
-shared memory operations. The hb1 relation includes both the
-intrathread execution order and the interthread ordering imposed by
-synchronization operations. All intrathread accesses of a single
-thread are totally ordered by hb1. Since hb1 is a partial order for
-interthread memory accesses, interthread memory accesses are either
-ordered or not ordered by hb1. A data race is defined by Adve et
-al. as two conflicting accesses that are not ordered by the
-happens-before-1 relation. Or: which accesses are considered as data
-races depends on the runtime behavior of a program.
-
-There is an interesting relationship between runtime behavior and
-multithreaded design patterns. The most straightforward way to ensure
-that different threads access shared data in an orderly fashion is to
-ensure that at most one thread can access the object at any given
-time. This can be realized by a programmer to surround all shared data
-accesses with calls to proper synchronization functions. Such a source
-code strategy for avoiding data races is also called a locking
-discipline. An important property of programs that follow this
-strategy is that these programs are data-race free.
-
-There exist two kinds of tools for verifying the runtime behavior of
-multithreaded programs. One class of tools verifies a locking
-strategy, and another class of tools verifies the absence of data
-races. The difference is subtle but important.
-
-The most well know algorithm for runtime verification of a locking
-strategy is the so called Eraser algorithm [Savage 1997]. While this
-algorithm allows to catch more programming errors than the conflicting
-accesses classified as data races by the definition of Sarita Adve et
-al., unfortunately the Eraser algorithm also reports a lot of false
-positives. It is tedious to review the output of the Eraser tool
-manually and to verify which reported pairs of accesses are false
-positives and which pairs are real data races. There is still research
-ongoing about how to reduce the number of false positives reported by
-the Eraser algorithm -- see e.g. [Müehlenfeld 2007]. The Helgrind
-tool is a refinement of the Eraser algorithm.
-
-A second class of data race detection tools detects all conflicting
-accesses that are data races according to the definition of Sarita
-Adve et al. While in theory there is no guarantee that these tools
-detect all locking discipline violations, these tools do not report
-false positives. These tools are the most practical tools to
-use. Examples of this class of tools are DIOTA [Ronsse 2004], Intel(R)
-Thread Checker [Banerjee 2006a, Banerjee 2006b, Sack 2006] and DRD.
-
-
-About DRD
----------
-
-DRD is still under development, that is why the tool is named exp-drd.
-The current version runs well under Linux on x86 CPU's for
-multithreaded programs that use the POSIX threading library. Regular
-POSIX threads, detached threads, mutexes, condition variables,
-reader-writer locks, spinlocks, semaphores and barriers are supported.
-Client programs run under exp-drd typically run somewhere between 50
-and 100 times slower than when executed natively. A notable exception
-is Firefox, which runs too slow to be usable. This is because of the
-huge number of mutex lock and unlock calls performed by
-Firefox. E.g. just starting and stopping Firefox 3 triggers 2.5
-million pthread_mutex_lock() calls and the same number of
-pthread_mutex_unlock() calls.
-
-
-Programming with Threads
-------------------------
-
-The difficulties with shared memory programming are well known and
-have been outlined in more than one paper [Ousterhout 1996, Lee
-2006]. It is possible however to develop and to debug multithreaded
-shared memory software with a reasonable effort, even for large
-applications (more than one million lines of code). In what follows an
-approach is explained that has proven to work in practice. Before you
-decide to use another approach, make sure you understand very well the
-consequences of doing so.
-
-Note: the guidelines below apply to the explicit use of threads such
-as with the POSIX threads library, and not to OpenMP programs.
-
-1. Use of synchronization calls.
-
-Do not call synchronization functions directly but use objects that
-encapsulate the mutex, Mesa monitor and reader/writer locking policies.
-Never use POSIX condition variables directly, since direct use of
-condition variables can easily introduce race conditions. And never
-lock or unlock mutexes explicitly -- use scoped locking instead.
-
-2. Data hiding.
-
-It is very important in multithreaded software to hide data that is
-shared over threads. Make sure that all shared data is declared as
-private data members of a class (not public, not protected). Design
-the classes that contain shared data such that the number of data
-members and the number of member functions is relatively small. Define
-accessor functions as needed for querying and modifying member
-data. Declare the associated locking objects also as private data
-members, and document which locking object protects which data
-members. Make sure that the query functions return a copy of data
-members instead of a reference -- returning a reference would violate
-data hiding anyway. This approach has a big advantage, namely that
-correct use of a locking policy can be verified by reviewing one class
-at a time.
-
-3. Modularity and hierarchy.
-
-For multithreaded software it is even more important than for single
-threaded software that the software has a modular structure and that
-there exists a hierarchy between modules. This way every call of a
-function to another function can be classified as either a regular
-function call (a call from a higher level to a lower level), a
-callback (a call from a lower level to a higher level) or a recursive
-function call.
-
-4. Avoiding deadlocks.
-
-Deadlocks can be nasty to solve since some deadlocks are very hard to
-reproduce. Prevent deadlocks instead of waiting until one pops
-up. Preventing deadlocks is possible by making sure that whenever two
-or more mutexes are locked simultaneously, these mutexes are always
-locked in the same order. One way to ensure this is by assigning each
-mutex a locking order and by verifying the locking order at runtime.
-This reduces the complexity of testing for absence of deadlocks from a
-multithreaded to a single-threaded problem, which is a huge win. In
-order to verify a locking order policy at run time, one can either use
-a threading library with built-in support for verifying such a policy
-or one can use a tool that verifies the locking order.
-
-Make sure that no mutexes are locked while invoking a callback
-(calling a function from a higher level module) -- invoking a
-callback while a mutex is locked is a well known way to trigger
-a deadlock.
-
-5. Real-time software
-
-Software with hard real-time constraints is a special case. There
-exist real-time applications that must be able to generate a response
-within e.g. 1 ms after a certain input has been received. The proper
-way to implement time-critical paths is not to call any function in
-that path for which it is not known how long the function call will
-take. Exmples for Linux of actions with an unknown call time are:
-- Locking a mutex.
-- Dynamic memory allocation via e.g. malloc() since malloc() internally
-uses mutexes and since malloc() may trigger TLB modifications via the
-kernel.
-- File I/O, since file I/O uses several resources that are shared over
-threads and even over processes.
-
-An approach that has proven to work for interthread communication
-between real-time threads is the use of preallocated fixed size
-message queueus, and to lock any data needed by any real-time thread
-in memory (mlock()). Avoid mutexes with priority inheritance -- see
-also [Yodaiken 2004] for more information. Lock-free data structures
-like circular buffers are well suited for real-time software.
-
-
-Linux and POSIX Threads
------------------------
-
-There exist two implementations of the POSIX threads API for
-Linux. These implementations are called LinuxThreads and
-NPTL. LinuxThreads was historically the first POSIX threads
-implementation for Linux. LinuxThreads was compliant to most but not
-all POSIX threads specifications. That is why a new threading library
-for Linux was developed, called the NPTL (Native POSIX Threads
-Library). Most Linux distributions switched from LinuxThreads to NPTL
-around 2004. DRD only supports the NPTL. See also [Shukla 2006] for
-more information.
-
-
-How to use DRD
---------------
-
-To use this tool, specify --tool=exp-drd on the Valgrind command line.
-
-
-Interpreting DRD's data race reports
-------------------------------------
-
-You should be aware of the following when interpreting DRD's output:
-* Every thread is assigned two thread ID's: one thread ID is assigned
- by the Valgrind core and one thread ID is assigned by DRD. Thread
- ID's start at one. Valgrind thread ID's are reused when one thread
- finishes and another thread is created. DRD does not reuse thread
- ID's. Thread ID's are displayed e.g. as follows: 2/3, where the
- first number is Valgrind's thread ID and the second number is the
- thread ID assigned by DRD.
-* The term segment refers to a consecutive sequence of load, store and
- synchronization operations, all issued by the same thread. A segment
- always starts and ends at a synchronization operation. Data race
- analysis is performed between segments instead of between individual
- load and store operations because of performance reasons.
-
-Below you can find an example of a (harmless) data race report from Firefox:
-
-==7689== Thread 1:
-==7689== Conflicting store by thread 1/1 at 0x1226f978 size 8
-==7689== at 0x5E983D3: _PR_CreateThread (ptthread.c:517)
-==7689== by 0x5E98474: PR_CreateThread (ptthread.c:544)
-==7689== by 0x57E1EAE: nsThread::Init() (nsThread.cpp:322)
-==7689== by 0x57E359B: nsThreadManager::NewThread(unsigned, nsIThread**) (nsThreadManager.cpp:226)
-==7689== by 0x57915FC: NS_NewThread_P(nsIThread**, nsIRunnable*) (nsThreadUtils.cpp:70)
-==7689== by 0x4B6CF4: nsSocketTransportService::Init() (nsSocketTransportService2.cpp:406)
-==7689== by 0x48DDF5: nsSocketTransportServiceConstructor(nsISupports*, nsID const&, void**) (nsNetModule.cpp:88)
-==7689== by 0x579331C: nsGenericFactory::CreateInstance(nsISupports*, nsID const&, void**) (nsGenericFactory.cpp:80)
-==7689== by 0x57D79E6: nsComponentManagerImpl::CreateInstanceByContractID(char const*, nsISupports*, nsID const&, void**) (nsComponentManager.cpp:1756)
-==7689== by 0x57D9381: nsComponentManagerImpl::GetServiceByContractID(char const*, nsID const&, void**) (nsComponentManager.cpp:2189)
-==7689== by 0x578AEAF: CallGetService(char const*, nsID const&, void**) (nsComponentManagerUtils.cpp:94)
-==7689== by 0x578AED1: nsGetServiceByContractIDWithError::operator()(nsID const&, void**) const (nsComponentManagerUtils.cpp:288)
-==7689== Address 0x1226f978 is at offset 96 from 0x1226f918. Allocation context:
-==7689== at 0x4C21CCE: calloc (vg_replace_malloc.c:403)
-==7689== by 0x5E83F03: PR_Calloc (prmem.c:474)
-==7689== by 0x5E9816B: _PR_CreateThread (ptthread.c:385)
-==7689== by 0x5E98474: PR_CreateThread (ptthread.c:544)
-==7689== by 0x57E1EAE: nsThread::Init() (nsThread.cpp:322)
-==7689== by 0x57E359B: nsThreadManager::NewThread(unsigned, nsIThread**) (nsThreadManager.cpp:226)
-==7689== by 0x57915FC: NS_NewThread_P(nsIThread**, nsIRunnable*) (nsThreadUtils.cpp:70)
-==7689== by 0x4B6CF4: nsSocketTransportService::Init() (nsSocketTransportService2.cpp:406)
-==7689== by 0x48DDF5: nsSocketTransportServiceConstructor(nsISupports*, nsID const&, void**) (nsNetModule.cpp:88)
-==7689== by 0x579331C: nsGenericFactory::CreateInstance(nsISupports*, nsID const&, void**) (nsGenericFactory.cpp:80)
-==7689== by 0x57D79E6: nsComponentManagerImpl::CreateInstanceByContractID(char const*, nsISupports*, nsID const&, void**) (nsComponentManager.cpp:1756)
-==7689== by 0x57D9381: nsComponentManagerImpl::GetServiceByContractID(char const*, nsID const&, void**) (nsComponentManager.cpp:2189)
-==7689== Other segment start (thread 2/2)
-==7689== at 0xA948F51: clone (in /lib64/libc-2.6.1.so)
-==7689== by 0x4E2FF4F: (within /lib64/libpthread-2.6.1.so)
-==7689== by 0x12B2A94F: ???
-==7689== Other segment end (thread 2/2)
-==7689== at 0x4C23EE9: pthread_mutex_lock (drd_pthread_intercepts.c:364)
-==7689== by 0x5E92112: PR_Lock (ptsynch.c:207)
-==7689== by 0x5E97E87: _pt_root (ptthread.c:206)
-==7689== by 0x4C26660: vg_thread_wrapper (drd_pthread_intercepts.c:163)
-==7689== by 0x4E3001F: start_thread (in /lib64/libpthread-2.6.1.so)
-==7689== by 0xA948F8C: clone (in /lib64/libc-2.6.1.so)
-
-The meaning of all the data in such a report is as follows:
-* The numbers in the column on the left contains the process ID of the
- process being analyzed by DRD.
-* The first line ("Thread 1") tells you Valgrind's thread ID of the
- thread in which context the data race was detected.
-* The next line tells which kind of operation was performed (load or
- store) and by which thread (both Valgrind's and DRD's thread ID are
- displayed). On the same line the start address and the number of
- bytes involved in the conflicting access are also displayed.
-* Below the "Conflicting access" line the call stack of the conflicting
- access is displayed. If your program has been compiled with debug
- information (-g), this call stack will include file names and line
- numbers.
-* Next, the allocation context of the address on which the conflict
- was displayed.
-* A conflicting access involves at least two memory accesses. For one
- of these accesses an exact call stack is displayed, and for the other
- accesses an approximate call stack is displayed: the start and the
- end of the segments of the other accesses are displayed. Sometimes
- this contains useful information, but not always.
-
-Usually the first call stack displayed in a conflicting access report
-is sufficient for finding on which variable the conflicting access
-happened. The challenge is to find out whether or not such a
-conflicting access can cause undesired behavior. A first step is to
-identify all accesses to the same variable. If you do not have
-sufficient knowledge of the software being analyzed, you can also
-trace all accesses to that variable. For the above example it is
-sufficient to insert the macro DRD_TRACE_VAR(thred->id) in file
-ptthread.c just after allocation of the PRThread structure. The next
-step is to recompile the application and to rerun it under DRD. For
-the above example, this will learn you that thred->id is assigned a
-value both in the creator and in the created thread. In Firefox'
-source code can see that twice the same value is assigned to the
-per-thread variable thred->id. Or: this is a harmless conflicting
-access, and you can safely replace DRD_TRACE_VAR(thred->id) by
-DRD_IGNORE_VAR(thred->id).
-
-
-DRD and OpenMP
---------------
-
-Just as regular POSIX threads software, OpenMP software can contain
-data races. DRD is able to detect data races in OpenMP programs, but
-only if the shared library that implements OpenMP functionality
-(libgomp.so) has been compiled such that it uses the POSIX threads
-library instead of futexes. A second requirement is that libgomp.so
-must contain debug information. You have to recompile gcc in order to
-obtain a version of libgomp.so that is suited for use with DRD. Once
-gcc has been recompiled, set the CC and LD_LIBRARY_PATH environment
-variables appropriately. It can be convenient to set up shortcuts for
-switching between the gcc compiler provided by your Linux distribution
-and the newly compiled gcc. The shell command below will add the commands
-system-gcc and my-gcc to your shell upon the next login:
-
-cat <<EOF >>~/.bashrc
-function system-gcc { unset CC LD_LIBRARY_PATH; export CC LD_LIBRARY_PATH; }
-function my-gcc { export CC=$HOME/gcc-4.3.0/bin/gcc LD_LIBRARY_PATH=$HOME/gcc-4.3.0/lib64:; }
-EOF
-
-For an example of how to recompile gcc, see also the script
-exp-drd/scripts/download-and-build-gcc.
-
-
-Future DRD Versions
--------------------
-The following may be expected in future versions of DRD:
-* A lock dependency analyzer, as a help in deadlock prevention.
-* More extensive documentation.
-* Support for PowerPC CPU's.
-
-
-Acknowledgements
-----------------
-
-The DRD tool is built on top of the Valgrind core and VEX, which
-proved to be an excellent infrastructure for building such a tool.
-
-During 2006, the early versions of drd were improved via helpful
-feedback of Julian Seward and Nicholas Nethercote. Any bugs are my
-responsibility of course.
-
-Some of the regression tests used to test DRD were developed by
-Julian Seward as regression tests for the Helgrind tool.
-
-I would also like to thank Michiel Ronsse for introducing me a long
-time ago to vector clocks and the JiTI and DIOTA projects.
-
-Thanks also to prof. David A. Bader and the Georgia Institute of
-Technology, its Sony-Toshiba-IBM Center of Competence, and the U.S.
-National Science Foundation for the use of Cell Broadband Engine
-resources in testing DRD on the PowerPC CPU architecture.
-
-
-References
-----------
-
-[Hansen 1972]
- Per Brinch Hansen
- A Comparison of Two Synchronizing Concepts.
- Acta Informatica, 1 3(1972), pp. 190--199.
-
-[Dijkstra 1974]
- Edsger W. Dijkstra.
- Over seinpalen (About Semaphores).
- Circulated privately (never published), 1974.
- http://www.cs.utexas.edu/users/EWD/transcriptions/EWD00xx/EWD74.html
-
-[Hoare 1974]
- C. A. R. Hoare.
- Monitors: an operating system structuring concept
- Communications of the ACM, October 1974, Vol. 17 No. 10, 1974.
- http://www.cs.wisc.edu/~remzi/Classes/736/Fall2003/Papers/hoare-monitors.pdf
-
-[Lamport 1978]
- Leslie Lamport.
- Time, clocks, and the ordering of events in a distributed system.
- Communications of the ACM archive, Volume 21, Issue 7, 1978.
- http://research.microsoft.com/users/lamport/pubs/time-clocks.pdf
- http://portal.acm.org/citation.cfm?id=359563
-
-[Accetta 1986]
- Mike Accetta, Robert Baron, William Bolosky, David Golub, Richard Rashid,
- Avadis Tevanian and Michael Young.
- Mach: A New Kernel Foundation For UNIX Development.
- USENIX 1986 (Atlanta. Ga., June 9-13), pp. 93-112, 1986.
- http://www.fsl.cs.sunysb.edu/~gopalan/seminar/papers/mach.pdf
-
-[Young 1987]
- Michael Young, Avadis Tevanian, Richard Rashid, David Golub,
- Jeffrey Eppinger, Jonathan Chew, William Bolosky, David Black, Robert Baron.
- The duality of memory and communication in the implementation of a
- multiprocessor operating system.
- ACM Symposium on Operating Systems Principles, pp. 63-76, 1987.
- http://csalpha.ist.unomaha.edu/~stanw/papers/csci8550/87-duality.pdf
- http://portal.acm.org/citation.cfm?id=41457.37507
-
-[Netzer 1992]
- Robert H. B. Netzer and Barton P. Miller.
- What are race conditions? Some issues and formalizations.
- ACM Letters on Programming Languages and Systems, 1(1):74–88, March 1992.
- http://www.securitytechnet.com/resource/security/os/race-conditions.pdf
- http://portal.acm.org/citation.cfm?id=130623
-
-[Adve 1991]
- Sarita V. Adve, Mark D. Hill, Barton P. Miller, Robert H. B. Netzer.
- Detecting data races on weak memory systems.
- Proceedings of the 18th annual international symposium on Computer
- architecture, Toronto, Ontario, Canada, pp 234-243, 1991.
- http://rsim.cs.uiuc.edu/~sadve/Publications/isca91.dataraces.ps
- http://portal.acm.org/citation.cfm?doid=115953.115976
-
-[Cameron 1995]
- Steven Cameron Woo, Moriyoshi Ohara, Evan Torrie, Jaswinder Pal Singh
- and Anoop Gupta.
- The SPLASH-2 Programs: Characterization and Methodological Considerations.
- Proceedings of the 22nd International Symposium on Computer Architecture,
- pages 24-36, Santa Margherita Ligure, Italy, June 1995.
- http://portal.acm.org/citation.cfm?doid=225830.223990
- ftp://www-flash.stanford.edu/pub/splash2/splash2_isca95.ps.Z
- http://www-flash.stanford.edu/apps/SPLASH/splash2.tar.gz
-
-[Ousterhout 1996]
- John Ousterhout.
- Why Threads Are A Bad Idea (for most purposes).
- Invited Talk at the 1996 USENIX Technical Conference (January 25, 1996).
- http://home.pacbell.net/ouster/threads.pdf
-
-[Savage 1997]
- Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro and
- Thomas Anderson.
- Eraser: A Dynamic Data Race Detector for Multithreaded Programs.
- ACM Transactions on Computer Systems, 15(4):391-411, November 1997.
- http://www.cs.ucsd.edu/users/savage/papers/Tocs97.pdf
- http://portal.acm.org/citation.cfm?id=265927
-
-[Ronsse 1999]
- Michiel Ronsse, Koen De Bosschere.
- RecPlay: a fully integrated practical record/replay system.
- ACM Transactions on Computer Systems (TOCS), Volume 17, Issue 2 (May 1999),
- pp. 133-152, 1999.
- http://portal.acm.org/citation.cfm?id=312214
-
-[Christiaens 2002]
- Mark Christiaens, Michiel Ronsse, Koen De Bosschere.
- Bounding the number of segment histories during data race detection.
- Parallel Computing archive, Volume 28, Issue 9, pp 1221-1238,
- September 2002.
- http://portal.acm.org/citation.cfm?id=638124
-
-[Pozniansky 2003]
- Eli Pozniansky, Assaf Schuster.
- Efficient on-the-fly data race detection in multithreaded C++ programs.
- Proceedings of the ACM SIGPLAN symposium on principles and practice
- of parallel programming (PPoPP 2003) and workshop on partial
- evaluation and semantics-based program manipulation (PEPM 2003),
- Volume 38, Issue 10, pp 179-190 (October 2003).
- http://www.cs.technion.ac.il/~assaf/publications/MultiRace.pdf
- http://portal.acm.org/citation.cfm?id=966049.781529
-
-[Ronsse 2004]
- Michiel Ronsse, Jonas Maebe, Koen De Bosschere.
- Detecting Data Races in Sequential Programs with DIOTA.
- Proceedings of the 10th International Euro-Par Conference, Springer-Verlag,
- Lecture Notes in Computer Science, pp. 82-89, 2004.
- http://escher.elis.ugent.be/publ/Edocs/DOC/P104_076.pdf
-
-[Yodaiken 2004]
- Victor Yodaiken.
- Against Priority Inheritance.
- FSMLabs Technical Report, 2004.
- http://www.yodaiken.com/papers/inherit.pdf
-
-[Banerjee 2006a]
- Utpal Banerjee, Brian Bliss, Zhiqiang Ma, Paul Petersen.
- Unraveling Data Race Detection in the Intel® Thread Checker.
- First Workshop on Software Tools for Multi-core Systems (STMCS), in
- conjunction with IEEE/ACM International Symposium on Code Generation and
- Optimization (CGO), March 26, 2006, Manhattan, New York, NY.
- http://www.isi.edu/~kintali/stmcs06/UnravelingDataRace.pdf
-
-[Banerjee 2006b]
- Utpal Banerjee, Brian Bliss, Zhiqiang Ma, Paul Petersen.
- A theory of data race detection
- Proceeding of the 2006 workshop on Parallel and distributed systems: testing
- and debugging, Portland, Maine, USA, pp. 69-78, 2006.
- http://www.cs.ucsb.edu/~tiwari/papers/threadchecker06
- http://portal.acm.org/citation.cfm?id=1147416
-
-[Lee 2006]
- Edward A. Lee.
- The Problem with Threads.
- IEEE Computer, Volume 39, Issue 5 (May 2006), pp. 33-42, 2006.
- http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf
- http://portal.acm.org/citation.cfm?id=1137232.1137289
-
-[Lu 2006]
- Shan Lu, Joseph Tucek, Feng Qin, Yuanyuan Zhou.
- AVIO: detecting atomicity violations via access interleaving invariants.
- Proceedings of the 12th international conference on Architectural support
- for programming languages and operating systems, San Jose, California, USA,
- pp. 37-48, 2006.
- http://www.cse.ohio-state.edu/~qin/pub-papers/2006andbefore/asplos062-lu.pdf
- http://portal.acm.org/citation.cfm?id=1168864
-
-[Sack 2006]
- Paul Sack, Brian E. Bliss, Zhiqiang Ma, Paul Petersen, Josep Torrellas
- Accurate and efficient filtering for the Intel thread checker race detector.
- Proceedings of the 1st workshop on Architectural and system support for
- improving software dependability, San Jose, California, pp. 34-41, 2006.
- http://iacoma.cs.uiuc.edu/iacoma-papers/asid06.pdf
- http://portal.acm.org/citation.cfm?id=1181309.1181315
-
-[Shukla 2006]
- Vikram Shukla
- NPTL -- A rundown of the key differences for developers who need to port
- July 31, 2006.
- http://www-128.ibm.com/developerworks/linux/library/l-threading.html?ca=dgr-lnxw07LinuxThreadsAndNPTL
-
-[Müehlenfeld 2007]
- Arndt Müehlenfeld, Franz Wotawa.
- Fault Detection in Multi-threaded C++ Server Applications.
- Proceedings of the 12th ACM SIGPLAN symposium on Principles and practice of
- parallel programming, San Jose, California, USA, poster session,
- pp. 142-143, 2007.
- http://valgrind.org/docs/muehlenfeld2006.pdf
- http://portal.acm.org/citation.cfm?id=1229457
-
-[Sun 2007]
- Sun Studio 12: Thread Analyzer User's Guide
- http://docs.sun.com/app/docs/doc/820-0619
-
-[Venetis 2007]
- Ioannis E. Venetis
- The Modified SPLASH-2 Home Page
- http://www.capsl.udel.edu/splash/Download.html
-
-[Zhou 2007]
- Pin Zhou, Radu Teodorescu, Yuanyuan Zhou.
- HARD: Hardware-Assisted Lockset-based Race Detection.
- Proceedings of the 2007 IEEE 13th International Symposium on High
- Performance Computer Architecture, pp. 121-132, 2007.
- http://opera.cs.uiuc.edu/paper/Hard-HPCA07.pdf
- http://portal.acm.org/citation.cfm?id=1317533.1318108
|
|
From: <sv...@va...> - 2008-07-04 10:12:00
|
Author: sewardj
Date: 2008-07-04 11:12:01 +0100 (Fri, 04 Jul 2008)
New Revision: 8355
Log:
Very minor core changes needed to support Ptrcheck:
* allow VG_({get,set}_shadow_regs_area) to also read/write the
non-shadow guest state, by passing in shadowNo==0. Previously
it only supported reading the primary and secondary shadow
state (shadowNo==1 and 2 respectively).
* add function VG_(set_syscall_return_shadows) to set shadow
values for the return value of a system call. (may be
revised later)
Modified:
branches/PTRCHECK/coregrind/m_machine.c
branches/PTRCHECK/include/pub_tool_machine.h
branches/PTRCHECK/include/pub_tool_tooliface.h
Modified: branches/PTRCHECK/coregrind/m_machine.c
===================================================================
--- branches/PTRCHECK/coregrind/m_machine.c 2008-07-04 10:07:55 UTC (rev 8354)
+++ branches/PTRCHECK/coregrind/m_machine.c 2008-07-04 10:12:01 UTC (rev 8355)
@@ -78,6 +78,18 @@
INSTR_PTR( VG_(threads)[tid].arch ) = ip;
}
+void VG_(set_syscall_return_shadows) ( ThreadId tid, UWord s1, UWord s2 )
+{
+# if defined(VGP_x86_linux)
+ VG_(threads)[tid].arch.vex_shadow1.guest_EAX = s1;
+ VG_(threads)[tid].arch.vex_shadow2.guest_EAX = s2;
+# elif defined(VGP_amd64_linux)
+ VG_(threads)[tid].arch.vex_shadow1.guest_RAX = s1;
+ VG_(threads)[tid].arch.vex_shadow2.guest_RAX = s2;
+# else
+# error "Unknown plat"
+# endif
+}
void
VG_(get_shadow_regs_area) ( ThreadId tid,
@@ -86,16 +98,20 @@
{
void* src;
ThreadState* tst;
- vg_assert(shadowNo == 1 || shadowNo == 2);
+ vg_assert(shadowNo == 0 || shadowNo == 1 || shadowNo == 2);
vg_assert(VG_(is_valid_tid)(tid));
// Bounds check
vg_assert(0 <= offset && offset < sizeof(VexGuestArchState));
vg_assert(offset + size <= sizeof(VexGuestArchState));
// Copy
tst = & VG_(threads)[tid];
- src = shadowNo == 1
- ? (void*)(((Addr)&(tst->arch.vex_shadow1)) + offset)
- : (void*)(((Addr)&(tst->arch.vex_shadow2)) + offset);
+ src = NULL;
+ switch (shadowNo) {
+ case 0: src = (void*)(((Addr)&(tst->arch.vex)) + offset); break;
+ case 1: src = (void*)(((Addr)&(tst->arch.vex_shadow1)) + offset); break;
+ case 2: src = (void*)(((Addr)&(tst->arch.vex_shadow2)) + offset); break;
+ }
+ tl_assert(src != NULL);
VG_(memcpy)( dst, src, size);
}
@@ -106,16 +122,20 @@
{
void* dst;
ThreadState* tst;
- vg_assert(shadowNo == 1 || shadowNo == 2);
+ vg_assert(shadowNo == 0 || shadowNo == 1 || shadowNo == 2);
vg_assert(VG_(is_valid_tid)(tid));
// Bounds check
vg_assert(0 <= offset && offset < sizeof(VexGuestArchState));
vg_assert(offset + size <= sizeof(VexGuestArchState));
// Copy
tst = & VG_(threads)[tid];
- dst = shadowNo == 1
- ? (void*)(((Addr)&(tst->arch.vex_shadow1)) + offset)
- : (void*)(((Addr)&(tst->arch.vex_shadow2)) + offset);
+ dst = NULL;
+ switch (shadowNo) {
+ case 0: dst = (void*)(((Addr)&(tst->arch.vex)) + offset); break;
+ case 1: dst = (void*)(((Addr)&(tst->arch.vex_shadow1)) + offset); break;
+ case 2: dst = (void*)(((Addr)&(tst->arch.vex_shadow2)) + offset); break;
+ }
+ tl_assert(dst != NULL);
VG_(memcpy)( dst, src, size);
}
Modified: branches/PTRCHECK/include/pub_tool_machine.h
===================================================================
--- branches/PTRCHECK/include/pub_tool_machine.h 2008-07-04 10:07:55 UTC (rev 8354)
+++ branches/PTRCHECK/include/pub_tool_machine.h 2008-07-04 10:12:01 UTC (rev 8355)
@@ -81,8 +81,12 @@
extern void VG_(set_SP) ( ThreadId tid, Addr sp );
extern void VG_(set_IP) ( ThreadId tid, Addr ip );
-// For get/set, 'area' is where the asked-for shadow state will be copied
-// into/from.
+// For get/set, 'area' is where the asked-for guest state will be copied
+// into/from. If shadowNo == 0, the real (non-shadow) guest state is
+// accessed. If shadowNo == 1, the first shadow area is accessed, and
+// if shadowNo == 2, the second shadow area is accessed. This gives a
+// completely general way to read/modify a thread's guest register state
+// providing you know the offsets you need.
void
VG_(get_shadow_regs_area) ( ThreadId tid,
/*DST*/UChar* dst,
@@ -92,6 +96,10 @@
/*DST*/Int shadowNo, OffT offset, SizeT size,
/*SRC*/const UChar* src );
+// Sets the shadow values for the syscall return value register.
+// This is platform specific.
+void VG_(set_syscall_return_shadows) ( ThreadId tid, UWord s1, UWord s2 );
+
// Apply a function 'f' to all the general purpose registers in all the
// current threads.
// This is very Memcheck-specific -- it's used to find the roots when
Modified: branches/PTRCHECK/include/pub_tool_tooliface.h
===================================================================
--- branches/PTRCHECK/include/pub_tool_tooliface.h 2008-07-04 10:07:55 UTC (rev 8354)
+++ branches/PTRCHECK/include/pub_tool_tooliface.h 2008-07-04 10:12:01 UTC (rev 8355)
@@ -453,7 +453,7 @@
/* Part of the core from which this call was made. Useful for determining
what kind of error message should be emitted. */
typedef
- enum { Vg_CoreStartup, Vg_CoreSignal, Vg_CoreSysCall,
+ enum { Vg_CoreStartup=1, Vg_CoreSignal, Vg_CoreSysCall,
Vg_CoreTranslate, Vg_CoreClientReq }
CorePart;
|
|
From: <sv...@va...> - 2008-07-04 10:07:51
|
Author: sewardj
Date: 2008-07-04 11:07:55 +0100 (Fri, 04 Jul 2008)
New Revision: 8354
Log:
Add (exp-)Ptrcheck to the top-level build system.
Modified:
branches/PTRCHECK/Makefile.am
branches/PTRCHECK/configure.in
Modified: branches/PTRCHECK/Makefile.am
===================================================================
--- branches/PTRCHECK/Makefile.am 2008-07-04 10:06:33 UTC (rev 8353)
+++ branches/PTRCHECK/Makefile.am 2008-07-04 10:07:55 UTC (rev 8354)
@@ -12,7 +12,8 @@
helgrind
EXP_TOOLS = exp-omega \
- exp-drd
+ exp-drd \
+ exp-ptrcheck
# Put docs last because building the HTML is slow and we want to get
# everything else working before we try it.
Modified: branches/PTRCHECK/configure.in
===================================================================
--- branches/PTRCHECK/configure.in 2008-07-04 10:06:33 UTC (rev 8353)
+++ branches/PTRCHECK/configure.in 2008-07-04 10:07:55 UTC (rev 8354)
@@ -1435,6 +1435,9 @@
exp-drd/docs/Makefile
exp-drd/scripts/download-and-build-splash2
exp-drd/tests/Makefile
+ exp-ptrcheck/Makefile
+ exp-ptrcheck/tests/Makefile
+ exp-ptrcheck/docs/Makefile
)
cat<<EOF
|
|
From: <sv...@va...> - 2008-07-04 10:06:40
|
Author: sewardj
Date: 2008-07-04 11:06:33 +0100 (Fri, 04 Jul 2008)
New Revision: 8353
Log:
Consistently rename Annelid to Ptrcheck.
Modified:
branches/PTRCHECK/exp-ptrcheck/Makefile.am
branches/PTRCHECK/exp-ptrcheck/pc_intercepts.c
branches/PTRCHECK/exp-ptrcheck/pc_list.c
branches/PTRCHECK/exp-ptrcheck/pc_list.h
branches/PTRCHECK/exp-ptrcheck/pc_main.c
Modified: branches/PTRCHECK/exp-ptrcheck/Makefile.am
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/Makefile.am 2008-07-04 09:48:31 UTC (rev 8352)
+++ branches/PTRCHECK/exp-ptrcheck/Makefile.am 2008-07-04 10:06:33 UTC (rev 8353)
@@ -2,126 +2,126 @@
noinst_PROGRAMS =
if VGP_X86_LINUX
-noinst_PROGRAMS += exp-annelid-x86-linux vgpreload_exp-annelid-x86-linux.so
+noinst_PROGRAMS += exp-ptrcheck-x86-linux vgpreload_exp-ptrcheck-x86-linux.so
endif
if VGP_AMD64_LINUX
-noinst_PROGRAMS += exp-annelid-amd64-linux vgpreload_exp-annelid-amd64-linux.so
+noinst_PROGRAMS += exp-ptrcheck-amd64-linux vgpreload_exp-ptrcheck-amd64-linux.so
endif
if VGP_PPC32_LINUX
-noinst_PROGRAMS += exp-annelid-ppc32-linux vgpreload_exp-annelid-ppc32-linux.so
+noinst_PROGRAMS += exp-ptrcheck-ppc32-linux vgpreload_exp-ptrcheck-ppc32-linux.so
endif
if VGP_PPC64_LINUX
-noinst_PROGRAMS += exp-annelid-ppc64-linux vgpreload_exp-annelid-ppc64-linux.so
+noinst_PROGRAMS += exp-ptrcheck-ppc64-linux vgpreload_exp-ptrcheck-ppc64-linux.so
endif
if VGP_PPC32_AIX5
-noinst_PROGRAMS += exp-annelid-ppc32-aix5 vgpreload_exp-annelid-ppc32-aix5.so
+noinst_PROGRAMS += exp-ptrcheck-ppc32-aix5 vgpreload_exp-ptrcheck-ppc32-aix5.so
endif
if VGP_PPC64_AIX5
-noinst_PROGRAMS += exp-annelid-ppc64-aix5 vgpreload_exp-annelid-ppc64-aix5.so
+noinst_PROGRAMS += exp-ptrcheck-ppc64-aix5 vgpreload_exp-ptrcheck-ppc64-aix5.so
endif
-VGPRELOAD_EXP_ANNELID_SOURCES_COMMON = an_intercepts.c
+VGPRELOAD_EXP_PTRCHECK_SOURCES_COMMON = pc_intercepts.c
-vgpreload_exp_annelid_x86_linux_so_SOURCES = $(VGPRELOAD_EXP_ANNELID_SOURCES_COMMON)
-vgpreload_exp_annelid_x86_linux_so_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX)
-vgpreload_exp_annelid_x86_linux_so_CFLAGS = $(AM_CFLAGS_X86_LINUX) $(AM_CFLAGS_PIC) -O2
-vgpreload_exp_annelid_x86_linux_so_CCASFLAGS = $(AM_CCASFLAGS_X86_LINUX)
-vgpreload_exp_annelid_x86_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_X86_LINUX)
-vgpreload_exp_annelid_x86_linux_so_LDFLAGS = \
+vgpreload_exp_ptrcheck_x86_linux_so_SOURCES = $(VGPRELOAD_EXP_PTRCHECK_SOURCES_COMMON)
+vgpreload_exp_ptrcheck_x86_linux_so_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX)
+vgpreload_exp_ptrcheck_x86_linux_so_CFLAGS = $(AM_CFLAGS_X86_LINUX) $(AM_CFLAGS_PIC) -O2
+vgpreload_exp_ptrcheck_x86_linux_so_CCASFLAGS = $(AM_CCASFLAGS_X86_LINUX)
+vgpreload_exp_ptrcheck_x86_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_X86_LINUX)
+vgpreload_exp_ptrcheck_x86_linux_so_LDFLAGS = \
$(PRELOAD_LDFLAGS_X86_LINUX) \
$(LIBREPLACEMALLOC_LDFLAGS_X86_LINUX)
-vgpreload_exp_annelid_amd64_linux_so_SOURCES = $(VGPRELOAD_EXP_ANNELID_SOURCES_COMMON)
-vgpreload_exp_annelid_amd64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
-vgpreload_exp_annelid_amd64_linux_so_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) $(AM_CFLAGS_PIC) -O2
-vgpreload_exp_annelid_amd64_linux_so_CCASFLAGS = $(AM_CCASFLAGS_AMD64_LINUX)
-vgpreload_exp_annelid_amd64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_AMD64_LINUX)
-vgpreload_exp_annelid_amd64_linux_so_LDFLAGS = \
+vgpreload_exp_ptrcheck_amd64_linux_so_SOURCES = $(VGPRELOAD_EXP_PTRCHECK_SOURCES_COMMON)
+vgpreload_exp_ptrcheck_amd64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
+vgpreload_exp_ptrcheck_amd64_linux_so_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) $(AM_CFLAGS_PIC) -O2
+vgpreload_exp_ptrcheck_amd64_linux_so_CCASFLAGS = $(AM_CCASFLAGS_AMD64_LINUX)
+vgpreload_exp_ptrcheck_amd64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_AMD64_LINUX)
+vgpreload_exp_ptrcheck_amd64_linux_so_LDFLAGS = \
$(PRELOAD_LDFLAGS_AMD64_LINUX) \
$(LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX)
-vgpreload_exp_annelid_ppc32_linux_so_SOURCES = $(VGPRELOAD_EXP_ANNELID_SOURCES_COMMON)
-vgpreload_exp_annelid_ppc32_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
-vgpreload_exp_annelid_ppc32_linux_so_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) $(AM_CFLAGS_PIC) -O2
-vgpreload_exp_annelid_ppc32_linux_so_CCASFLAGS = $(AM_CCASFLAGS_PPC32_LINUX)
-vgpreload_exp_annelid_ppc32_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_LINUX)
-vgpreload_exp_annelid_ppc32_linux_so_LDFLAGS = \
+vgpreload_exp_ptrcheck_ppc32_linux_so_SOURCES = $(VGPRELOAD_EXP_PTRCHECK_SOURCES_COMMON)
+vgpreload_exp_ptrcheck_ppc32_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
+vgpreload_exp_ptrcheck_ppc32_linux_so_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) $(AM_CFLAGS_PIC) -O2
+vgpreload_exp_ptrcheck_ppc32_linux_so_CCASFLAGS = $(AM_CCASFLAGS_PPC32_LINUX)
+vgpreload_exp_ptrcheck_ppc32_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_LINUX)
+vgpreload_exp_ptrcheck_ppc32_linux_so_LDFLAGS = \
$(PRELOAD_LDFLAGS_PPC32_LINUX) \
$(LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX)
-vgpreload_exp_annelid_ppc64_linux_so_SOURCES = $(VGPRELOAD_EXP_ANNELID_SOURCES_COMMON)
-vgpreload_exp_annelid_ppc64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX)
-vgpreload_exp_annelid_ppc64_linux_so_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) $(AM_CFLAGS_PIC) -O2
-vgpreload_exp_annelid_ppc64_linux_so_CCASFLAGS = $(AM_CCASFLAGS_PPC64_LINUX)
-vgpreload_exp_annelid_ppc64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_LINUX)
-vgpreload_exp_annelid_ppc64_linux_so_LDFLAGS = \
+vgpreload_exp_ptrcheck_ppc64_linux_so_SOURCES = $(VGPRELOAD_EXP_PTRCHECK_SOURCES_COMMON)
+vgpreload_exp_ptrcheck_ppc64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX)
+vgpreload_exp_ptrcheck_ppc64_linux_so_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) $(AM_CFLAGS_PIC) -O2
+vgpreload_exp_ptrcheck_ppc64_linux_so_CCASFLAGS = $(AM_CCASFLAGS_PPC64_LINUX)
+vgpreload_exp_ptrcheck_ppc64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_LINUX)
+vgpreload_exp_ptrcheck_ppc64_linux_so_LDFLAGS = \
$(PRELOAD_LDFLAGS_PPC64_LINUX) \
$(LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX)
-vgpreload_exp_annelid_ppc32_aix5_so_SOURCES = $(VGPRELOAD_EXP_ANNELID_SOURCES_COMMON)
-vgpreload_exp_annelid_ppc32_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5)
-vgpreload_exp_annelid_ppc32_aix5_so_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) $(AM_CFLAGS_PIC) -O2
-vgpreload_exp_annelid_ppc32_aix5_so_CCASFLAGS = $(AM_CCASFLAGS_PPC32_AIX5)
-vgpreload_exp_annelid_ppc32_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_AIX5)
-vgpreload_exp_annelid_ppc32_aix5_so_LDFLAGS = \
+vgpreload_exp_ptrcheck_ppc32_aix5_so_SOURCES = $(VGPRELOAD_EXP_PTRCHECK_SOURCES_COMMON)
+vgpreload_exp_ptrcheck_ppc32_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5)
+vgpreload_exp_ptrcheck_ppc32_aix5_so_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) $(AM_CFLAGS_PIC) -O2
+vgpreload_exp_ptrcheck_ppc32_aix5_so_CCASFLAGS = $(AM_CCASFLAGS_PPC32_AIX5)
+vgpreload_exp_ptrcheck_ppc32_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_AIX5)
+vgpreload_exp_ptrcheck_ppc32_aix5_so_LDFLAGS = \
$(PRELOAD_LDFLAGS_PPC32_AIX5) \
$(LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5)
-vgpreload_exp_annelid_ppc64_aix5_so_SOURCES = $(VGPRELOAD_EXP_ANNELID_SOURCES_COMMON)
-vgpreload_exp_annelid_ppc64_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5)
-vgpreload_exp_annelid_ppc64_aix5_so_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) $(AM_CFLAGS_PIC) -O2
-vgpreload_exp_annelid_ppc64_aix5_so_CCASFLAGS = $(AM_CCASFLAGS_PPC64_AIX5)
-vgpreload_exp_annelid_ppc64_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_AIX5)
-vgpreload_exp_annelid_ppc64_aix5_so_LDFLAGS = \
+vgpreload_exp_ptrcheck_ppc64_aix5_so_SOURCES = $(VGPRELOAD_EXP_PTRCHECK_SOURCES_COMMON)
+vgpreload_exp_ptrcheck_ppc64_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5)
+vgpreload_exp_ptrcheck_ppc64_aix5_so_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) $(AM_CFLAGS_PIC) -O2
+vgpreload_exp_ptrcheck_ppc64_aix5_so_CCASFLAGS = $(AM_CCASFLAGS_PPC64_AIX5)
+vgpreload_exp_ptrcheck_ppc64_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_AIX5)
+vgpreload_exp_ptrcheck_ppc64_aix5_so_LDFLAGS = \
$(PRELOAD_LDFLAGS_PPC64_AIX5) \
$(LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5)
-EXP_ANNELID_SOURCES_COMMON = an_list.c an_main.c
+EXP_PTRCHECK_SOURCES_COMMON = pc_list.c pc_main.c
-exp_annelid_x86_linux_SOURCES = $(EXP_ANNELID_SOURCES_COMMON)
-exp_annelid_x86_linux_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX)
-exp_annelid_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX)
-exp_annelid_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX)
-exp_annelid_x86_linux_LDADD = $(TOOL_LDADD_X86_LINUX)
-exp_annelid_x86_linux_LDFLAGS = $(TOOL_LDFLAGS_X86_LINUX)
+exp_ptrcheck_x86_linux_SOURCES = $(EXP_PTRCHECK_SOURCES_COMMON)
+exp_ptrcheck_x86_linux_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX)
+exp_ptrcheck_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX)
+exp_ptrcheck_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX)
+exp_ptrcheck_x86_linux_LDADD = $(TOOL_LDADD_X86_LINUX)
+exp_ptrcheck_x86_linux_LDFLAGS = $(TOOL_LDFLAGS_X86_LINUX)
-exp_annelid_amd64_linux_SOURCES = $(EXP_ANNELID_SOURCES_COMMON)
-exp_annelid_amd64_linux_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
-exp_annelid_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX)
-exp_annelid_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX)
-exp_annelid_amd64_linux_LDADD = $(TOOL_LDADD_AMD64_LINUX)
-exp_annelid_amd64_linux_LDFLAGS = $(TOOL_LDFLAGS_AMD64_LINUX)
+exp_ptrcheck_amd64_linux_SOURCES = $(EXP_PTRCHECK_SOURCES_COMMON)
+exp_ptrcheck_amd64_linux_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
+exp_ptrcheck_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX)
+exp_ptrcheck_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX)
+exp_ptrcheck_amd64_linux_LDADD = $(TOOL_LDADD_AMD64_LINUX)
+exp_ptrcheck_amd64_linux_LDFLAGS = $(TOOL_LDFLAGS_AMD64_LINUX)
-exp_annelid_ppc32_linux_SOURCES = $(EXP_ANNELID_SOURCES_COMMON)
-exp_annelid_ppc32_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
-exp_annelid_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX)
-exp_annelid_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX)
-exp_annelid_ppc32_linux_LDADD = $(TOOL_LDADD_PPC32_LINUX)
-exp_annelid_ppc32_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC32_LINUX)
+exp_ptrcheck_ppc32_linux_SOURCES = $(EXP_PTRCHECK_SOURCES_COMMON)
+exp_ptrcheck_ppc32_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
+exp_ptrcheck_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX)
+exp_ptrcheck_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX)
+exp_ptrcheck_ppc32_linux_LDADD = $(TOOL_LDADD_PPC32_LINUX)
+exp_ptrcheck_ppc32_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC32_LINUX)
-exp_annelid_ppc64_linux_SOURCES = $(EXP_ANNELID_SOURCES_COMMON)
-exp_annelid_ppc64_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX)
-exp_annelid_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX)
-exp_annelid_ppc64_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_LINUX)
-exp_annelid_ppc64_linux_LDADD = $(TOOL_LDADD_PPC64_LINUX)
-exp_annelid_ppc64_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC64_LINUX)
+exp_ptrcheck_ppc64_linux_SOURCES = $(EXP_PTRCHECK_SOURCES_COMMON)
+exp_ptrcheck_ppc64_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX)
+exp_ptrcheck_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX)
+exp_ptrcheck_ppc64_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_LINUX)
+exp_ptrcheck_ppc64_linux_LDADD = $(TOOL_LDADD_PPC64_LINUX)
+exp_ptrcheck_ppc64_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC64_LINUX)
-exp_annelid_ppc32_aix5_SOURCES = $(EXP_ANNELID_SOURCES_COMMON)
-exp_annelid_ppc32_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5)
-exp_annelid_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5)
-exp_annelid_ppc32_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_AIX5)
-exp_annelid_ppc32_aix5_LDADD = $(TOOL_LDADD_PPC32_AIX5)
-exp_annelid_ppc32_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC32_AIX5)
+exp_ptrcheck_ppc32_aix5_SOURCES = $(EXP_PTRCHECK_SOURCES_COMMON)
+exp_ptrcheck_ppc32_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5)
+exp_ptrcheck_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5)
+exp_ptrcheck_ppc32_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_AIX5)
+exp_ptrcheck_ppc32_aix5_LDADD = $(TOOL_LDADD_PPC32_AIX5)
+exp_ptrcheck_ppc32_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC32_AIX5)
-exp_annelid_ppc64_aix5_SOURCES = $(EXP_ANNELID_SOURCES_COMMON)
-exp_annelid_ppc64_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5)
-exp_annelid_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5)
-exp_annelid_ppc64_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_AIX5)
-exp_annelid_ppc64_aix5_LDADD = $(TOOL_LDADD_PPC64_AIX5)
-exp_annelid_ppc64_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC64_AIX5)
+exp_ptrcheck_ppc64_aix5_SOURCES = $(EXP_PTRCHECK_SOURCES_COMMON)
+exp_ptrcheck_ppc64_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5)
+exp_ptrcheck_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5)
+exp_ptrcheck_ppc64_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_AIX5)
+exp_ptrcheck_ppc64_aix5_LDADD = $(TOOL_LDADD_PPC64_AIX5)
+exp_ptrcheck_ppc64_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC64_AIX5)
-noinst_HEADERS = an_list.h
+noinst_HEADERS = pc_list.h
Modified: branches/PTRCHECK/exp-ptrcheck/pc_intercepts.c
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/pc_intercepts.c 2008-07-04 09:48:31 UTC (rev 8352)
+++ branches/PTRCHECK/exp-ptrcheck/pc_intercepts.c 2008-07-04 10:06:33 UTC (rev 8353)
@@ -1,14 +1,14 @@
/*--------------------------------------------------------------------*/
-/*--- Annelid: a pointer-use checker. an_intercepts.c ---*/
+/*--- Ptrcheck: a pointer-use checker. pc_intercepts.c ---*/
/*--------------------------------------------------------------------*/
/*
- This file is part of Annelid, a Valgrind skin for checking pointer
+ This file is part of Ptrcheck, a Valgrind tool for checking pointer
use in programs.
- Copyright (C) 2003 Nicholas Nethercote
- nj...@ca...
+ Copyright (C) 2003-2008 Nicholas Nethercote
+ nj...@va...
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -34,5 +34,5 @@
*/
/*--------------------------------------------------------------------*/
-/*--- end an_intercepts.c ---*/
+/*--- end pc_intercepts.c ---*/
/*--------------------------------------------------------------------*/
Modified: branches/PTRCHECK/exp-ptrcheck/pc_list.c
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/pc_list.c 2008-07-04 09:48:31 UTC (rev 8352)
+++ branches/PTRCHECK/exp-ptrcheck/pc_list.c 2008-07-04 10:06:33 UTC (rev 8353)
@@ -1,14 +1,14 @@
/*--------------------------------------------------------------------*/
-/*--- Interval skip list for segments. an_list.c ---*/
+/*--- Interval skip list for segments. pc_list.c ---*/
/*--------------------------------------------------------------------*/
/*
- This file is part of Annelid, a Valgrind skin for checking pointer
+ This file is part of Ptrcheck, a Valgrind tool for checking pointer
use in programs.
- Copyright (C) 2003 Nicholas Nethercote
- nj...@ca...
+ Copyright (C) 2003-2008 Nicholas Nethercote
+ nj...@va...
This file is derived from a C++ interval skip-list implementation by Eric
Hanson, which had this copyright notice:
@@ -46,9 +46,9 @@
#include "pub_tool_execontext.h"
#include "pub_tool_hashtable.h"
-#include "an_list.h"
+#include "pc_list.h"
-#ifdef OUTSIDE_ANNELID
+#ifdef OUTSIDE_PTRCHECK
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
@@ -1169,5 +1169,5 @@
}
/*--------------------------------------------------------------------*/
-/*--- end an_list.c ---*/
+/*--- end pc_list.c ---*/
/*--------------------------------------------------------------------*/
Modified: branches/PTRCHECK/exp-ptrcheck/pc_list.h
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/pc_list.h 2008-07-04 09:48:31 UTC (rev 8352)
+++ branches/PTRCHECK/exp-ptrcheck/pc_list.h 2008-07-04 10:06:33 UTC (rev 8353)
@@ -1,14 +1,14 @@
/*--------------------------------------------------------------------*/
-/*--- Interval skip list header. an_list.h ---*/
+/*--- Interval skip list header. pc_list.h ---*/
/*--------------------------------------------------------------------*/
/*
- This file is part of Annelid, a Valgrind skin for checking pointer
+ This file is part of Ptrcheck, a Valgrind tool for checking pointer
use in programs.
- Copyright (C) 2003 Nicholas Nethercote
- nj...@ca...
+ Copyright (C) 2003-2008 Nicholas Nethercote
+ nj...@va...
This file is derived from a C++ interval skip-list implementation by Eric
Hanson, which had this copyright notice:
@@ -90,5 +90,5 @@
extern void ISList__destruct (ISList* o);
/*--------------------------------------------------------------------*/
-/*--- end an_list.h ---*/
+/*--- end pc_list.h ---*/
/*--------------------------------------------------------------------*/
Modified: branches/PTRCHECK/exp-ptrcheck/pc_main.c
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/pc_main.c 2008-07-04 09:48:31 UTC (rev 8352)
+++ branches/PTRCHECK/exp-ptrcheck/pc_main.c 2008-07-04 10:06:33 UTC (rev 8353)
@@ -1,14 +1,14 @@
/*--------------------------------------------------------------------*/
-/*--- Annelid: a pointer-use checker. an_main.c ---*/
+/*--- Ptrcheck: a pointer-use checker. pc_main.c ---*/
/*--------------------------------------------------------------------*/
/*
- This file is part of Annelid, a Valgrind skin for checking pointer
+ This file is part of Ptrcheck, a Valgrind tool for checking pointer
use in programs.
- Copyright (C) 2003 Nicholas Nethercote
- nj...@ca...
+ Copyright (C) 2003-2008 Nicholas Nethercote
+ nj...@va...
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -205,11 +205,11 @@
#include "pub_tool_oset.h"
#include "pub_tool_vkiscnums.h"
-#include "an_list.h"
+#include "pc_list.h"
//#include "vg_profile.c"
-#define AN_MALLOC_REDZONE_SZB 0 /* no need for client heap redzones */
+#define PC_MALLOC_REDZONE_SZB 0 /* no need for client heap redzones */
//zz /*------------------------------------------------------------*/
@@ -747,7 +747,7 @@
return (UNKNOWN != seg && BOTTOM != seg && NONPTR != seg);
}
-//zz static Char* an_name_UOpcode(Int opc)
+//zz static Char* pc_name_UOpcode(Int opc)
//zz {
//zz if (opc >= 0) return VG_(name_UOpcode)(True, opc);
//zz
@@ -756,7 +756,7 @@
//zz else if (-opc == VGOFF_(helper_div_64_32)) return "DIV";
//zz else if (-opc == VGOFF_(helper_idiv_64_32)) return "IDIV";
//zz
-//zz else VG_(skin_panic)("an_name_UOpcode");
+//zz else VG_(skin_panic)("pc_name_UOpcode");
//zz }
static void pp_Error ( Error* err )
@@ -983,37 +983,37 @@
/*--- malloc() et al replacements ---*/
/*------------------------------------------------------------*/
-static void* an_replace_malloc ( ThreadId tid, SizeT n )
+static void* pc_replace_malloc ( ThreadId tid, SizeT n )
{
return alloc_and_new_mem_heap ( tid, n, VG_(clo_alignment),
/*is_zeroed*/False );
}
-static void* an_replace___builtin_new ( ThreadId tid, SizeT n )
+static void* pc_replace___builtin_new ( ThreadId tid, SizeT n )
{
return alloc_and_new_mem_heap ( tid, n, VG_(clo_alignment),
/*is_zeroed*/False );
}
-static void* an_replace___builtin_vec_new ( ThreadId tid, SizeT n )
+static void* pc_replace___builtin_vec_new ( ThreadId tid, SizeT n )
{
return alloc_and_new_mem_heap ( tid, n, VG_(clo_alignment),
/*is_zeroed*/False );
}
-static void* an_replace_memalign ( ThreadId tid, SizeT align, SizeT n )
+static void* pc_replace_memalign ( ThreadId tid, SizeT align, SizeT n )
{
return alloc_and_new_mem_heap ( tid, n, align,
/*is_zeroed*/False );
}
-static void* an_replace_calloc ( ThreadId tid, SizeT nmemb, SizeT size1 )
+static void* pc_replace_calloc ( ThreadId tid, SizeT nmemb, SizeT size1 )
{
return alloc_and_new_mem_heap ( tid, nmemb*size1, VG_(clo_alignment),
/*is_zeroed*/True );
}
-static void an_replace_free ( ThreadId tid, void* p )
+static void pc_replace_free ( ThreadId tid, void* p )
{
// Should arguably check here if p.vseg matches the segID of the
// pointed-to block... unfortunately, by this stage, we don't know what
@@ -1031,17 +1031,17 @@
handle_free_heap(tid, p);
}
-static void an_replace___builtin_delete ( ThreadId tid, void* p )
+static void pc_replace___builtin_delete ( ThreadId tid, void* p )
{
handle_free_heap(tid, p);
}
-static void an_replace___builtin_vec_delete ( ThreadId tid, void* p )
+static void pc_replace___builtin_vec_delete ( ThreadId tid, void* p )
{
handle_free_heap(tid, p);
}
-static void* an_replace_realloc ( ThreadId tid, void* p_old, SizeT new_size )
+static void* pc_replace_realloc ( ThreadId tid, void* p_old, SizeT new_size )
{
Seg seg;
@@ -1292,7 +1292,7 @@
//zz // Don't bother about eflags
//zz }
-// BEGIN move this uglyness to an_machine.c
+// BEGIN move this uglyness to pc_machine.c
static inline Bool host_is_big_endian ( void ) {
UInt x = 0x11223344;
@@ -1460,7 +1460,7 @@
return;
}
-// END move this uglyness to an_machine.c
+// END move this uglyness to pc_machine.c
/* returns True iff given slice exactly matches an int reg. Merely
a convenience wrapper around get_IntRegInfo. */
@@ -1583,12 +1583,12 @@
UWord p;
// Having to do this is a bit nasty...
- if (f == (Addr)an_replace_malloc
- || f == (Addr)an_replace___builtin_new
- || f == (Addr)an_replace___builtin_vec_new
- || f == (Addr)an_replace_calloc
- || f == (Addr)an_replace_memalign
- || f == (Addr)an_replace_realloc)
+ if (f == (Addr)pc_replace_malloc
+ || f == (Addr)pc_replace___builtin_new
+ || f == (Addr)pc_replace___builtin_vec_new
+ || f == (Addr)pc_replace_calloc
+ || f == (Addr)pc_replace_memalign
+ || f == (Addr)pc_replace_realloc)
{
// We remembered the last added segment; make sure it's the right one.
/* What's going on: at this point, the scheduler has just called
@@ -1617,9 +1617,9 @@
guest_state_offset, size, (UWord)last_seg_added );
}
}
- else if (f == (Addr)an_replace_free
- || f == (Addr)an_replace___builtin_delete
- || f == (Addr)an_replace___builtin_vec_delete
+ else if (f == (Addr)pc_replace_free
+ || f == (Addr)pc_replace___builtin_delete
+ || f == (Addr)pc_replace___builtin_vec_delete
// || f == (Addr)VG_(cli_block_size)
|| f == (Addr)VG_(message))
{
@@ -1651,7 +1651,7 @@
//zz the following do not per se indicate an internal consistency
//zz problem, but they are so likely to that we really want to know
//zz about it if so. */
-//zz Bool an_replace_cheap_sanity_check) ( void )
+//zz Bool pc_replace_cheap_sanity_check) ( void )
//zz {
//zz if (IS_DISTINGUISHED_SM(primary_map[0])
//zz /* kludge: kernel drops a page up at top of address range for
@@ -2591,7 +2591,7 @@
offsets correctly. */
Int guest_state_sizeB;
}
- ANEnv;
+ PCEnv;
/* SHADOW TMP MANAGEMENT. Shadow tmps are allocated lazily (on
demand), as they are encountered. This is for two reasons.
@@ -2619,16 +2619,16 @@
/* Find the tmp currently shadowing the given original tmp. If none
so far exists, allocate one. */
-static IRTemp findShadowTmp ( ANEnv* ane, IRTemp orig )
+static IRTemp findShadowTmp ( PCEnv* pce, IRTemp orig )
{
- tl_assert(orig < ane->n_originalTmps);
- tl_assert(ane->bb->tyenv->types[orig] == ane->gWordTy);
- if (ane->tmpMap[orig] == IRTemp_INVALID) {
+ tl_assert(orig < pce->n_originalTmps);
+ tl_assert(pce->bb->tyenv->types[orig] == pce->gWordTy);
+ if (pce->tmpMap[orig] == IRTemp_INVALID) {
tl_assert(0);
- ane->tmpMap[orig]
- = newIRTemp(ane->bb->tyenv, ane->gWordTy);
+ pce->tmpMap[orig]
+ = newIRTemp(pce->bb->tyenv, pce->gWordTy);
}
- return ane->tmpMap[orig];
+ return pce->tmpMap[orig];
}
/* Allocate a new shadow for the given original tmp. This means any
@@ -2638,13 +2638,13 @@
this. Instead we must abandon the old shadow, allocate a new one
and use that instead. */
__attribute__((noinline))
-static IRTemp newShadowTmp ( ANEnv* ane, IRTemp orig )
+static IRTemp newShadowTmp ( PCEnv* pce, IRTemp orig )
{
- tl_assert(orig < ane->n_originalTmps);
- tl_assert(ane->bb->tyenv->types[orig] == ane->gWordTy);
- ane->tmpMap[orig]
- = newIRTemp(ane->bb->tyenv, ane->gWordTy);
- return ane->tmpMap[orig];
+ tl_assert(orig < pce->n_originalTmps);
+ tl_assert(pce->bb->tyenv->types[orig] == pce->gWordTy);
+ pce->tmpMap[orig]
+ = newIRTemp(pce->bb->tyenv, pce->gWordTy);
+ return pce->tmpMap[orig];
}
@@ -2663,22 +2663,22 @@
/* (used for sanity checks only): is this an atom which looks
like it's from original code? */
-static Bool isOriginalAtom ( ANEnv* ane, IRAtom* a1 )
+static Bool isOriginalAtom ( PCEnv* pce, IRAtom* a1 )
{
if (a1->tag == Iex_Const)
return True;
- if (a1->tag == Iex_RdTmp && a1->Iex.RdTmp.tmp < ane->n_originalTmps)
+ if (a1->tag == Iex_RdTmp && a1->Iex.RdTmp.tmp < pce->n_originalTmps)
return True;
return False;
}
/* (used for sanity checks only): is this an atom which looks
like it's from shadow code? */
-static Bool isShadowAtom ( ANEnv* ane, IRAtom* a1 )
+static Bool isShadowAtom ( PCEnv* pce, IRAtom* a1 )
{
if (a1->tag == Iex_Const)
return True;
- if (a1->tag == Iex_RdTmp && a1->Iex.RdTmp.tmp >= ane->n_originalTmps)
+ if (a1->tag == Iex_RdTmp && a1->Iex.RdTmp.tmp >= pce->n_originalTmps)
return True;
return False;
}
@@ -2700,19 +2700,19 @@
/*------------------------------------------------------------*/
/* add stmt to a bb */
-static inline void stmt ( HChar cat, ANEnv* ane, IRStmt* st ) {
- if (ane->trace) {
+static inline void stmt ( HChar cat, PCEnv* pce, IRStmt* st ) {
+ if (pce->trace) {
VG_(printf)(" %c: ", cat);
ppIRStmt(st);
VG_(printf)("\n");
}
- addStmtToIRSB(ane->bb, st);
+ addStmtToIRSB(pce->bb, st);
}
/* assign value to tmp */
static inline
-void assign ( HChar cat, ANEnv* ane, IRTemp tmp, IRExpr* expr ) {
- stmt(cat, ane, IRStmt_WrTmp(tmp,expr));
+void assign ( HChar cat, PCEnv* pce, IRTemp tmp, IRExpr* expr ) {
+ stmt(cat, pce, IRStmt_WrTmp(tmp,expr));
}
/* build various kinds of expressions */
@@ -2733,12 +2733,12 @@
needs to be. But passing it is redundant, since we can deduce the
type merely by inspecting 'e'. So at least that fact to assert
that the two types agree. */
-static IRAtom* assignNew ( HChar cat, ANEnv* ane, IRType ty, IRExpr* e ) {
+static IRAtom* assignNew ( HChar cat, PCEnv* pce, IRType ty, IRExpr* e ) {
IRTemp t;
- IRType tyE = typeOfIRExpr(ane->bb->tyenv, e);
+ IRType tyE = typeOfIRExpr(pce->bb->tyenv, e);
tl_assert(tyE == ty); /* so 'ty' is redundant (!) */
- t = newIRTemp(ane->bb->tyenv, ty);
- assign(cat, ane, t, e);
+ t = newIRTemp(pce->bb->tyenv, ty);
+ assign(cat, pce, t, e);
return mkexpr(t);
}
@@ -2811,43 +2811,43 @@
holding the result. The arg must be a word-typed atom. Callee
must be a VG_REGPARM(1) function. */
__attribute__((noinline))
-static IRTemp gen_dirty_W_W ( ANEnv* ane, void* h_fn, HChar* h_nm,
+static IRTemp gen_dirty_W_W ( PCEnv* pce, void* h_fn, HChar* h_nm,
IRExpr* a1 )
{
IRTemp res;
IRDirty* di;
tl_assert(isIRAtom(a1));
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a1) == ane->gWordTy);
- res = newIRTemp(ane->bb->tyenv, ane->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a1) == pce->gWordTy);
+ res = newIRTemp(pce->bb->tyenv, pce->gWordTy);
di = unsafeIRDirty_1_N( res, 1/*regparms*/,
h_nm, VG_(fnptr_to_fnentry)( h_fn ),
mkIRExprVec_1( a1 ) );
- stmt( 'I', ane, IRStmt_Dirty(di) );
+ stmt( 'I', pce, IRStmt_Dirty(di) );
return res;
}
/* Two-arg version of gen_dirty_W_W. Callee must be a VG_REGPARM(2)
function.*/
-static IRTemp gen_dirty_W_WW ( ANEnv* ane, void* h_fn, HChar* h_nm,
+static IRTemp gen_dirty_W_WW ( PCEnv* pce, void* h_fn, HChar* h_nm,
IRExpr* a1, IRExpr* a2 )
{
IRTemp res;
IRDirty* di;
tl_assert(isIRAtom(a1));
tl_assert(isIRAtom(a2));
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a1) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a2) == ane->gWordTy);
- res = newIRTemp(ane->bb->tyenv, ane->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a1) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a2) == pce->gWordTy);
+ res = newIRTemp(pce->bb->tyenv, pce->gWordTy);
di = unsafeIRDirty_1_N( res, 2/*regparms*/,
h_nm, VG_(fnptr_to_fnentry)( h_fn ),
mkIRExprVec_2( a1, a2 ) );
- stmt( 'I', ane, IRStmt_Dirty(di) );
+ stmt( 'I', pce, IRStmt_Dirty(di) );
return res;
}
/* Three-arg version of gen_dirty_W_W. Callee must be a VG_REGPARM(3)
function.*/
-static IRTemp gen_dirty_W_WWW ( ANEnv* ane, void* h_fn, HChar* h_nm,
+static IRTemp gen_dirty_W_WWW ( PCEnv* pce, void* h_fn, HChar* h_nm,
IRExpr* a1, IRExpr* a2, IRExpr* a3 )
{
IRTemp res;
@@ -2855,20 +2855,20 @@
tl_assert(isIRAtom(a1));
tl_assert(isIRAtom(a2));
tl_assert(isIRAtom(a3));
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a1) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a2) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a3) == ane->gWordTy);
- res = newIRTemp(ane->bb->tyenv, ane->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a1) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a2) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a3) == pce->gWordTy);
+ res = newIRTemp(pce->bb->tyenv, pce->gWordTy);
di = unsafeIRDirty_1_N( res, 3/*regparms*/,
h_nm, VG_(fnptr_to_fnentry)( h_fn ),
mkIRExprVec_3( a1, a2, a3 ) );
- stmt( 'I', ane, IRStmt_Dirty(di) );
+ stmt( 'I', pce, IRStmt_Dirty(di) );
return res;
}
/* Four-arg version of gen_dirty_W_W. Callee must be a VG_REGPARM(3)
function.*/
-static IRTemp gen_dirty_W_WWWW ( ANEnv* ane, void* h_fn, HChar* h_nm,
+static IRTemp gen_dirty_W_WWWW ( PCEnv* pce, void* h_fn, HChar* h_nm,
IRExpr* a1, IRExpr* a2,
IRExpr* a3, IRExpr* a4 )
{
@@ -2878,55 +2878,55 @@
tl_assert(isIRAtom(a2));
tl_assert(isIRAtom(a3));
tl_assert(isIRAtom(a4));
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a1) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a2) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a3) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a4) == ane->gWordTy);
- res = newIRTemp(ane->bb->tyenv, ane->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a1) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a2) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a3) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a4) == pce->gWordTy);
+ res = newIRTemp(pce->bb->tyenv, pce->gWordTy);
di = unsafeIRDirty_1_N( res, 3/*regparms*/,
h_nm, VG_(fnptr_to_fnentry)( h_fn ),
mkIRExprVec_4( a1, a2, a3, a4 ) );
- stmt( 'I', ane, IRStmt_Dirty(di) );
+ stmt( 'I', pce, IRStmt_Dirty(di) );
return res;
}
/* Version of gen_dirty_W_WW with no return value. Callee must be a
VG_REGPARM(2) function.*/
-static void gen_dirty_v_WW ( ANEnv* ane, void* h_fn, HChar* h_nm,
+static void gen_dirty_v_WW ( PCEnv* pce, void* h_fn, HChar* h_nm,
IRExpr* a1, IRExpr* a2 )
{
IRDirty* di;
tl_assert(isIRAtom(a1));
tl_assert(isIRAtom(a2));
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a1) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a2) == ane->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a1) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a2) == pce->gWordTy);
di = unsafeIRDirty_0_N( 2/*regparms*/,
h_nm, VG_(fnptr_to_fnentry)( h_fn ),
mkIRExprVec_2( a1, a2 ) );
- stmt( 'I', ane, IRStmt_Dirty(di) );
+ stmt( 'I', pce, IRStmt_Dirty(di) );
}
/* Version of gen_dirty_W_WWW with no return value. Callee must be a
VG_REGPARM(3) function.*/
-static void gen_dirty_v_WWW ( ANEnv* ane, void* h_fn, HChar* h_nm,
+static void gen_dirty_v_WWW ( PCEnv* pce, void* h_fn, HChar* h_nm,
IRExpr* a1, IRExpr* a2, IRExpr* a3 )
{
IRDirty* di;
tl_assert(isIRAtom(a1));
tl_assert(isIRAtom(a2));
tl_assert(isIRAtom(a3));
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a1) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a2) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a3) == ane->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a1) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a2) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a3) == pce->gWordTy);
di = unsafeIRDirty_0_N( 3/*regparms*/,
h_nm, VG_(fnptr_to_fnentry)( h_fn ),
mkIRExprVec_3( a1, a2, a3 ) );
- stmt( 'I', ane, IRStmt_Dirty(di) );
+ stmt( 'I', pce, IRStmt_Dirty(di) );
}
/* Version of gen_dirty_v_WWW for 4 arguments. Callee must be a
VG_REGPARM(3) function.*/
-static void gen_dirty_v_WWWW ( ANEnv* ane, void* h_fn, HChar* h_nm,
+static void gen_dirty_v_WWWW ( PCEnv* pce, void* h_fn, HChar* h_nm,
IRExpr* a1, IRExpr* a2,
IRExpr* a3, IRExpr* a4 )
{
@@ -2935,39 +2935,39 @@
tl_assert(isIRAtom(a2));
tl_assert(isIRAtom(a3));
tl_assert(isIRAtom(a4));
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a1) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a2) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a3) == ane->gWordTy);
- tl_assert(typeOfIRExpr(ane->bb->tyenv, a4) == ane->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a1) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a2) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a3) == pce->gWordTy);
+ tl_assert(typeOfIRExpr(pce->bb->tyenv, a4) == pce->gWordTy);
di = unsafeIRDirty_0_N( 3/*regparms*/,
h_nm, VG_(fnptr_to_fnentry)( h_fn ),
mkIRExprVec_4( a1, a2, a3, a4 ) );
- stmt( 'I', ane, IRStmt_Dirty(di) );
+ stmt( 'I', pce, IRStmt_Dirty(di) );
}
-static IRAtom* uwiden_to_host_word ( ANEnv* ane, IRAtom* a )
+static IRAtom* uwiden_to_host_word ( PCEnv* pce, IRAtom* a )
{
- IRType a_ty = typeOfIRExpr(ane->bb->tyenv, a);
+ IRType a_ty = typeOfIRExpr(pce->bb->tyenv, a);
tl_assert(isIRAtom(a));
- if (ane->hWordTy == Ity_I32) {
+ if (pce->hWordTy == Ity_I32) {
switch (a_ty) {
case Ity_I8:
- return assignNew( 'I', ane, Ity_I32, unop(Iop_8Uto32, a) );
+ return assignNew( 'I', pce, Ity_I32, unop(Iop_8Uto32, a) );
case Ity_I16:
- return assignNew( 'I', ane, Ity_I32, unop(Iop_16Uto32, a) );
+ return assignNew( 'I', pce, Ity_I32, unop(Iop_16Uto32, a) );
default:
ppIRType(a_ty);
tl_assert(0);
}
} else {
- tl_assert(ane->hWordTy == Ity_I64);
+ tl_assert(pce->hWordTy == Ity_I64);
switch (a_ty) {
case Ity_I8:
- return assignNew( 'I', ane, Ity_I64, unop(Iop_8Uto64, a) );
+ return assignNew( 'I', pce, Ity_I64, unop(Iop_8Uto64, a) );
case Ity_I16:
- return assignNew( 'I', ane, Ity_I64, unop(Iop_16Uto64, a) );
+ return assignNew( 'I', pce, Ity_I64, unop(Iop_16Uto64, a) );
case Ity_I32:
- return assignNew( 'I', ane, Ity_I64, unop(Iop_32Uto64, a) );
+ return assignNew( 'I', pce, Ity_I64, unop(Iop_32Uto64, a) );
default:
ppIRType(a_ty);
tl_assert(0);
@@ -2978,39 +2978,39 @@
/* 'e' is a word-sized atom. Call nonptr_or_unknown with it, bind the
results to a new temporary, and return the temporary. Note this
takes an original expression but returns a shadow value. */
-static IRTemp gen_call_nonptr_or_unknown_w ( ANEnv* ane, IRExpr* e )
+static IRTemp gen_call_nonptr_or_unknown_w ( PCEnv* pce, IRExpr* e )
{
- return gen_dirty_W_W( ane, &nonptr_or_unknown,
+ return gen_dirty_W_W( pce, &nonptr_or_unknown,
"nonptr_or_unknown", e );
}
/* Generate the shadow value for an IRExpr which is an atom and
guaranteed to be word-sized. */
-static IRAtom* schemeEw_Atom ( ANEnv* ane, IRExpr* e )
+static IRAtom* schemeEw_Atom ( PCEnv* pce, IRExpr* e )
{
- if (ane->gWordTy == Ity_I32) {
+ if (pce->gWordTy == Ity_I32) {
if (e->tag == Iex_Const && e->Iex.Const.con->tag == Ico_U32) {
IRTemp t;
tl_assert(sizeof(UWord) == 4);
- t = gen_call_nonptr_or_unknown_w(ane, e);
+ t = gen_call_nonptr_or_unknown_w(pce, e);
return mkexpr(t);
}
if (e->tag == Iex_RdTmp
- && typeOfIRExpr(ane->bb->tyenv, e) == Ity_I32) {
- return mkexpr( findShadowTmp(ane, e->Iex.RdTmp.tmp) );
+ && typeOfIRExpr(pce->bb->tyenv, e) == Ity_I32) {
+ return mkexpr( findShadowTmp(pce, e->Iex.RdTmp.tmp) );
}
/* there are no other word-sized atom cases */
} else {
if (e->tag == Iex_Const && e->Iex.Const.con->tag == Ico_U64) {
IRTemp t;
tl_assert(sizeof(UWord) == 8);
- t = gen_call_nonptr_or_unknown_w(ane, e);
+ t = gen_call_nonptr_or_unknown_w(pce, e);
return mkexpr(t);
}
if (e->tag == Iex_RdTmp
- && typeOfIRExpr(ane->bb->tyenv, e) == Ity_I64) {
- return mkexpr( findShadowTmp(ane, e->Iex.RdTmp.tmp) );
+ && typeOfIRExpr(pce->bb->tyenv, e) == Ity_I64) {
+ return mkexpr( findShadowTmp(pce, e->Iex.RdTmp.tmp) );
}
/* there are no other word-sized atom cases */
}
@@ -3020,7 +3020,7 @@
static
-void instrument_arithop ( ANEnv* ane,
+void instrument_arithop ( PCEnv* pce,
IRTemp dst, /* already holds result */
IRTemp dstv, /* generate an assignment to this */
IROp op,
@@ -3035,9 +3035,9 @@
IRExpr* a4v = NULL;
IRTemp res = IRTemp_INVALID;
- if (ane->gWordTy == Ity_I32) {
+ if (pce->gWordTy == Ity_I32) {
- tl_assert(ane->hWordTy == Ity_I32);
+ tl_assert(pce->hWordTy == Ity_I32);
switch (op) {
/* For these cases, pass Segs for both arguments, and the
@@ -3046,10 +3046,10 @@
case Iop_Sub32: nm = "do_subW"; fn = &do_subW; goto ssr32;
case Iop_Or32: nm = "do_orW"; fn = &do_orW; goto ssr32;
ssr32:
- a1v = schemeEw_Atom( ane, a1 );
- a2v = schemeEw_Atom( ane, a2 );
- res = gen_dirty_W_WWW( ane, fn, nm, a1v, a2v, mkexpr(dst) );
- assign( 'I', ane, dstv, mkexpr(res) );
+ a1v = schemeEw_Atom( pce, a1 );
+ a2v = schemeEw_Atom( pce, a2 );
+ res = gen_dirty_W_WWW( pce, fn, nm, a1v, a2v, mkexpr(dst) );
+ assign( 'I', pce, dstv, mkexpr(res) );
break;
/* In this case, pass Segs for both arguments, the result
@@ -3057,30 +3057,30 @@
the arguments. */
case Iop_And32:
nm = "do_andW"; fn = &do_andW;
- a1v = schemeEw_Atom( ane, a1 );
- a2v = schemeEw_Atom( ane, a2 );
+ a1v = schemeEw_Atom( pce, a1 );
+ a2v = schemeEw_Atom( pce, a2 );
res = gen_dirty_W_WWWW(
- ane, fn, nm, a1v, a2v, mkexpr(dst),
- assignNew( 'I', ane, Ity_I32,
+ pce, fn, nm, a1v, a2v, mkexpr(dst),
+ assignNew( 'I', pce, Ity_I32,
binop(Iop_Sub32,a1,a2) ) );
- assign( 'I', ane, dstv, mkexpr(res) );
+ assign( 'I', pce, dstv, mkexpr(res) );
break;
/* Pass one shadow arg and the result to the helper. */
case Iop_Not32: nm = "do_notW"; fn = &do_notW; goto vr32;
vr32:
- a1v = schemeEw_Atom( ane, a1 );
- res = gen_dirty_W_WW( ane, fn, nm, a1v, mkexpr(dst) );
- assign( 'I', ane, dstv, mkexpr(res) );
+ a1v = schemeEw_Atom( pce, a1 );
+ res = gen_dirty_W_WW( pce, fn, nm, a1v, mkexpr(dst) );
+ assign( 'I', pce, dstv, mkexpr(res) );
break;
/* Pass two shadow args only to the helper. */
case Iop_Mul32: nm = "do_mulW"; fn = &do_mulW; goto vv32;
vv32:
- a1v = schemeEw_Atom( ane, a1 );
- a2v = schemeEw_Atom( ane, a2 );
- res = gen_dirty_W_WW( ane, fn, nm, a1v, a2v );
- assign( 'I', ane, dstv, mkexpr(res) );
+ a1v = schemeEw_Atom( pce, a1 );
+ a2v = schemeEw_Atom( pce, a2 );
+ res = gen_dirty_W_WW( pce, fn, nm, a1v, a2v );
+ assign( 'I', pce, dstv, mkexpr(res) );
break;
/* We don't really know what the result could be; test at run
@@ -3094,9 +3094,9 @@
case Iop_16Uto32: goto n_or_u_32;
case Iop_16Sto32: goto n_or_u_32;
n_or_u_32:
- assign( 'I', ane, dstv,
+ assign( 'I', pce, dstv,
mkexpr(
- gen_call_nonptr_or_unknown_w( ane,
+ gen_call_nonptr_or_unknown_w( pce,
mkexpr(dst) ) ) );
break;
@@ -3107,7 +3107,7 @@
case Iop_8Uto32: goto n32;
case Iop_8Sto32: goto n32;
n32:
- assign( 'I', ane, dstv, mkU32( (UInt)NONPTR ));
+ assign( 'I', pce, dstv, mkU32( (UInt)NONPTR ));
break;
default:
@@ -3118,7 +3118,7 @@
} else {
- tl_assert(ane->gWordTy == Ity_I64);
+ tl_assert(pce->gWordTy == Ity_I64);
switch (op) {
/* For these cases, pass Segs for both arguments, and the
@@ -3127,10 +3127,10 @@
case Iop_Sub64: nm = "do_subW"; fn = &do_subW; goto ssr64;
case Iop_Or64: nm = "do_orW"; fn = &do_orW; goto ssr64;
ssr64:
- a1v = schemeEw_Atom( ane, a1 );
- a2v = schemeEw_Atom( ane, a2 );
- res = gen_dirty_W_WWW( ane, fn, nm, a1v, a2v, mkexpr(dst) );
- assign( 'I', ane, dstv, mkexpr(res) );
+ a1v = schemeEw_Atom( pce, a1 );
+ a2v = schemeEw_Atom( pce, a2 );
+ res = gen_dirty_W_WWW( pce, fn, nm, a1v, a2v, mkexpr(dst) );
+ assign( 'I', pce, dstv, mkexpr(res) );
break;
/* In this case, pass Segs for both arguments, the result
@@ -3138,30 +3138,30 @@
the arguments. */
case Iop_And64:
nm = "do_andW"; fn = &do_andW;
- a1v = schemeEw_Atom( ane, a1 );
- a2v = schemeEw_Atom( ane, a2 );
+ a1v = schemeEw_Atom( pce, a1 );
+ a2v = schemeEw_Atom( pce, a2 );
res = gen_dirty_W_WWWW(
- ane, fn, nm, a1v, a2v, mkexpr(dst),
- assignNew( 'I', ane, Ity_I64,
+ pce, fn, nm, a1v, a2v, mkexpr(dst),
+ assignNew( 'I', pce, Ity_I64,
binop(Iop_Sub64,a1,a2) ) );
- assign( 'I', ane, dstv, mkexpr(res) );
+ assign( 'I', pce, dstv, mkexpr(res) );
break;
/* Pass one shadow arg and the result to the helper. */
case Iop_Not64: nm = "do_notW"; fn = &do_notW; goto vr64;
vr64:
- a1v = schemeEw_Atom( ane, a1 );
- res = gen_dirty_W_WW( ane, fn, nm, a1v, mkexpr(dst) );
- assign( 'I', ane, dstv, mkexpr(res) );
+ a1v = schemeEw_Atom( pce, a1 );
+ res = gen_dirty_W_WW( pce, fn, nm, a1v, mkexpr(dst) );
+ assign( 'I', pce, dstv, mkexpr(res) );
break;
/* Pass two shadow args only to the helper. */
case Iop_Mul64: nm = "do_mulW"; fn = &do_mulW; goto vv64;
vv64:
- a1v = schemeEw_Atom( ane, a1 );
- a2v = schemeEw_Atom( ane, a2 );
- res = gen_dirty_W_WW( ane, fn, nm, a1v, a2v );
- assign( 'I', ane, dstv, mkexpr(res) );
+ a1v = schemeEw_Atom( pce, a1 );
+ a2v = schemeEw_Atom( pce, a2 );
+ res = gen_dirty_W_WW( pce, fn, nm, a1v, a2v );
+ assign( 'I', pce, dstv, mkexpr(res) );
break;
/* We don't really know what the result could be; test at run
@@ -3179,9 +3179,9 @@
case Iop_MullS32: goto n_or_u_64;
case Iop_MullU32: goto n_or_u_64;
n_or_u_64:
- assign( 'I', ane, dstv,
+ assign( 'I', pce, dstv,
mkexpr(
- gen_call_nonptr_or_unknown_w( ane,
+ gen_call_nonptr_or_unknown_w( pce,
mkexpr(dst) ) ) );
break;
@@ -3194,7 +3194,7 @@
case Iop_DivModU64to32: goto n64;
case Iop_DivModS64to32: goto n64;
n64:
- assign( 'I', ane, dstv, mkU64( (UInt)NONPTR ));
+ assign( 'I', pce, dstv, mkU64( (UInt)NONPTR ));
break;
default:
@@ -3209,16 +3209,16 @@
/* iii describes zero or more non-exact integer register updates. For
each one, generate IR to get the containing register, apply
nonptr_or_unknown to it, and write it back again. */
-static void do_nonptr_or_unknown_for_III( ANEnv* ane, IntRegInfo* iii )
+static void do_nonptr_or_unknown_for_III( PCEnv* pce, IntRegInfo* iii )
{
Int i;
tl_assert(iii && iii->n_offsets >= 0);
for (i = 0; i < iii->n_offsets; i++) {
- IRAtom* a1 = assignNew( 'I', ane, ane->gWordTy,
- IRExpr_Get( iii->offsets[i], ane->gWordTy ));
- IRTemp a2 = gen_call_nonptr_or_unknown_w( ane, a1 );
- stmt( 'I', ane, IRStmt_Put( iii->offsets[i]
- + ane->guest_state_sizeB,
+ IRAtom* a1 = assignNew( 'I', pce, pce->gWordTy,
+ IRExpr_Get( iii->offsets[i], pce->gWordTy ));
+ IRTemp a2 = gen_call_nonptr_or_unknown_w( pce, a1 );
+ stmt( 'I', pce, IRStmt_Put( iii->offsets[i]
+ + pce->guest_state_sizeB,
mkexpr(a2) ));
}
}
@@ -3234,7 +3234,7 @@
references, since we need the instrumentation (hence bounds check
and potential error message) to happen before the reference itself,
as the latter could cause a fault. */
-static void schemeS ( ANEnv* ane, IRStmt* st )
+static void schemeS ( PCEnv* pce, IRStmt* st )
{
tl_assert(st);
tl_assert(isFlatIRStmt(st));
@@ -3244,19 +3244,19 @@
case Ist_Dirty: {
Int i;
IRDirty* di;
- stmt( 'C', ane, st );
+ stmt( 'C', pce, st );
/* nasty. assumes that (1) all helpers are unconditional,
and (2) all outputs are non-ptr */
di = st->Ist.Dirty.details;
/* deal with the return tmp, if any */
if (di->tmp != IRTemp_INVALID
- && typeOfIRTemp(ane->bb->tyenv, di->tmp) == ane->gWordTy) {
+ && typeOfIRTemp(pce->bb->tyenv, di->tmp) == pce->gWordTy) {
/* di->tmp is shadowed. Set it to NONPTR. */
- IRTemp dstv = newShadowTmp( ane, di->tmp );
- if (ane->gWordTy == Ity_I32) {
- assign( 'I', ane, dstv, mkU32( (UInt)NONPTR ));
+ IRTemp dstv = newShadowTmp( pce, di->tmp );
+ if (pce->gWordTy == Ity_I32) {
+ assign( 'I', pce, dstv, mkU32( (UInt)NONPTR ));
} else {
- assign( 'I', ane, dstv, mkU64( (ULong)NONPTR ));
+ assign( 'I', pce, dstv, mkU64( (ULong)NONPTR ));
}
}
/* apply the nonptr_or_unknown technique to any parts of
@@ -3275,11 +3275,11 @@
if (iii.n_offsets == -1) {
/* case (1): exact write of an integer register. */
IRAtom* a1
- = assignNew( 'I', ane, ane->gWordTy,
- IRExpr_Get( iii.offsets[i], ane->gWordTy ));
- IRTemp a2 = gen_call_nonptr_or_unknown_w( ane, a1 );
- stmt( 'I', ane, IRStmt_Put( iii.offsets[i]
- + ane->guest_state_sizeB,
+ = assignNew( 'I', pce, pce->gWordTy,
+ IRExpr_Get( iii.offsets[i], pce->gWordTy ));
+ IRTemp a2 = gen_call_nonptr_or_unknown_w( pce, a1 );
+ stmt( 'I', pce, IRStmt_Put( iii.offsets[i]
+ + pce->guest_state_sizeB,
mkexpr(a2) ));
} else {
tl_assert(0); /* awaiting test case */
@@ -3290,7 +3290,7 @@
shadow value. */
tl_assert(iii.n_offsets >= 0
&& iii.n_offsets <= N_INTREGINFO_OFFSETS);
- do_nonptr_or_unknown_for_III( ane, &iii );
+ do_nonptr_or_unknown_for_III( pce, &iii );
}
} /* for (i = 0; i < di->nFxState; i++) */
/* punt on memory outputs */
@@ -3307,7 +3307,7 @@
case Ist_MBE:
case Ist_Exit:
case Ist_IMark:
- stmt( 'C', ane, st );
+ stmt( 'C', pce, st );
break;
case Ist_Put: {
@@ -3322,17 +3322,17 @@
3. It is none of the above. Generate no instrumentation. */
IntRegInfo iii;
IRType ty;
- stmt( 'C', ane, st );
- ty = typeOfIRExpr(ane->bb->tyenv, st->Ist.Put.data);
+ stmt( 'C', pce, st );
+ ty = typeOfIRExpr(pce->bb->tyenv, st->Ist.Put.data);
get_IntRegInfo( &iii, st->Ist.Put.offset,
sizeofIRType(ty) );
if (iii.n_offsets == -1) {
/* case (1): exact write of an integer register. */
- tl_assert(ty == ane->gWordTy);
- stmt( 'I', ane,
+ tl_assert(ty == pce->gWordTy);
+ stmt( 'I', pce,
IRStmt_Put( st->Ist.Put.offset
- + ane->guest_state_sizeB,
- schemeEw_Atom( ane, st->Ist.Put.data)) );
+ + pce->guest_state_sizeB,
+ schemeEw_Atom( pce, st->Ist.Put.data)) );
} else {
/* when == 0: case (3): no instrumentation needed */
/* when > 0: case (2) .. complex case. Fish out the
@@ -3341,7 +3341,7 @@
value. */
tl_assert(iii.n_offsets >= 0
&& iii.n_offsets <= N_INTREGINFO_OFFSETS);
- do_nonptr_or_unknown_for_III( ane, &iii );
+ do_nonptr_or_unknown_for_III( pce, &iii );
}
break;
} /* case Ist_Put */
@@ -3360,11 +3360,11 @@
*/
IRExpr* data = st->Ist.Store.data;
IRExpr* addr = st->Ist.Store.addr;
- IRType d_ty = typeOfIRExpr(ane->bb->tyenv, data);
+ IRType d_ty = typeOfIRExpr(pce->bb->tyenv, data);
HChar* h_nm = NULL;
void* h_fn = NULL;
IRExpr* addrv = NULL;
- if (ane->gWordTy == Ity_I32) {
+ if (pce->gWordTy == Ity_I32) {
/* 32 bit host/guest (cough, cough) */
switch (d_ty) {
case Ity_I32: h_fn = &check_store4W;
@@ -3375,14 +3375,14 @@
h_nm = "check_store1"; break;
default: tl_assert(0);
}
- addrv = schemeEw_Atom( ane, addr );
+ addrv = schemeEw_Atom( pce, addr );
if (d_ty == Ity_I32) {
- IRExpr* datav = schemeEw_Atom( ane, data );
- gen_dirty_v_WWWW( ane, h_fn, h_nm, addr, addrv,
+ IRExpr* datav = schemeEw_Atom( pce, data );
+ gen_dirty_v_WWWW( pce, h_fn, h_nm, addr, addrv,
data, datav );
} else {
- gen_dirty_v_WWW( ane, h_fn, h_nm, addr, addrv,
- uwiden_to_host_word( ane, data ));
+ gen_dirty_v_WWW( pce, h_fn, h_nm, addr, addrv,
+ uwiden_to_host_word( pce, data ));
}
} else {
/* 64 bit host/guest (cough, cough) */
@@ -3397,14 +3397,14 @@
h_nm = "check_store1"; break;
default: ppIRType(d_ty); tl_assert(0);
}
- addrv = schemeEw_Atom( ane, addr );
+ addrv = schemeEw_Atom( pce, addr );
if (d_ty == Ity_I64) {
- IRExpr* datav = schemeEw_Atom( ane, data );
- gen_dirty_v_WWWW( ane, h_fn, h_nm, addr, addrv,
+ IRExpr* datav = schemeEw_Atom( pce, data );
+ gen_dirty_v_WWWW( pce, h_fn, h_nm, addr, addrv,
data, datav );
} else {
- gen_dirty_v_WWW( ane, h_fn, h_nm, addr, addrv,
- uwiden_to_host_word( ane, data ));
+ gen_dirty_v_WWW( pce, h_fn, h_nm, addr, addrv,
+ uwiden_to_host_word( pce, data ));
}
}
/* And don't copy the original, since the helper does the
@@ -3418,47 +3418,47 @@
appear, we in fact only get an atom (Iex_RdTmp or
Iex_Const). */
IRExpr* e = st->Ist.WrTmp.data;
- IRType e_ty = typeOfIRExpr( ane->bb->tyenv, e );
- Bool isWord = e_ty == ane->gWordTy;
+ IRType e_ty = typeOfIRExpr( pce->bb->tyenv, e );
+ Bool isWord = e_ty == pce->gWordTy;
IRTemp dst = st->Ist.WrTmp.tmp;
- IRTemp dstv = isWord ? newShadowTmp( ane, dst )
+ IRTemp dstv = isWord ? newShadowTmp( pce, dst )
: IRTemp_INVALID;
switch (e->tag) {
case Iex_Const: {
- stmt( 'C', ane, st );
+ stmt( 'C', pce, st );
if (isWord)
- assign( 'I', ane, dstv, schemeEw_Atom( ane, e ) );
+ assign( 'I', pce, dstv, schemeEw_Atom( pce, e ) );
break;
}
case Iex_CCall: {
- stmt( 'C', ane, st );
+ stmt( 'C', pce, st );
if (isWord)
- assign( 'I', ane, dstv,
+ assign( 'I', pce, dstv,
mkexpr( gen_call_nonptr_or_unknown_w(
- ane, mkexpr(dst))));
+ pce, mkexpr(dst))));
break;
}
case Iex_Mux0X: {
/* Just steer the shadow values in the same way as the
originals. */
- stmt( 'C', ane, st );
+ stmt( 'C', pce, st );
if (isWord)
- assign( 'I', ane, dstv,
+ assign( 'I', pce, dstv,
IRExpr_Mux0X(
e->Iex.Mux0X.cond,
- schemeEw_Atom( ane, e->Iex.Mux0X.expr0 ),
- schemeEw_Atom( ane, e->Iex.Mux0X.exprX ) ));
+ schemeEw_Atom( pce, e->Iex.Mux0X.expr0 ),
+ schemeEw_Atom( pce, e->Iex.Mux0X.exprX ) ));
break;
}
case Iex_RdTmp: {
- stmt( 'C', ane, st );
+ stmt( 'C', pce, st );
if (isWord)
- assign( 'I', ane, dstv, schemeEw_Atom( ane, e ));
+ assign( 'I', pce, dstv, schemeEw_Atom( pce, e ));
break;
}
@@ -3467,7 +3467,7 @@
HChar* h_nm = NULL;
void* h_fn = NULL;
IRExpr* addrv = NULL;
- if (ane->gWordTy == Ity_I32) {
+ if (pce->gWordTy == Ity_I32) {
/* 32 bit host/guest (cough, cough) */
switch (e_ty) {
case Ity_I32: h_fn = &check_load4W;
@@ -3478,13 +3478,13 @@
h_nm = "check_load1"; break;
default: tl_assert(0);
}
- addrv = schemeEw_Atom( ane, addr );
+ addrv = schemeEw_Atom( pce, addr );
if (e_ty == Ity_I32) {
- assign( 'I', ane, dstv,
- mkexpr( gen_dirty_W_WW( ane, h_fn, h_nm,
+ assign( 'I', pce, dstv,
+ mkexpr( gen_dirty_W_WW( pce, h_fn, h_nm,
addr, addrv )) );
} else {
- gen_dirty_v_WW( ane, h_fn, h_nm, addr, addrv );
+ gen_dirty_v_WW( pce, h_fn, h_nm, addr, addrv );
}
} else {
/* 64 bit host/guest (cough, cough) */
@@ -3499,37 +3499,37 @@
h_nm = "check_load1"; break;
default: ppIRType(e_ty); tl_assert(0);
}
- addrv = schemeEw_Atom( ane, addr );
+ addrv = schemeEw_Atom( pce, addr );
if (e_ty == Ity_I64) {
- assign( 'I', ane, dstv,
- mkexpr( gen_dirty_W_WW( ane, h_fn, h_nm,
+ assign( 'I', pce, dstv,
+ mkexpr( gen_dirty_W_WW( pce, h_fn, h_nm,
addr, addrv )) );
} else {
- gen_dirty_v_WW( ane, h_fn, h_nm, addr, addrv );
+ gen_dirty_v_WW( pce, h_fn, h_nm, addr, addrv );
}
}
/* copy the original -- must happen after the helper call */
- stmt( 'C', ane, st );
+ stmt( 'C', pce, st );
break;
}
case Iex_Get: {
- stmt( 'C', ane, st );
+ stmt( 'C', pce, st );
if (isWord) {
/* guest-word-typed tmp assignment, so it will have a
shadow tmp, and we must make an assignment to
that */
if (is_integer_guest_reg(e->Iex.Get.offset,
sizeofIRType(e->Iex.Get.ty))) {
- assign( 'I', ane, dstv,
+ assign( 'I', pce, dstv,
IRExpr_Get( e->Iex.Get.offset
- ...
[truncated message content] |
|
From: <sv...@va...> - 2008-07-04 09:48:25
|
Author: sewardj Date: 2008-07-04 10:48:31 +0100 (Fri, 04 Jul 2008) New Revision: 8352 Log: This commit adds an experimental tool, Ptrcheck, previously known as Annelid. Annelid is a tool for bounds checking, written by Nick Nethercote, as contained in http://www.valgrind.org/downloads/njn/valgrind-annelid.tar.bz2. This commit contains those sources ported to the current (3.x) Valgrind framework. Note this is a work in progress and the current port runs only the simplest programs (if at all), although the original Annelid tool worked quite reliably. The ideas behind the tool are described in detail in Bounds-Checking Entire Programs Without Recompiling. Nicholas Nethercote and Jeremy Fitzhardinge. Informal Proceedings of the Second Workshop on Semantics, Program Analysis, and Computing Environments for Memory Management (SPACE 2004), Venice, Italy, January 2004. http://www.valgrind.org/docs/bounds-checking2004.ps and also chapter 4 of Nick's PhD thesis, Dynamic Binary Analysis and Instrumentation. Nicholas Nethercote. PhD Dissertation, University of Cambridge, November 2004. http://www.valgrind.org/docs/phd2004.pdf Added: branches/PTRCHECK/exp-ptrcheck/ branches/PTRCHECK/exp-ptrcheck/Makefile.am branches/PTRCHECK/exp-ptrcheck/docs/ branches/PTRCHECK/exp-ptrcheck/docs/Makefile.am branches/PTRCHECK/exp-ptrcheck/pc_intercepts.c branches/PTRCHECK/exp-ptrcheck/pc_list.c branches/PTRCHECK/exp-ptrcheck/pc_list.h branches/PTRCHECK/exp-ptrcheck/pc_main.c branches/PTRCHECK/exp-ptrcheck/tests/ branches/PTRCHECK/exp-ptrcheck/tests/Makefile.am [... diff too large to include ...] |
|
From: <sv...@va...> - 2008-07-04 09:21:10
|
Author: sewardj Date: 2008-07-04 10:21:15 +0100 (Fri, 04 Jul 2008) New Revision: 8351 Log: Make a copy of trunk r8350 for experimentation with pointer-tracking based bounds checking. Added: branches/PTRCHECK/ Copied: branches/PTRCHECK (from rev 8350, trunk) |
|
From: Julian S. <js...@ac...> - 2008-07-04 09:10:11
|
On Thursday 03 July 2008 13:41, Bart Van Assche wrote: > Hello Julian, > > I'd like to rename exp-drd into drd. Fine. > Is this something I can do myself ? Yes, I think so. "svn move exp-drd drd ; svn commit" or something like that. J |
|
From: Bart V. A. <bar...@gm...> - 2008-07-04 07:29:47
|
On Fri, Jul 4, 2008 at 7:47 AM, Julian Seward <js...@ac...> wrote: > On Thursday 03 July 2008 11:47, Bart Van Assche wrote: > > Is it OK if I apply the patch below to the trunk ? This patch contains > > the following changes: > > Looks OK in general. However, if the patch is logically part of the > format checking changes, why do you want to apply it directly to the > trunk instead of via any eventual merge of the FORMATCHECK branch? Merging the whole FORMATCHECK branch at once to the trunk is also fine for me. Who should do this, and when should this happen ? > > - Made %' a synonym of %, (insert thousands separator). > > We need to check if gcc-3.0.4 -- the oldest supported gcc now -- > can deal with that. man 3 printf says "Note that many versions of > gcc(1) cannot parse this option and will issue a warning." I'll > build gcc-3.0.4 and check. Do we really support compilation of Valgrind with gcc 3.0 and 3.1 ? These two compiler versions are not supported for compiling the Linux kernel because these two versions do not compile the kernel code correctly. > > - Add support for multiple flags past %. > > - Add support for %#. > > - Add VG_(xml_message)(). > > - Replace some calls of VG_(message)() by calls to VG_(xml_message)(). > > Ok; except that since VG_(xml_message) is exactly the same as VG_(message) > and nothing really to do with xml, I'd prefer to call it VG_(message_no_f_c) > to make the difference clearer (no-format-check). By this time VG_(xml_message)() has been renamed to VG_(message_no_f_c)(). Bart. |
|
From: <sv...@va...> - 2008-07-04 06:46:42
|
Author: bart
Date: 2008-07-04 07:46:30 +0100 (Fri, 04 Jul 2008)
New Revision: 8350
Log:
Renamed VG_(xml_message)() into VG_(message_no_f_c)().
Modified:
branches/FORMATCHECK/coregrind/m_errormgr.c
branches/FORMATCHECK/coregrind/m_libcprint.c
branches/FORMATCHECK/coregrind/m_main.c
branches/FORMATCHECK/include/pub_tool_libcprint.h
branches/FORMATCHECK/memcheck/mc_errors.c
Modified: branches/FORMATCHECK/coregrind/m_errormgr.c
===================================================================
--- branches/FORMATCHECK/coregrind/m_errormgr.c 2008-07-03 16:56:39 UTC (rev 8349)
+++ branches/FORMATCHECK/coregrind/m_errormgr.c 2008-07-04 06:46:30 UTC (rev 8350)
@@ -709,12 +709,12 @@
continue;
any_supp = True;
if (VG_(clo_xml)) {
- VG_(xml_message)(Vg_DebugMsg,
- " <pair>\n"
- " <count>%d</count>\n"
- " <name>%t</name>\n"
- " </pair>",
- su->count, su->sname);
+ VG_(message_no_f_c)(Vg_DebugMsg,
+ " <pair>\n"
+ " <count>%d</count>\n"
+ " <name>%t</name>\n"
+ " </pair>",
+ su->count, su->sname);
} else {
VG_(message)(Vg_DebugMsg, "supp: %6d %s", su->count, su->sname);
}
Modified: branches/FORMATCHECK/coregrind/m_libcprint.c
===================================================================
--- branches/FORMATCHECK/coregrind/m_libcprint.c 2008-07-03 16:56:39 UTC (rev 8349)
+++ branches/FORMATCHECK/coregrind/m_libcprint.c 2008-07-04 06:46:30 UTC (rev 8350)
@@ -365,8 +365,8 @@
return count;
}
-/* Send a single-part XML message. */
-UInt VG_(xml_message) ( VgMsgKind kind, const HChar* format, ... )
+/* Send a simple single-part XML message. */
+UInt VG_(message_no_f_c) ( VgMsgKind kind, const HChar* format, ... )
{
UInt count;
va_list vargs;
Modified: branches/FORMATCHECK/coregrind/m_main.c
===================================================================
--- branches/FORMATCHECK/coregrind/m_main.c 2008-07-03 16:56:39 UTC (rev 8349)
+++ branches/FORMATCHECK/coregrind/m_main.c 2008-07-04 06:46:30 UTC (rev 8350)
@@ -747,9 +747,10 @@
i++;
}
- VG_(xml_message)(Vg_UserMsg, "<logfilequalifier> <var>%t</var> "
- "<value>%t</value> </logfilequalifier>",
- qualname,qual);
+ VG_(message_no_f_c)(Vg_UserMsg,
+ "<logfilequalifier> <var>%t</var> "
+ "<value>%t</value> </logfilequalifier>",
+ qualname,qual);
format[i] = '}';
i++;
}
@@ -853,7 +854,7 @@
VG_(message)(Vg_UserMsg, "");
VG_(message)(Vg_UserMsg, "<pid>%d</pid>", VG_(getpid)());
VG_(message)(Vg_UserMsg, "<ppid>%d</ppid>", VG_(getppid)());
- VG_(xml_message)(Vg_UserMsg, "<tool>%t</tool>", toolname);
+ VG_(message_no_f_c)(Vg_UserMsg, "<tool>%t</tool>", toolname);
if (VG_(clo_log_name))
print_file_vars(VG_(clo_log_name));
if (VG_(clo_xml_user_comment)) {
@@ -868,26 +869,26 @@
VG_(message)(Vg_UserMsg, " <vargv>");
if (VG_(name_of_launcher))
- VG_(xml_message)(Vg_UserMsg, " <exe>%t</exe>",
- VG_(name_of_launcher));
+ VG_(message_no_f_c)(Vg_UserMsg, " <exe>%t</exe>",
+ VG_(name_of_launcher));
else
- VG_(xml_message)(Vg_UserMsg, " <exe>%t</exe>",
- "(launcher name unknown)");
+ VG_(message_no_f_c)(Vg_UserMsg, " <exe>%t</exe>",
+ "(launcher name unknown)");
for (i = 0; i < VG_(sizeXA)( VG_(args_for_valgrind) ); i++) {
- VG_(xml_message)(Vg_UserMsg,
- " <arg>%t</arg>",
- * (HChar**) VG_(indexXA)( VG_(args_for_valgrind), i ));
+ VG_(message_no_f_c)(Vg_UserMsg,
+ " <arg>%t</arg>",
+ * (HChar**) VG_(indexXA)( VG_(args_for_valgrind), i ));
}
VG_(message)(Vg_UserMsg, " </vargv>");
VG_(message)(Vg_UserMsg, " <argv>");
if (VG_(args_the_exename))
- VG_(xml_message)(Vg_UserMsg, " <exe>%t</exe>",
- VG_(args_the_exename));
+ VG_(message_no_f_c)(Vg_UserMsg, " <exe>%t</exe>",
+ VG_(args_the_exename));
for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
- VG_(xml_message)(Vg_UserMsg,
- " <arg>%t</arg>",
- * (HChar**) VG_(indexXA)( VG_(args_for_client), i ));
+ VG_(message_no_f_c)(Vg_UserMsg,
+ " <arg>%t</arg>",
+ * (HChar**) VG_(indexXA)( VG_(args_for_client), i ));
}
VG_(message)(Vg_UserMsg, " </argv>");
@@ -1934,12 +1935,12 @@
if (VG_(clo_xml)) {
HChar buf[50];
VG_(elapsed_wallclock_time)(buf);
- VG_(xml_message)(Vg_UserMsg,
- "<status>\n"
- " <state>RUNNING</state>\n"
- " <time>%t</time>\n"
- "</status>",
- buf);
+ VG_(message_no_f_c)(Vg_UserMsg,
+ "<status>\n"
+ " <state>RUNNING</state>\n"
+ " <time>%t</time>\n"
+ "</status>",
+ buf);
VG_(message)(Vg_UserMsg, "");
}
@@ -2046,12 +2047,12 @@
VG_(message)(Vg_UserMsg, "");
}
VG_(elapsed_wallclock_time)(buf);
- VG_(xml_message)(Vg_UserMsg,
- "<status>\n"
- " <state>FINISHED</state>\n"
- " <time>%t</time>\n"
- "</status>",
- buf);
+ VG_(message_no_f_c)(Vg_UserMsg,
+ "<status>\n"
+ " <state>FINISHED</state>\n"
+ " <time>%t</time>\n"
+ "</status>",
+ buf);
VG_(message)(Vg_UserMsg, "");
}
Modified: branches/FORMATCHECK/include/pub_tool_libcprint.h
===================================================================
--- branches/FORMATCHECK/include/pub_tool_libcprint.h 2008-07-03 16:56:39 UTC (rev 8349)
+++ branches/FORMATCHECK/include/pub_tool_libcprint.h 2008-07-04 06:46:30 UTC (rev 8350)
@@ -84,11 +84,11 @@
}
VgMsgKind;
-/* Send a single-part XML message. Appends a newline. The format
+/* Send a single-part message. Appends a newline. The format
specification may contain any ISO C format specifier or %t.
No attempt is made to let the compiler verify consistency of the
format string and the argument list. */
-extern UInt VG_(xml_message)( VgMsgKind kind, const HChar* format, ... );
+extern UInt VG_(message_no_f_c)( VgMsgKind kind, const HChar* format, ... );
/* Send a single-part message. Appends a newline. The format
specification may contain any ISO C format specifier. The gcc compiler
will verify consistency of the format string and the argument list. */
Modified: branches/FORMATCHECK/memcheck/mc_errors.c
===================================================================
--- branches/FORMATCHECK/memcheck/mc_errors.c 2008-07-03 16:56:39 UTC (rev 8349)
+++ branches/FORMATCHECK/memcheck/mc_errors.c 2008-07-04 06:46:30 UTC (rev 8350)
@@ -315,14 +315,14 @@
}
case Addr_DataSym:
- VG_(xml_message)(Vg_UserMsg,
- "%sAddress 0x%llx is %llu bytes "
- "inside data symbol \"%t\"%s",
- xpre,
- (ULong)a,
- (ULong)ai->Addr.DataSym.offset,
- ai->Addr.DataSym.name,
- xpost);
+ VG_(message_no_f_c)(Vg_UserMsg,
+ "%sAddress 0x%llx is %llu bytes "
+ "inside data symbol \"%t\"%s",
+ xpre,
+ (ULong)a,
+ (ULong)ai->Addr.DataSym.offset,
+ ai->Addr.DataSym.name,
+ xpost);
break;
case Addr_Variable:
@@ -335,13 +335,13 @@
break;
case Addr_SectKind:
- VG_(xml_message)(Vg_UserMsg,
- "%sAddress 0x%llx is in the %t segment of %t%s",
- xpre,
- (ULong)a,
- VG_(pp_SectKind)(ai->Addr.SectKind.kind),
- ai->Addr.SectKind.objname,
- xpost);
+ VG_(message_no_f_c)(Vg_UserMsg,
+ "%sAddress 0x%llx is in the %t segment of %t%s",
+ xpre,
+ (ULong)a,
+ VG_(pp_SectKind)(ai->Addr.SectKind.kind),
+ ai->Addr.SectKind.objname,
+ xpost);
break;
default:
@@ -568,8 +568,8 @@
LossRecord* l = extra->Err.Leak.lossRecord;
if (VG_(clo_xml)) {
- VG_(xml_message)(Vg_UserMsg, " <kind>%t</kind>",
- xml_leak_kind(l->loss_mode));
+ VG_(message_no_f_c)(Vg_UserMsg, " <kind>%t</kind>",
+ xml_leak_kind(l->loss_mode));
} else {
VG_(message)(Vg_UserMsg, "");
}
|
|
From: Julian S. <js...@ac...> - 2008-07-04 05:55:14
|
On Thursday 03 July 2008 11:47, Bart Van Assche wrote: > On Wed, Jul 2, 2008 at 10:26 PM, Julian Seward <js...@ac...> wrote: > > Am I right to understand that VG_(xml_message)() and VG_(message) are > > functionally identical, or is that not so? > > You are right -- in the patch I posted the source code of > VG_(message)() and VG_(xml_message)() is identical. > > Is it OK if I apply the patch below to the trunk ? This patch contains > the following changes: Looks OK in general. However, if the patch is logically part of the format checking changes, why do you want to apply it directly to the trunk instead of via any eventual merge of the FORMATCHECK branch? > - Made %' a synonym of %, (insert thousands separator). We need to check if gcc-3.0.4 -- the oldest supported gcc now -- can deal with that. man 3 printf says "Note that many versions of gcc(1) cannot parse this option and will issue a warning." I'll build gcc-3.0.4 and check. > - Add support for multiple flags past %. > - Add support for %#. > - Add VG_(xml_message)(). > - Replace some calls of VG_(message)() by calls to VG_(xml_message)(). Ok; except that since VG_(xml_message) is exactly the same as VG_(message) and nothing really to do with xml, I'd prefer to call it VG_(message_no_f_c) to make the difference clearer (no-format-check). J |
|
From: Tom H. <th...@cy...> - 2008-07-04 02:56:22
|
Nightly build on aston ( x86_64, Fedora Core 5 ) started at 2008-07-04 03:20:09 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 441 tests, 8 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) none/tests/blockfault (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc08_hbl2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 441 tests, 8 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) none/tests/blockfault (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Jul 4 03:39:10 2008 --- new.short Fri Jul 4 03:56:30 2008 *************** *** 8,10 **** ! == 441 tests, 8 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/file_locking (stderr) --- 8,10 ---- ! == 441 tests, 8 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) *************** *** 15,16 **** --- 15,17 ---- none/tests/mremap2 (stdout) + helgrind/tests/tc08_hbl2 (stdout) helgrind/tests/tc20_verifywrap (stderr) |
|
From: Tom H. <th...@cy...> - 2008-07-04 02:53:42
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2008-07-04 03:05:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 435 tests, 5 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) |
|
From: Tom H. <th...@cy...> - 2008-07-04 02:42:23
|
Nightly build on trojan ( x86_64, Fedora Core 6 ) started at 2008-07-04 03:25:08 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 439 tests, 8 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/bug133694 (stdout) memcheck/tests/x86/bug133694 (stderr) memcheck/tests/x86/scalar (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap2 (stdout) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) |
|
From: Tom H. <th...@cy...> - 2008-07-04 02:34:29
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2008-07-04 03:00:11 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 441 tests, 31 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/amd64/insn_ssse3 (stdout) none/tests/amd64/insn_ssse3 (stderr) none/tests/amd64/ssse3_misaligned (stderr) none/tests/blockfault (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap2 (stdout) none/tests/x86/insn_ssse3 (stdout) none/tests/x86/insn_ssse3 (stderr) none/tests/x86/ssse3_misaligned (stderr) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |