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
(6) |
2
(4) |
3
(4) |
4
(4) |
|
5
(6) |
6
(9) |
7
(4) |
8
(15) |
9
(6) |
10
(6) |
11
(22) |
|
12
(12) |
13
(9) |
14
(4) |
15
(11) |
16
(8) |
17
(4) |
18
(6) |
|
19
(6) |
20
(15) |
21
(9) |
22
(9) |
23
(14) |
24
(7) |
25
(7) |
|
26
(8) |
27
(11) |
28
(4) |
29
(4) |
30
(12) |
31
(7) |
|
|
From: <sv...@va...> - 2008-10-20 23:34:01
|
Author: sewardj
Date: 2008-10-21 00:33:49 +0100 (Tue, 21 Oct 2008)
New Revision: 8686
Log:
On ppc32/64 we don't have a reliable way to detect function entries
and exits at the moment. So disable stack array bounds checking for
ppc32/64 platforms. Also (unnecessarily) disables global array bounds
checking on those platforms.
Add a flag --enable-sg-checks=no|yes [yes] so that stack and global
checking can be optionally disabled on any platform. This is useful
because stack and global checking is much more expensive than heap
checking, and so it may be desirable to disable it.
Modified:
trunk/exp-ptrcheck/h_main.c
trunk/exp-ptrcheck/pc_common.c
trunk/exp-ptrcheck/pc_common.h
trunk/exp-ptrcheck/pc_main.c
trunk/exp-ptrcheck/sg_main.c
Modified: trunk/exp-ptrcheck/h_main.c
===================================================================
--- trunk/exp-ptrcheck/h_main.c 2008-10-20 22:27:52 UTC (rev 8685)
+++ trunk/exp-ptrcheck/h_main.c 2008-10-20 23:33:49 UTC (rev 8686)
@@ -2654,9 +2654,9 @@
static inline
void check_load_or_store(Bool is_write, Addr m, UWord sz, Seg* mptr_vseg)
{
+#if 0
+ tl_assert(0);
if (h_clo_lossage_check) {
- tl_assert(0);
-#if 0
Seg* seg;
stats__tot_mem_refs++;
if (ISList__findI0( seglist, (Addr)m, &seg )) {
@@ -2693,8 +2693,8 @@
}
}
}
+ } /* clo_lossage_check */
#endif
- } /* clo_lossage_check */
# if SC_SEGS
checkSeg(mptr_vseg);
@@ -4732,6 +4732,7 @@
stats__segs_allocd, stats__segs_recycled);
}
+#if 0
if (h_clo_lossage_check) {
VG_(message)(Vg_UserMsg, "");
VG_(message)(Vg_UserMsg, "%12lld total memory references",
@@ -4746,6 +4747,7 @@
} else {
tl_assert( 0 == VG_(OSetGen_Size)(lossage) );
}
+#endif
}
Modified: trunk/exp-ptrcheck/pc_common.c
===================================================================
--- trunk/exp-ptrcheck/pc_common.c 2008-10-20 22:27:52 UTC (rev 8685)
+++ trunk/exp-ptrcheck/pc_common.c 2008-10-20 23:33:49 UTC (rev 8686)
@@ -58,13 +58,15 @@
// //
//////////////////////////////////////////////////////////////
-Bool h_clo_partial_loads_ok = True; /* user visible */
-Bool h_clo_lossage_check = False; /* dev flag only */
+Bool h_clo_partial_loads_ok = True; /* user visible */
+/* Bool h_clo_lossage_check = False; */ /* dev flag only */
+Bool sg_clo_enable_sg_checks = True; /* user visible */
Bool pc_process_cmd_line_options(Char* arg)
{
VG_BOOL_CLO(arg, "--partial-loads-ok", h_clo_partial_loads_ok)
- else VG_BOOL_CLO(arg, "--lossage-check", h_clo_lossage_check)
+ /* else VG_BOOL_CLO(arg, "--lossage-check", h_clo_lossage_check) */
+ else VG_BOOL_CLO(arg, "--enable-sg-checks", sg_clo_enable_sg_checks)
else
return VG_(replacement_malloc_process_cmd_line_option)(arg);
@@ -74,16 +76,19 @@
void pc_print_usage(void)
{
VG_(printf)(
- " --partial-loads-ok=no|yes same as for Memcheck [yes]\n"
+ " --partial-loads-ok=no|yes same as for Memcheck [yes]\n"
+ " --enable-sg-checks=no|yes enable stack & global array checking? [yes]\n"
);
VG_(replacement_malloc_print_usage)();
}
void pc_print_debug_usage(void)
{
+ /*
VG_(printf)(
- " --lossage-check=no|yes gather stats for quality control [no]\n"
+ " --lossage-check=no|yes gather stats for quality control [no]\n"
);
+ */
VG_(replacement_malloc_print_debug_usage)();
}
Modified: trunk/exp-ptrcheck/pc_common.h
===================================================================
--- trunk/exp-ptrcheck/pc_common.h 2008-10-20 22:27:52 UTC (rev 8685)
+++ trunk/exp-ptrcheck/pc_common.h 2008-10-20 23:33:49 UTC (rev 8686)
@@ -58,7 +58,8 @@
void pc_print_extra_suppression_info ( Error* err );
extern Bool h_clo_partial_loads_ok;
-extern Bool h_clo_lossage_check;
+/* extern Bool h_clo_lossage_check; */
+extern Bool sg_clo_enable_sg_checks;
Bool pc_process_cmd_line_options(Char* arg);
void pc_print_usage(void);
Modified: trunk/exp-ptrcheck/pc_main.c
===================================================================
--- trunk/exp-ptrcheck/pc_main.c 2008-10-20 22:27:52 UTC (rev 8685)
+++ trunk/exp-ptrcheck/pc_main.c 2008-10-20 23:33:49 UTC (rev 8686)
@@ -37,11 +37,11 @@
#include "pub_tool_basics.h"
#include "pub_tool_libcassert.h"
+#include "pub_tool_libcprint.h"
#include "pub_tool_execontext.h"
#include "pub_tool_tooliface.h"
#include "pub_tool_options.h"
-//#include "h_list.h" // Seg
#include "sg_main.h"
#include "pc_common.h"
#include "h_main.h"
@@ -125,6 +125,21 @@
{
h_post_clo_init();
sg_post_clo_init();
+# if defined(VGA_x86) || defined(VGA_amd64)
+ /* nothing */
+# elif defined(VGA_ppc32) || defined(VGA_ppc64)
+ if (VG_(clo_verbosity) >= 1 && sg_clo_enable_sg_checks) {
+ VG_(message)(Vg_UserMsg,
+ "WARNING: exp-ptrcheck on ppc32/ppc64 platforms: stack and global array");
+ VG_(message)(Vg_UserMsg,
+ "WARNING: checking is not currently supported. Only heap checking is");
+ VG_(message)(Vg_UserMsg,
+ "WARNING: supported. Disabling s/g checks (like --enable-sg-checks=no).");
+ }
+ sg_clo_enable_sg_checks = False;
+# else
+# error "Unsupported architecture"
+# endif
}
static void pc_pre_clo_init(void)
Modified: trunk/exp-ptrcheck/sg_main.c
===================================================================
--- trunk/exp-ptrcheck/sg_main.c 2008-10-20 22:27:52 UTC (rev 8685)
+++ trunk/exp-ptrcheck/sg_main.c 2008-10-20 23:33:49 UTC (rev 8686)
@@ -2107,6 +2107,9 @@
VexGuestLayout* layout,
IRType gWordTy, IRType hWordTy )
{
+ if (!sg_clo_enable_sg_checks)
+ return;
+
tl_assert(st);
tl_assert(isFlatIRStmt(st));
switch (st->tag) {
@@ -2212,6 +2215,9 @@
VexGuestLayout* layout,
IRType gWordTy, IRType hWordTy )
{
+ if (!sg_clo_enable_sg_checks)
+ return;
+
if (jumpkind == Ijk_Call) {
// Assumes x86 or amd64
IRTemp sp_post_call_insn, fp_post_call_insn;
|
|
From: Julian S. <js...@ac...> - 2008-10-20 23:03:14
|
> As I don't have that many machines available, if you have a PPC32/64, > or even an x86-64 or x86-32 I would love to receive the the regression > tests results for that machine, It's essentially impossible to make all the tests pass on any specific platform. Some tests require functionality which doesn't work so well on platforms different from x86/x86_64: * recognition/handling of atomic instructions and atomic instruction sequences * tracking function entry/exit (I think callgrind has difficulties on ppc). exp-ptrcheck too. * relating stack addresses to source level variables (memcheck/tests/varinfo*) Additionally the entire test suite is very sensitive to changes in glibc, since many of the backtraces it produces go into glibc. It is also sensitive to different gcc versions, since different gccs make different inlining decisions (particularly in glibc), and so that also affects the backtraces. I wish we had a test system that was more robust, but it's not obvious how to do that. I suggest you make tests work in the following order: none memcheck cachegrind massif and then maybe drd,callgrind The results below are what I get for a run on suse 11.0 (amd64). What this means is, for all the 469-11-3 tests that didn't fail, the results should match the .stdout.exp and at least one of the .stderr.exp* files, for each test. J == 469 tests, 11 stderr failures, 3 stdout failures, 1 post failure == memcheck/tests/file_locking (stderr) memcheck/tests/fprw (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_exit_group (stderr) memcheck/tests/x86/scalar_supp (stderr) massif/tests/overloaded-new (post) none/tests/cmdline2 (stdout) none/tests/mremap2 (stdout) none/tests/shell (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) |
|
From: <sv...@va...> - 2008-10-20 22:27:59
|
Author: sewardj
Date: 2008-10-20 23:27:52 +0100 (Mon, 20 Oct 2008)
New Revision: 8685
Log:
Futz with debug printing.
Modified:
trunk/exp-ptrcheck/sg_main.c
Modified: trunk/exp-ptrcheck/sg_main.c
===================================================================
--- trunk/exp-ptrcheck/sg_main.c 2008-10-20 22:24:31 UTC (rev 8684)
+++ trunk/exp-ptrcheck/sg_main.c 2008-10-20 22:27:52 UTC (rev 8685)
@@ -522,8 +522,9 @@
tl_assert(sitree);
if (debug) {
- VG_(printf)("\n");
+ VG_(printf)("\ndepth = %lu\n", depth);
pp_StackTree( sitree, "add_blocks_to_StackTree-pre" );
+ pp_StackBlocks(descrs);
}
for (i = 0; i < nDescrs; i++) {
|
|
From: <sv...@va...> - 2008-10-20 22:24:41
|
Author: sewardj
Date: 2008-10-20 23:24:31 +0100 (Mon, 20 Oct 2008)
New Revision: 8684
Log:
Change the default PIE load address from 0x100000 (1MB) to 0x108000,
to keep ppc32-linux happy.
Modified:
trunk/coregrind/m_ume.c
Modified: trunk/coregrind/m_ume.c
===================================================================
--- trunk/coregrind/m_ume.c 2008-10-20 16:08:55 UTC (rev 8683)
+++ trunk/coregrind/m_ume.c 2008-10-20 22:24:31 UTC (rev 8684)
@@ -362,8 +362,12 @@
become legit, which is really bad) and causes problems for
exp-ptrcheck, which assumes all numbers below 1MB are
nonpointers. So, hackily, move it above 1MB. */
- if (ebase < 0x100000)
- ebase = 0x100000;
+ /* Later .. is appears ppc32-linux tries to put [vdso] at 1MB,
+ which totally screws things up, because nothing else can go
+ there. So bump the hacky load addess along by 0x8000, to
+ 0x108000. */
+ if (ebase < 0x108000)
+ ebase = 0x108000;
}
info->phnum = e->e.e_phnum;
|
|
From: Bart V. A. <bar...@gm...> - 2008-10-20 18:10:18
|
On Mon, Oct 20, 2008 at 12:05 AM, Johan Björk <jb...@gm...> wrote: > I've been working quite a bit on the Valgrind port for ARM, and I am > at the stage where I pass most of the none/memcheck/massif/cache/call > regression tests. > > Is there any ongoing effort to try and update the test cases? I know > there is a request about this at the homepage, but I haven't seen if > anyone is actively working on it. There are indeed many false positives reported when running the Valgrind regression tests, especially on non-x86 platforms. I learned the following by reducing the number of false positives triggered by the DRD regression tests: * Instead of adding expected output variants, it is a lot better to modify the test itself and/or the output filter such that the output becomes platform independent. * Most of the times it is possible with a moderate effort to make a test platform independent. Sometimes this takes a significant effort. Bart. |
|
From: <sv...@va...> - 2008-10-20 16:09:05
|
Author: sewardj
Date: 2008-10-20 17:08:55 +0100 (Mon, 20 Oct 2008)
New Revision: 8683
Log:
Dwarf3 variable & type reader: use 64-bit numbers throughout to
represent the sizes of types, even on 32-bit hosts, where a type with
a size >= 2^32 is, well, if not meaningless, then at least impossible
to instantiate. This is of course motivated by reality .. on ppc32
SUSE11.0, the debuginfo for glibc-2.8 appears to contain a declaration
amounting to
char __EH_FRAME_BEGIN__ [4294967296]
Really.
Modified:
trunk/coregrind/m_debuginfo/d3basics.c
trunk/coregrind/m_debuginfo/debuginfo.c
trunk/coregrind/m_debuginfo/priv_misc.h
trunk/coregrind/m_debuginfo/priv_tytypes.h
trunk/coregrind/m_debuginfo/storage.c
trunk/coregrind/m_debuginfo/tytypes.c
Modified: trunk/coregrind/m_debuginfo/d3basics.c
===================================================================
--- trunk/coregrind/m_debuginfo/d3basics.c 2008-10-20 11:29:51 UTC (rev 8682)
+++ trunk/coregrind/m_debuginfo/d3basics.c 2008-10-20 16:08:55 UTC (rev 8683)
@@ -696,13 +696,13 @@
UChar uc;
UShort nbytes;
Word i, nGuards;
- MaybeUWord *muw, *muw2;
+ MaybeULong *mul, *mul2;
HChar* badness = NULL;
UChar* p = &gx->payload[0];
XArray* results = VG_(newXA)( ML_(dinfo_zalloc), "di.d3basics.etG.1",
ML_(dinfo_free),
- sizeof(MaybeUWord) );
+ sizeof(MaybeULong) );
uc = *p++; /*biasMe*/
vg_assert(uc == 0 || uc == 1);
@@ -712,7 +712,7 @@
nGuards = 0;
while (True) {
- MaybeUWord thisResult;
+ MaybeULong thisResult;
uc = *p++;
if (uc == 1) /*isEnd*/
break;
@@ -724,14 +724,14 @@
if (0) VG_(printf)(" guard %ld: %#lx %#lx\n",
nGuards, aMin,aMax);
- thisResult.b = False;
- thisResult.w = 0;
+ thisResult.b = False;
+ thisResult.ul = 0;
/* Peer at this particular subexpression, to see if it's
obviously a constant. */
if (nbytes == 1 + sizeof(Addr) && *p == DW_OP_addr) {
- thisResult.b = True;
- thisResult.w = *(Addr*)(p+1) + data_bias;
+ thisResult.b = True;
+ thisResult.ul = (ULong)(*(Addr*)(p+1)) + (ULong)data_bias;
}
else if (nbytes == 2 + sizeof(Addr)
&& *p == DW_OP_addr
@@ -779,8 +779,8 @@
}
for (i = 0; i < nGuards; i++) {
- muw = VG_(indexXA)( results, i );
- if (muw->b == False)
+ mul = VG_(indexXA)( results, i );
+ if (mul->b == False)
break;
}
@@ -795,13 +795,13 @@
/* All the subexpressions produced a constant, but did they all produce
the same one? */
- muw = VG_(indexXA)( results, 0 );
- tl_assert(muw->b == True); /* we just established that all exprs are ok */
+ mul = VG_(indexXA)( results, 0 );
+ tl_assert(mul->b == True); /* we just established that all exprs are ok */
for (i = 1; i < nGuards; i++) {
- muw2 = VG_(indexXA)( results, i );
- tl_assert(muw2->b == True);
- if (muw2->w != muw->w) {
+ mul2 = VG_(indexXA)( results, i );
+ tl_assert(mul2->b == True);
+ if (mul2->ul != mul->ul) {
res.word = (UWord)"trivial GExpr: subexpressions disagree";
VG_(deleteXA)( results );
return res;
@@ -811,7 +811,7 @@
/* Well, we have success. All subexpressions evaluated, and
they all agree. Hurrah. */
res.kind = GXR_Value;
- res.word = muw->w;
+ res.word = (UWord)mul->ul; /* NB: narrowing from ULong */
VG_(deleteXA)( results );
return res;
}
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c 2008-10-20 11:29:51 UTC (rev 8682)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2008-10-20 16:08:55 UTC (rev 8683)
@@ -1714,7 +1714,7 @@
Addr data_addr,
Addr data_bias )
{
- MaybeUWord muw;
+ MaybeULong mul;
SizeT var_szB;
GXResult res;
Bool show = False;
@@ -1723,12 +1723,17 @@
vg_assert(var->gexpr);
/* Figure out how big the variable is. */
- muw = ML_(sizeOfType)(tyents, var->typeR);
- /* if this var has a type whose size is unknown, it should never
- have been added. ML_(addVar) should have rejected it. */
- vg_assert(muw.b == True);
+ mul = ML_(sizeOfType)(tyents, var->typeR);
+ /* If this var has a type whose size is unknown, zero, or
+ impossibly large, it should never have been added. ML_(addVar)
+ should have rejected it. */
+ vg_assert(mul.b == True);
+ vg_assert(mul.ul > 0);
+ if (sizeof(void*) == 4) vg_assert(mul.ul < (1ULL << 32));
+ /* After this point, we assume we can truncate mul.ul to a host word
+ safely (without loss of info). */
- var_szB = muw.w;
+ var_szB = (SizeT)mul.ul; /* NB: truncate to host word */
if (show) {
VG_(printf)("VVVV: data_address_%#lx_is_in_var: %s :: ",
@@ -2264,7 +2269,7 @@
{
GXResult res_sp_6k, res_sp_7k, res_fp_6k, res_fp_7k;
RegSummary regs;
- MaybeUWord muw;
+ MaybeULong mul;
Bool isVec;
TyEnt* ty;
@@ -2273,11 +2278,15 @@
VG_(printf)("adeps: var %s\n", var->name );
/* Figure out how big the variable is. */
- muw = ML_(sizeOfType)(tyents, var->typeR);
- /* if this var has a type whose size is unknown or zero, it should
- never have been added. ML_(addVar) should have rejected it. */
- vg_assert(muw.b == True);
- vg_assert(muw.w > 0);
+ mul = ML_(sizeOfType)(tyents, var->typeR);
+ /* If this var has a type whose size is unknown, zero, or
+ impossibly large, it should never have been added. ML_(addVar)
+ should have rejected it. */
+ vg_assert(mul.b == True);
+ vg_assert(mul.ul > 0);
+ if (sizeof(void*) == 4) vg_assert(mul.ul < (1ULL << 32));
+ /* After this point, we assume we can truncate mul.ul to a host word
+ safely (without loss of info). */
/* skip if non-array and we're only interested in arrays */
ty = ML_(TyEnts__index_by_cuOff)( tyents, NULL, var->typeR );
@@ -2341,9 +2350,9 @@
tl_assert(res.kind == GXR_Value);
if (debug)
VG_(printf)(" %5ld .. %5ld (sp) %s\n",
- res.word, res.word + muw.w - 1, var->name);
+ res.word, res.word + ((UWord)mul.ul) - 1, var->name);
block.base = res.word;
- block.szB = muw.w;
+ block.szB = (SizeT)mul.ul;
block.spRel = True;
block.isVec = isVec;
VG_(memset)( &block.name[0], 0, sizeof(block.name) );
@@ -2360,9 +2369,9 @@
tl_assert(res.kind == GXR_Value);
if (debug)
VG_(printf)(" %5ld .. %5ld (FP) %s\n",
- res.word, res.word + muw.w - 1, var->name);
+ res.word, res.word + ((UWord)mul.ul) - 1, var->name);
block.base = res.word;
- block.szB = muw.w;
+ block.szB = (SizeT)mul.ul;
block.spRel = False;
block.isVec = isVec;
VG_(memset)( &block.name[0], 0, sizeof(block.name) );
@@ -2555,7 +2564,7 @@
Bool isVec;
GXResult res;
- MaybeUWord muw;
+ MaybeULong mul;
GlobalBlock gb;
TyEnt* ty;
DiVariable* var = VG_(indexXA)( range->vars, varIx );
@@ -2582,13 +2591,16 @@
if (0) VG_(printf)("%#lx\n", res.word);
/* Figure out how big the variable is. */
- muw = ML_(sizeOfType)(di->admin_tyents, var->typeR);
+ mul = ML_(sizeOfType)(di->admin_tyents, var->typeR);
- /* if this var has a type whose size is unknown or zero,
- it should never have been added. ML_(addVar) should
- have rejected it. */
- vg_assert(muw.b == True);
- vg_assert(muw.w > 0);
+ /* If this var has a type whose size is unknown, zero, or
+ impossibly large, it should never have been added.
+ ML_(addVar) should have rejected it. */
+ vg_assert(mul.b == True);
+ vg_assert(mul.ul > 0);
+ if (sizeof(void*) == 4) vg_assert(mul.ul < (1ULL << 32));
+ /* After this point, we assume we can truncate mul.ul to a
+ host word safely (without loss of info). */
/* skip if non-array and we're only interested in
arrays */
@@ -2610,7 +2622,7 @@
:"??",var->lineNo);
VG_(memset)(&gb, 0, sizeof(gb));
gb.addr = res.word;
- gb.szB = muw.w;
+ gb.szB = (SizeT)mul.ul;
gb.isVec = isVec;
VG_(strncpy)(&gb.name[0], var->name, sizeof(gb.name)-1);
VG_(strncpy)(&gb.soname[0], di->soname, sizeof(gb.soname)-1);
Modified: trunk/coregrind/m_debuginfo/priv_misc.h
===================================================================
--- trunk/coregrind/m_debuginfo/priv_misc.h 2008-10-20 11:29:51 UTC (rev 8682)
+++ trunk/coregrind/m_debuginfo/priv_misc.h 2008-10-20 16:08:55 UTC (rev 8683)
@@ -45,7 +45,7 @@
/* A handy type, a la Haskell's Maybe type. Yes, I know, C sucks.
Been there. Done that. Seen the movie. Got the T-shirt. Etc. */
-typedef struct { UWord w; Bool b; } MaybeUWord;
+typedef struct { ULong ul; Bool b; } MaybeULong;
#endif /* ndef __PRIV_MISC_H */
Modified: trunk/coregrind/m_debuginfo/priv_tytypes.h
===================================================================
--- trunk/coregrind/m_debuginfo/priv_tytypes.h 2008-10-20 11:29:51 UTC (rev 8682)
+++ trunk/coregrind/m_debuginfo/priv_tytypes.h 2008-10-20 16:08:55 UTC (rev 8683)
@@ -160,7 +160,7 @@
/* How big is this type? If .b in the returned struct is False, the
size is unknown. */
-MaybeUWord ML_(sizeOfType)( XArray* /* of TyEnt */ tyents,
+MaybeULong ML_(sizeOfType)( XArray* /* of TyEnt */ tyents,
UWord cuOff );
/* Describe where in the type 'offset' falls. Caller must
Modified: trunk/coregrind/m_debuginfo/storage.c
===================================================================
--- trunk/coregrind/m_debuginfo/storage.c 2008-10-20 11:29:51 UTC (rev 8682)
+++ trunk/coregrind/m_debuginfo/storage.c 2008-10-20 16:08:55 UTC (rev 8683)
@@ -726,6 +726,8 @@
DiVariable var;
Bool all;
TyEnt* ent;
+ MaybeULong mul;
+ HChar* badness;
tl_assert(di && di->admin_tyents);
@@ -789,14 +791,23 @@
/* If the type's size is zero (which can mean unknown size), ignore
it. We will never be able to actually relate a data address to
a data object with zero size, so there's no point in storing
- info on it. */
- if (ML_(sizeOfType)(di->admin_tyents, typeR).b != True) {
+ info on it. On 32-bit platforms, also reject types whose size
+ is 2^32 bytes or large. (It's amazing what junk shows up ..) */
+ mul = ML_(sizeOfType)(di->admin_tyents, typeR);
+
+ badness = NULL;
+ if (mul.b != True)
+ badness = "unknown size";
+ else if (mul.ul == 0)
+ badness = "zero size ";
+ else if (sizeof(void*) == 4 && mul.ul >= (1ULL<<32))
+ badness = "implausibly large";
+
+ if (badness) {
static Int complaints = 10;
if (VG_(clo_verbosity) >= 2 && complaints > 0) {
- VG_(message)(Vg_DebugMsg,
- "warning: addVar: unknown size (%s)",
- name
- );
+ VG_(message)(Vg_DebugMsg, "warning: addVar: %s (%s)",
+ badness, name );
complaints--;
}
return;
Modified: trunk/coregrind/m_debuginfo/tytypes.c
===================================================================
--- trunk/coregrind/m_debuginfo/tytypes.c 2008-10-20 11:29:51 UTC (rev 8682)
+++ trunk/coregrind/m_debuginfo/tytypes.c 2008-10-20 16:08:55 UTC (rev 8683)
@@ -239,10 +239,10 @@
VG_(printf)("enum %s", ent->Te.TyEnum.name);
break;
case Te_TyStOrUn:
- if (!ent->Te.TyStOrUn.name) goto unhandled;
VG_(printf)("%s %s",
ent->Te.TyStOrUn.isStruct ? "struct" : "union",
- ent->Te.TyStOrUn.name);
+ ent->Te.TyStOrUn.name ? ent->Te.TyStOrUn.name
+ : (UChar*)"<anonymous>" );
break;
case Te_TyArray:
ML_(pp_TyEnt_C_ishly)(tyents, ent->Te.TyArray.typeR);
@@ -275,6 +275,9 @@
VG_(printf)("%svoid",
ent->Te.TyVoid.isFake ? "fake" : "");
break;
+ case Te_UNKNOWN:
+ ML_(pp_TyEnt)(ent);
+ break;
default:
goto unhandled;
}
@@ -604,30 +607,30 @@
/* How big is this type? If .b in the returned struct is False, the
size is unknown. */
-static MaybeUWord mk_MaybeUWord_Nothing ( void ) {
- MaybeUWord muw;
- muw.w = 0;
- muw.b = False;
- return muw;
+static MaybeULong mk_MaybeULong_Nothing ( void ) {
+ MaybeULong mul;
+ mul.ul = 0;
+ mul.b = False;
+ return mul;
}
-static MaybeUWord mk_MaybeUWord_Just ( UWord w ) {
- MaybeUWord muw;
- muw.w = w;
- muw.b = True;
- return muw;
+static MaybeULong mk_MaybeULong_Just ( ULong ul ) {
+ MaybeULong mul;
+ mul.ul = ul;
+ mul.b = True;
+ return mul;
}
-static MaybeUWord mul_MaybeUWord ( MaybeUWord muw1, MaybeUWord muw2 ) {
- if (!muw1.b) { vg_assert(muw1.w == 0); return muw1; }
- if (!muw2.b) { vg_assert(muw2.w == 0); return muw2; }
- muw1.w *= muw2.w;
- return muw1;
+static MaybeULong mul_MaybeULong ( MaybeULong mul1, MaybeULong mul2 ) {
+ if (!mul1.b) { vg_assert(mul1.ul == 0); return mul1; }
+ if (!mul2.b) { vg_assert(mul2.ul == 0); return mul2; }
+ mul1.ul *= mul2.ul;
+ return mul1;
}
-MaybeUWord ML_(sizeOfType)( XArray* /* of TyEnt */ tyents,
+MaybeULong ML_(sizeOfType)( XArray* /* of TyEnt */ tyents,
UWord cuOff )
{
Word i;
- MaybeUWord eszB;
+ MaybeULong eszB;
TyEnt* ent = ML_(TyEnts__index_by_cuOff)(tyents, NULL, cuOff);
TyEnt* ent2;
vg_assert(ent);
@@ -635,7 +638,7 @@
switch (ent->tag) {
case Te_TyBase:
vg_assert(ent->Te.TyBase.szB > 0);
- return mk_MaybeUWord_Just( ent->Te.TyBase.szB );
+ return mk_MaybeULong_Just( ent->Te.TyBase.szB );
case Te_TyQual:
return ML_(sizeOfType)( tyents, ent->Te.TyQual.typeR );
case Te_TyTyDef:
@@ -643,23 +646,23 @@
ent->Te.TyTyDef.typeR);
vg_assert(ent2);
if (ent2->tag == Te_UNKNOWN)
- return mk_MaybeUWord_Nothing(); /*UNKNOWN*/
+ return mk_MaybeULong_Nothing(); /*UNKNOWN*/
return ML_(sizeOfType)( tyents, ent->Te.TyTyDef.typeR );
case Te_TyPorR:
vg_assert(ent->Te.TyPorR.szB == 4 || ent->Te.TyPorR.szB == 8);
- return mk_MaybeUWord_Just( ent->Te.TyPorR.szB );
+ return mk_MaybeULong_Just( ent->Te.TyPorR.szB );
case Te_TyStOrUn:
return ent->Te.TyStOrUn.complete
- ? mk_MaybeUWord_Just( ent->Te.TyStOrUn.szB )
- : mk_MaybeUWord_Nothing();
+ ? mk_MaybeULong_Just( ent->Te.TyStOrUn.szB )
+ : mk_MaybeULong_Nothing();
case Te_TyEnum:
- return mk_MaybeUWord_Just( ent->Te.TyEnum.szB );
+ return mk_MaybeULong_Just( ent->Te.TyEnum.szB );
case Te_TyArray:
ent2 = ML_(TyEnts__index_by_cuOff)(tyents, NULL,
ent->Te.TyArray.typeR);
vg_assert(ent2);
if (ent2->tag == Te_UNKNOWN)
- return mk_MaybeUWord_Nothing(); /*UNKNOWN*/
+ return mk_MaybeULong_Nothing(); /*UNKNOWN*/
eszB = ML_(sizeOfType)( tyents, ent->Te.TyArray.typeR );
for (i = 0; i < VG_(sizeXA)( ent->Te.TyArray.boundRs ); i++) {
UWord bo_cuOff
@@ -669,11 +672,11 @@
vg_assert(bo);
vg_assert(bo->tag == Te_Bound);
if (!(bo->Te.Bound.knownL && bo->Te.Bound.knownU))
- return mk_MaybeUWord_Nothing(); /*UNKNOWN*/
- eszB = mul_MaybeUWord(
+ return mk_MaybeULong_Nothing(); /*UNKNOWN*/
+ eszB = mul_MaybeULong(
eszB,
- mk_MaybeUWord_Just( bo->Te.Bound.boundU
- - bo->Te.Bound.boundL + 1 ));
+ mk_MaybeULong_Just( (ULong)(bo->Te.Bound.boundU
+ - bo->Te.Bound.boundL + 1) ));
}
return eszB;
default:
@@ -727,7 +730,7 @@
case Te_TyStOrUn: {
Word i;
GXResult res;
- MaybeUWord muw;
+ MaybeULong mul;
XArray* fieldRs;
UWord fieldR;
TyEnt* field = NULL;
@@ -761,11 +764,11 @@
}
if (res.kind != GXR_Value)
continue;
- muw = ML_(sizeOfType)( tyents, field->Te.Field.typeR );
- if (muw.b != True)
+ mul = ML_(sizeOfType)( tyents, field->Te.Field.typeR );
+ if (mul.b != True)
goto done; /* size of field is unknown (?!) */
offMin = res.word;
- offMax1 = offMin + muw.w;
+ offMax1 = offMin + (OffT)mul.ul;
if (offMin == offMax1)
continue;
vg_assert(offMin < offMax1);
@@ -792,7 +795,7 @@
}
case Te_TyArray: {
- MaybeUWord muw;
+ MaybeULong mul;
UWord size, eszB, ix;
UWord boundR;
TyEnt* elemTy;
@@ -817,10 +820,10 @@
goto done;
size = bound->Te.Bound.boundU - bound->Te.Bound.boundL + 1;
vg_assert(size >= 1);
- muw = ML_(sizeOfType)( tyents, ty->Te.TyArray.typeR );
- if (muw.b != True)
+ mul = ML_(sizeOfType)( tyents, ty->Te.TyArray.typeR );
+ if (mul.b != True)
goto done; /* size of element type not known */
- eszB = muw.w;
+ eszB = mul.ul;
if (eszB == 0) goto done;
ix = offset / eszB;
VG_(addBytesToXA)( xa, "[", 1 );
|
|
From: <sv...@va...> - 2008-10-20 11:30:04
|
Author: sewardj
Date: 2008-10-20 12:29:51 +0100 (Mon, 20 Oct 2008)
New Revision: 8682
Log:
Adjust line spacing following r8645, so that .stderr output is
as expected once again.
Modified:
trunk/exp-ptrcheck/tests/ccc.cpp
Modified: trunk/exp-ptrcheck/tests/ccc.cpp
===================================================================
--- trunk/exp-ptrcheck/tests/ccc.cpp 2008-10-20 11:14:50 UTC (rev 8681)
+++ trunk/exp-ptrcheck/tests/ccc.cpp 2008-10-20 11:29:51 UTC (rev 8682)
@@ -1,15 +1,10 @@
#define _XOPEN_SOURCE 600 // to enable posix_memalign()
-
-
#include <assert.h>
#include <stdlib.h>
#include <malloc.h> // for memalign()
-
-
static __attribute__((noinline)) void bar ( int ); /* fwds */
-int main(void)
-{
- int y1, y2, y3, y4, y5, y6, sum = 0;
+int main(void) {
+ int sum = 0;
int* x1 = (int*)malloc(sizeof(int));
int* x2 = new int;
int* x3 = new int[10];
@@ -17,9 +12,9 @@
int* x5 = (int*)memalign(8, sizeof(int));
int* x6; void* v6;
int res = posix_memalign(&v6, 8, sizeof(int)); x6 = (int*)v6;
-
assert(NULL != x1 && NULL != x2 && NULL != x3 && NULL != x4 &&
NULL != x5 && 0 == res);
+
__asm__ __volatile__("":::"memory");
// all underruns
sum += x1[-1]; __asm__ __volatile__("":::"memory"); bar(1);
|
|
From: <sv...@va...> - 2008-10-20 11:14:58
|
Author: sewardj
Date: 2008-10-20 12:14:50 +0100 (Mon, 20 Oct 2008)
New Revision: 8681
Log:
Add a not very good test pertaining to the preening of global Invars
upon unmapping of a shared object, in sg_main.c.
Added:
trunk/exp-ptrcheck/tests/preen_invars.c
trunk/exp-ptrcheck/tests/preen_invars.stderr.exp-glibc28-amd64
trunk/exp-ptrcheck/tests/preen_invars.stdout.exp
trunk/exp-ptrcheck/tests/preen_invars.vgtest
trunk/exp-ptrcheck/tests/preen_invars_so.c
Modified:
trunk/exp-ptrcheck/tests/Makefile.am
Modified: trunk/exp-ptrcheck/tests/Makefile.am
===================================================================
--- trunk/exp-ptrcheck/tests/Makefile.am 2008-10-20 10:30:08 UTC (rev 8680)
+++ trunk/exp-ptrcheck/tests/Makefile.am 2008-10-20 11:14:50 UTC (rev 8681)
@@ -54,6 +54,8 @@
partial_good.vgtest \
partial_good.stderr.exp-glibc25-x86 \
partial_good.stderr.exp-glibc25-amd64 \
+ preen_invars.vgtest preen_invars.stdout.exp \
+ preen_invars.stderr.exp-glibc28-amd64 \
pth_create.vgtest pth_create.stderr.exp \
pth_specific.vgtest pth_specific.stderr.exp \
realloc.vgtest \
@@ -78,7 +80,9 @@
add and arith bad_percentify base ccc cmp fp \
globalerr hackedbz2 \
hp_bounds hp_dangle idiv imul \
- justify mm not neg or partial pth_create pth_specific realloc \
+ justify mm not neg or partial \
+ preen_invars preen_invars_so.so \
+ pth_create pth_specific realloc \
stackerr \
strcpy strlen sub supp syscall tricky unaligned xor zero
@@ -130,3 +134,37 @@
# C++ ones
ccc_SOURCES = ccc.cpp
+
+# Build shared object for preen_invars
+preen_invars_SOURCES = preen_invars.c
+preen_invars_DEPENDENCIES = preen_invars_so.so
+if VGP_PPC64_AIX5
+ preen_invars_LDADD = -ldl
+ preen_invars_LDFLAGS = $(AM_FLAG_M3264_PRI)
+else
+if VGP_PPC32_AIX5
+ preen_invars_LDADD = -ldl
+ preen_invars_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+else
+ preen_invars_LDADD = -ldl
+ preen_invars_LDFLAGS = $(AM_FLAG_M3264_PRI) \
+ -Wl,-rpath,$(top_builddir)/memcheck/tests
+endif
+endif
+
+preen_invars_so_so_SOURCES = preen_invars_so.c
+preen_invars_so_so_LDADD =
+preen_invars_so_so_DEPENDENCIES =
+preen_invars_so_so_CFLAGS = -fpic $(AM_FLAG_M3264_PRI) -g
+if VGP_PPC64_AIX5
+ preen_invars_so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
+else
+if VGP_PPC32_AIX5
+ preen_invars_so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
+ -Wl,-G -Wl,-bnogc
+else
+ preen_invars_so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
+ -Wl,-soname -Wl,preen_invars_so.so
+endif
+endif
+
Added: trunk/exp-ptrcheck/tests/preen_invars.c
===================================================================
--- trunk/exp-ptrcheck/tests/preen_invars.c (rev 0)
+++ trunk/exp-ptrcheck/tests/preen_invars.c 2008-10-20 11:14:50 UTC (rev 8681)
@@ -0,0 +1,52 @@
+
+#include <stdio.h>
+#include <assert.h>
+#include <dlfcn.h>
+
+/* see comments in preen_invar_so.c for explanation of this */
+
+
+int main ( void )
+{
+ int i, r, sum = 0;
+ char* im_a_global_array;
+ void* hdl = dlopen("./preen_invars_so.so", RTLD_NOW);
+ assert(hdl);
+ im_a_global_array = dlsym(hdl, "im_a_global_array");
+ assert(im_a_global_array);
+ /* printf("%p %p\n", im_a_global_array, me_too_me_too); */
+
+ /* poke around in the global array, so as to cause exp-ptrcheck
+ to generate an Inv_Global invar for it. */
+ for (i = 10/*ERROR*/; i >= 0; i--) {
+ sum += im_a_global_array[i];
+ }
+ /* iterating 10 .. 0 causes an Unknown->Global transition at i = 9.
+ We do it this way in order that at the end of a loop, there is a
+ Global invar in place for the memory read in the loop, so that
+ the subsequent dlclose (hence munmap) causes it to get preened.
+
+ Unfortunately there's nothing to show that the preen was
+ successful or happened at all. The only way to see is from the
+ -v output:
+
+ --686-- sg_: 251 Invars preened, of which 1 changed
+
+ It's the "1 changed" bit which is significant.
+ */
+
+ /* let's hope gcc is not clever enough to optimise this away, since
+ if it does, then it will also nuke the preceding loop, and
+ thereby render this test program useless. */
+
+ if (sum & 1) printf("%s bar %d\n", "foo", sum & 1); else
+ printf("foo %s %d\n", "bar", 1 - (sum & 1));
+
+ /* Now close (== unmap) the array, so that exp-ptrcheck has to check
+ its collection of Inv_Global invars, and remove this one from
+ it. */
+ r = dlclose(hdl);
+ assert(r == 0);
+
+ return 0;
+}
Added: trunk/exp-ptrcheck/tests/preen_invars.stderr.exp-glibc28-amd64
===================================================================
--- trunk/exp-ptrcheck/tests/preen_invars.stderr.exp-glibc28-amd64 (rev 0)
+++ trunk/exp-ptrcheck/tests/preen_invars.stderr.exp-glibc28-amd64 2008-10-20 11:14:50 UTC (rev 8681)
@@ -0,0 +1,8 @@
+
+Invalid read of size 1
+ at 0x........: main (preen_invars.c:22)
+ Address 0x........ expected vs actual:
+ Expected: unknown
+ Actual: global array "im_a_global_arr" in object with soname "preen_invars_so"
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Added: trunk/exp-ptrcheck/tests/preen_invars.stdout.exp
===================================================================
--- trunk/exp-ptrcheck/tests/preen_invars.stdout.exp (rev 0)
+++ trunk/exp-ptrcheck/tests/preen_invars.stdout.exp 2008-10-20 11:14:50 UTC (rev 8681)
@@ -0,0 +1 @@
+foo bar 1
Added: trunk/exp-ptrcheck/tests/preen_invars.vgtest
===================================================================
--- trunk/exp-ptrcheck/tests/preen_invars.vgtest (rev 0)
+++ trunk/exp-ptrcheck/tests/preen_invars.vgtest 2008-10-20 11:14:50 UTC (rev 8681)
@@ -0,0 +1 @@
+prog: preen_invars
Added: trunk/exp-ptrcheck/tests/preen_invars_so.c
===================================================================
--- trunk/exp-ptrcheck/tests/preen_invars_so.c (rev 0)
+++ trunk/exp-ptrcheck/tests/preen_invars_so.c 2008-10-20 11:14:50 UTC (rev 8681)
@@ -0,0 +1,12 @@
+
+/* This file contains a global array. It is compiled into a .so,
+ which is dlopened by preen_invar.c. That then accesses the global
+ array, hence generating Inv_Global invariants in sg_main.c.
+
+ preen_invar.c then dlcloses this object, causing it to get
+ unmapped; and we then need to be sure that the Inv_Global is
+ removed by preen_Invars (or, at least, that the system doesn't
+ crash..). */
+
+char im_a_global_array[10];
+
|
|
From: <sv...@va...> - 2008-10-20 10:30:13
|
Author: sewardj
Date: 2008-10-20 11:30:08 +0100 (Mon, 20 Oct 2008)
New Revision: 8680
Log:
Support a couple more syscalls needed for running KDE4 stuff on amd64-linux.
Modified:
trunk/exp-ptrcheck/h_main.c
Modified: trunk/exp-ptrcheck/h_main.c
===================================================================
--- trunk/exp-ptrcheck/h_main.c 2008-10-20 10:25:16 UTC (rev 8679)
+++ trunk/exp-ptrcheck/h_main.c 2008-10-20 10:30:08 UTC (rev 8680)
@@ -255,8 +255,6 @@
static ULong stats__client_frees = 0;
static ULong stats__segs_allocd = 0;
static ULong stats__segs_recycled = 0;
-static ULong stats__slow_searches = 0;
-static ULong stats__slow_totcmps = 0;
//////////////////////////////////////////////////////////////
@@ -2253,7 +2251,9 @@
ADD(0, __NR_getuid32);
# endif
ADD(0, __NR_getxattr);
+ ADD(0, __NR_inotify_add_watch);
ADD(0, __NR_inotify_init);
+ ADD(0, __NR_inotify_rm_watch);
ADD(0, __NR_ioctl); // ioctl -- assuming no pointers returned
ADD(0, __NR_kill);
ADD(0, __NR_link);
@@ -2269,6 +2269,7 @@
ADD(0, __NR_mkdir);
ADD(0, __NR_mprotect);
ADD(0, __NR_munmap); // die_mem_munmap already called, segment remove);
+ ADD(0, __NR_nanosleep);
ADD(0, __NR_open);
ADD(0, __NR_pipe);
ADD(0, __NR_poll);
@@ -2290,6 +2291,7 @@
ADD(0, __NR_rt_sigreturn); /* not sure if we should see this or not */
ADD(0, __NR_sched_get_priority_max);
ADD(0, __NR_sched_get_priority_min);
+ ADD(0, __NR_sched_getaffinity);
ADD(0, __NR_sched_getparam);
ADD(0, __NR_sched_getscheduler);
ADD(0, __NR_sched_setscheduler);
@@ -4728,10 +4730,6 @@
VG_(message)(Vg_DebugMsg,
" h_: %'10llu Segs allocd, %'10llu Segs recycled",
stats__segs_allocd, stats__segs_recycled);
- VG_(message)(Vg_DebugMsg,
- " h_: %'10llu slow searches, %'10llu total cmps",
- stats__slow_searches, stats__slow_totcmps);
-
}
if (h_clo_lossage_check) {
|
|
From: <sv...@va...> - 2008-10-20 10:25:28
|
Author: sewardj
Date: 2008-10-20 11:25:16 +0100 (Mon, 20 Oct 2008)
New Revision: 8679
Log:
Re-enable preening of global invariants. (This happens when a .so is
unmapped, and that .so contains global variables that were accessed
while it was mapped in.)
Modified:
trunk/exp-ptrcheck/sg_main.c
Modified: trunk/exp-ptrcheck/sg_main.c
===================================================================
--- trunk/exp-ptrcheck/sg_main.c 2008-10-20 10:23:46 UTC (rev 8678)
+++ trunk/exp-ptrcheck/sg_main.c 2008-10-20 10:25:16 UTC (rev 8679)
@@ -54,7 +54,7 @@
static
-void preen_Invars ( Addr a, SizeT len, Bool isHeap ); /*fwds*/
+void preen_global_Invars ( Addr a, SizeT len ); /*fwds*/
//////////////////////////////////////////////////////////////
@@ -1067,10 +1067,10 @@
/* Ok, the range contained some blocks. Therefore we'll need to
visit all the Invars in all the thread shadow stacks, and
- convert all Inv_Global{S,V} entries that intersect [a,a+len) to
+ convert all Inv_Global entries that intersect [a,a+len) to
Inv_Unknown. */
tl_assert(len > 0);
- preen_Invars( a, len, False/*!isHeap*/ );
+ preen_global_Invars( a, len );
invalidate_all_QCaches();
}
@@ -1161,73 +1161,70 @@
instead. */
__attribute__((noinline))
-static void preen_Invar ( Invar* inv, Addr a, SizeT len, Bool isHeap )
+static void preen_global_Invar ( Invar* inv, Addr a, SizeT len )
{
stats__Invars_preened++;
tl_assert(len > 0);
tl_assert(inv);
switch (inv->tag) {
-#if 0
- case Inv_Heap:
- tl_assert(inv->Inv.Heap.len > 0);
- if (isHeap && rangesOverlap(a, len, inv->Inv.Heap.start,
- inv->Inv.Heap.len)) {
+ case Inv_Global:
+ tl_assert(inv->Inv.Global.nd);
+ tl_assert(inv->Inv.Global.nd->szB > 0);
+ if (0) VG_(printf)("preen_Invar Global %#lx %lu\n",
+ inv->Inv.Global.nd->addr,
+ inv->Inv.Global.nd->szB);
+ if (0 == cmp_nonempty_intervals(a, len, inv->Inv.Global.nd->addr,
+ inv->Inv.Global.nd->szB)) {
inv->tag = Inv_Unknown;
stats__Invars_changed++;
}
break;
- case Inv_GlobalS:
- case Inv_GlobalV:
- tl_assert(inv->Inv.Global.len > 0);
- if ((!isHeap)
- && rangesOverlap(a, len, inv->Inv.Global.start,
- inv->Inv.Global.len)) {
- inv->tag = Inv_Unknown;
- stats__Invars_changed++;
- }
- break;
- case Inv_StackS:
- case Inv_StackV:
+ case Inv_Stack0:
+ case Inv_StackN:
case Inv_Unknown:
break;
-#endif
- default: tl_assert(0);
+ default:
+ tl_assert(0);
}
}
__attribute__((noinline))
-static void preen_Invars ( Addr a, SizeT len, Bool isHeap )
+static void preen_global_Invars ( Addr a, SizeT len )
{
- tl_assert(0);
-#if 0
Int i;
- Word ixFrames, nFrames;
UWord u;
- XArray* stack; /* XArray* of StackFrame */
StackFrame* frame;
tl_assert(len > 0);
- tl_assert(0);
for (i = 0; i < VG_N_THREADS; i++) {
-tl_assert(0);
- stack = shadowStacks[i];
- if (!stack)
- continue;
- nFrames = VG_(sizeXA)( stack );
- for (ixFrames = 0; ixFrames < nFrames; ixFrames++) {
+ frame = shadowStacks[i];
+ if (!frame)
+ continue; /* no frames for this thread */
+ /* start from the innermost frame */
+ while (frame->inner)
+ frame = frame->inner;
+ tl_assert(frame->outer);
+ /* work through the frames from innermost to outermost. The
+ order isn't important; we just need to ensure we visit each
+ frame once (including those which are not actually active,
+ more 'inner' than the 'innermost active frame', viz, just
+ hanging around waiting to be used, when the current innermost
+ active frame makes more calls. See comments on definition of
+ struct _StackFrame. */
+ for (; frame; frame = frame->outer) {
UWord xx = 0; /* sanity check only; count of used htab entries */
- frame = VG_(indexXA)( stack, ixFrames );
- tl_assert(frame->htab);
+ if (!frame->htab)
+ continue; /* frame not in use. See shadowStack_unwind(). */
for (u = 0; u < frame->htab_size; u++) {
IInstance* ii = &frame->htab[u];
if (ii->insn_addr == 0)
continue; /* not in use */
- preen_Invar( &ii->invar, a, len, isHeap );
+ if (0) { pp_Invar(&ii->invar); VG_(printf)(" x\n"); }
+ preen_global_Invar( &ii->invar, a, len );
xx++;
}
tl_assert(xx == frame->htab_used);
}
}
-#endif
}
|
|
From: <sv...@va...> - 2008-10-20 10:24:00
|
Author: sewardj
Date: 2008-10-20 11:23:46 +0100 (Mon, 20 Oct 2008)
New Revision: 8678
Log:
Set average translation size plausibly, so as to avoid excessive
retranslations caused by the default size.
Modified:
trunk/exp-ptrcheck/pc_main.c
Modified: trunk/exp-ptrcheck/pc_main.c
===================================================================
--- trunk/exp-ptrcheck/pc_main.c 2008-10-19 18:58:13 UTC (rev 8677)
+++ trunk/exp-ptrcheck/pc_main.c 2008-10-20 10:23:46 UTC (rev 8678)
@@ -136,6 +136,7 @@
VG_(details_copyright_author)(
"Copyright (C) 2003-2008, and GNU GPL'd, by OpenWorks Ltd et al.");
VG_(details_bug_reports_to) (VG_BUGS_TO);
+ VG_(details_avg_translation_sizeB) ( 496 );
VG_(basic_tool_funcs) (pc_post_clo_init,
h_instrument,
|
|
From: Tom H. <th...@cy...> - 2008-10-20 03:27:30
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2008-10-20 03:15:03 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 == 366 tests, 80 stderr failures, 2 stdout failures, 29 post failures == exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (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/hg06_readshared (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc02_simple_tls (stderr) helgrind/tests/tc03_re_excl (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc07_hbl1 (stderr) helgrind/tests/tc08_hbl2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (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) helgrind/tests/tc24_nonzero_sem (stderr) massif/tests/alloc-fns-A (post) massif/tests/alloc-fns-B (post) massif/tests/basic (post) massif/tests/basic2 (post) massif/tests/big-alloc (post) massif/tests/culling1 (stderr) massif/tests/culling2 (stderr) massif/tests/custom_alloc (post) massif/tests/deep-A (post) massif/tests/deep-B (stderr) massif/tests/deep-B (post) massif/tests/deep-C (stderr) massif/tests/deep-C (post) massif/tests/deep-D (post) massif/tests/ignoring (post) massif/tests/insig (post) massif/tests/long-names (post) massif/tests/long-time (post) massif/tests/new-cpp (post) massif/tests/null (post) massif/tests/one (post) massif/tests/overloaded-new (post) massif/tests/peak (post) massif/tests/peak2 (stderr) massif/tests/peak2 (post) massif/tests/realloc (stderr) massif/tests/realloc (post) massif/tests/thresholds_0_0 (post) massif/tests/thresholds_0_10 (post) massif/tests/thresholds_10_0 (post) massif/tests/thresholds_10_10 (post) massif/tests/thresholds_5_0 (post) massif/tests/thresholds_5_10 (post) massif/tests/zero1 (post) massif/tests/zero2 (post) memcheck/tests/file_locking (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/origin1-yes (stderr) memcheck/tests/origin4-many (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/x86/bug152022 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) none/tests/blockfault (stderr) none/tests/cmdline2 (stdout) none/tests/mremap2 (stdout) none/tests/shell (stderr) none/tests/shell_valid1 (stderr) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) |
|
From: Tom H. <th...@cy...> - 2008-10-20 03:04:08
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2008-10-20 03:05:06 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 == 460 tests, 11 stderr failures, 3 stdout failures, 0 post failures == exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) memcheck/tests/file_locking (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/blockfault (stderr) none/tests/cmdline2 (stdout) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2008-10-20 02:53:05
|
Nightly build on trojan ( x86_64, Fedora Core 6 ) started at 2008-10-20 03:25:06 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 == 464 tests, 13 stderr failures, 5 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) memcheck/tests/file_locking (stderr) memcheck/tests/malloc_free_fill (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/blockfault (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap2 (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 464 tests, 12 stderr failures, 5 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) memcheck/tests/file_locking (stderr) memcheck/tests/malloc_free_fill (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/blockfault (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap2 (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Mon Oct 20 03:37:08 2008 --- new.short Mon Oct 20 03:52:57 2008 *************** *** 8,10 **** ! == 464 tests, 12 stderr failures, 5 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) --- 8,10 ---- ! == 464 tests, 13 stderr failures, 5 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) *************** *** 12,13 **** --- 12,14 ---- exp-ptrcheck/tests/pth_specific (stderr) + helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc20_verifywrap (stderr) |
|
From: Tom H. <th...@cy...> - 2008-10-20 02:32:16
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2008-10-20 03:00:02 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 == 466 tests, 34 stderr failures, 4 stdout failures, 0 post failures == drd/tests/pth_cancel_locked (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/hackedbz2 (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) 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/cmdline2 (stdout) 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) |