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
(5) |
2
(3) |
|
3
(2) |
4
(3) |
5
(16) |
6
(8) |
7
(6) |
8
(2) |
9
(4) |
|
10
(10) |
11
(22) |
12
(7) |
13
(10) |
14
(11) |
15
(8) |
16
(6) |
|
17
(11) |
18
|
19
(6) |
20
(8) |
21
(5) |
22
(11) |
23
(6) |
|
24
(1) |
25
(6) |
26
(4) |
27
(2) |
28
(1) |
29
|
30
(2) |
|
31
(5) |
|
|
|
|
|
|
|
From: <sv...@va...> - 2015-05-11 21:18:49
|
Author: florian
Date: Mon May 11 22:18:41 2015
New Revision: 15216
Log:
Simplify PRE(sys_mprotect).
Don't pretend we'd be supporting stacks growing towards higher
addresses. We don't. Add some commentary.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c Mon May 11 22:18:41 2015
@@ -3631,49 +3631,51 @@
/* Deal with mprotects on growable stack areas.
The critical files to understand all this are mm/mprotect.c
- in the kernel and sysdeps/unix/sysv/linux/dl-execstack.c in
- glibc.
+ in the kernel and sysdeps/unix/sysv/linux/dl-execstack.c and
+ elf/dl-load.c in glibc.
The kernel provides PROT_GROWSDOWN and PROT_GROWSUP which
round the start/end address of mprotect to the start/end of
- the underlying vma and glibc uses that as an easy way to
- change the protection of the stack by calling mprotect on the
- last page of the stack with PROT_GROWSDOWN set.
-
- The sanity check provided by the kernel is that the vma must
- have the VM_GROWSDOWN/VM_GROWSUP flag set as appropriate. */
+ the underlying vma. Older versions of glibc (e.g. 2.12.1) use that
+ as an easy way to change the protection of the stack by calling
+ mprotect on the last page of the stack with PROT_GROWSDOWN set.
+ Newer versions (e.g. 2.19) no longer appear to be using this trick.
+
+ We can only encounter PROT_GROWSUP on platforms where the stack
+ grows towards higher addresses. Here is the snippet from dl-load.c:
+
+ int __stack_prot attribute_hidden attribute_relro
+ #if _STACK_GROWS_DOWN && defined PROT_GROWSDOWN
+ = PROT_GROWSDOWN;
+ #elif _STACK_GROWS_UP && defined PROT_GROWSUP
+ = PROT_GROWSUP;
+ #else
+ = 0;
+ #endif
+
+ And _STACK_GROWS_DOWN is true for all platforms we support.
+ Besides, there is no support for GROWS_UP sdtacks anywhere in
+ valgrind.
+ */
UInt grows = ARG3 & (VKI_PROT_GROWSDOWN|VKI_PROT_GROWSUP);
+
+ vg_assert(grows == VKI_PROT_GROWSDOWN);
+
NSegment const *aseg = VG_(am_find_nsegment)(ARG1);
NSegment const *rseg;
vg_assert(aseg);
- if (grows == VKI_PROT_GROWSDOWN) {
- rseg = VG_(am_next_nsegment)( aseg, False/*backwards*/ );
- if (rseg &&
- rseg->kind == SkResvn &&
- rseg->smode == SmUpper &&
- rseg->end+1 == aseg->start) {
- Addr end = ARG1 + ARG2;
- ARG1 = aseg->start;
- ARG2 = end - aseg->start;
- ARG3 &= ~VKI_PROT_GROWSDOWN;
- } else {
- SET_STATUS_Failure( VKI_EINVAL );
- }
- } else if (grows == VKI_PROT_GROWSUP) {
- rseg = VG_(am_next_nsegment)( aseg, True/*forwards*/ );
- if (rseg &&
- rseg->kind == SkResvn &&
- rseg->smode == SmLower &&
- aseg->end+1 == rseg->start) {
- ARG2 = aseg->end - ARG1 + 1;
- ARG3 &= ~VKI_PROT_GROWSUP;
- } else {
- SET_STATUS_Failure( VKI_EINVAL );
- }
+ rseg = VG_(am_next_nsegment)( aseg, False/*backwards*/ );
+ if (rseg &&
+ rseg->kind == SkResvn &&
+ rseg->smode == SmUpper &&
+ rseg->end+1 == aseg->start) {
+ Addr end = ARG1 + ARG2;
+ ARG1 = aseg->start;
+ ARG2 = end - aseg->start;
+ ARG3 &= ~VKI_PROT_GROWSDOWN;
} else {
- /* both GROWSUP and GROWSDOWN */
SET_STATUS_Failure( VKI_EINVAL );
}
}
|
|
From: <sv...@va...> - 2015-05-11 21:02:06
|
Author: philippe
Date: Mon May 11 22:02:00 2015
New Revision: 15215
Log:
Add back vg_assert(xa); that was removed by error in r15211
Modified:
trunk/coregrind/m_xarray.c
Modified: trunk/coregrind/m_xarray.c
==============================================================================
--- trunk/coregrind/m_xarray.c (original)
+++ trunk/coregrind/m_xarray.c Mon May 11 22:02:00 2015
@@ -127,7 +127,7 @@
inline void* VG_(indexXA) ( const XArray* xa, Word n )
{
- // vg_assert(xa);
+ vg_assert(xa);
// vg_assert(n >= 0); If n negative, the UWord conversion will make
// it bigger than usedsizeE.
vg_assert((UWord)n < xa->usedsizeE);
|
|
From: Philippe W. <phi...@sk...> - 2015-05-11 20:59:41
|
On Mon, 2015-05-11 at 22:54 +0200, Florian Krohm wrote:
> On 11.05.2015 21:41, sv...@va... wrote:
> > Author: philippe
> > Date: Mon May 11 20:41:43 2015
> > New Revision: 15211
> >
> > Log:
> > Micro-optimisation following helgrind secmap gc
> > Checking the range in indexXA can be done with one comparison.
> >
> >
> > Modified:
> > trunk/coregrind/m_xarray.c
> >
> > Modified: trunk/coregrind/m_xarray.c
> > ==============================================================================
> > --- trunk/coregrind/m_xarray.c (original)
> > +++ trunk/coregrind/m_xarray.c Mon May 11 20:41:43 2015
> > @@ -127,9 +127,10 @@
> >
> > inline void* VG_(indexXA) ( const XArray* xa, Word n )
> > {
> > - vg_assert(xa);
>
> This assert should not be removed. It makes a good executable specification.
This was removed by error, I will add it back.
Philippe
|
|
From: <sv...@va...> - 2015-05-11 20:56:56
|
Author: philippe
Date: Mon May 11 21:56:49 2015
New Revision: 15214
Log:
VTS stats
* add the missing increment to the nr of gc done
* add vts pruning stat
Modified:
trunk/helgrind/libhb_core.c
Modified: trunk/helgrind/libhb_core.c
==============================================================================
--- trunk/helgrind/libhb_core.c (original)
+++ trunk/helgrind/libhb_core.c Mon May 11 21:56:49 2015
@@ -615,6 +615,7 @@
static UWord stats__vts__cmpLEQ = 0; // # calls to VTS__cmpLEQ
static UWord stats__vts__cmp_structural = 0; // # calls to VTS__cmp_structural
static UWord stats__vts_tab_GC = 0; // # nr of vts_tab GC
+static UWord stats__vts_pruning = 0; // # nr of vts pruning
// # calls to VTS__cmp_structural w/ slow case
static UWord stats__vts__cmp_structural_slow = 0;
@@ -2998,6 +2999,7 @@
VG_(printf)("<<GC ends, next gc at %ld>>\n", vts_next_GC_at);
}
+ stats__vts_tab_GC++;
if (VG_(clo_stats)) {
tl_assert(nTab > 0);
VG_(message)(Vg_DebugMsg,
@@ -3310,14 +3312,14 @@
}
/* And we're done. Bwahahaha. Ha. Ha. Ha. */
+ stats__vts_pruning++;
if (VG_(clo_stats)) {
- static UInt ctr = 1;
tl_assert(nTab > 0);
VG_(message)(
Vg_DebugMsg,
- "libhb: VTS PR: #%u before %lu (avg sz %lu) "
+ "libhb: VTS PR: #%lu before %lu (avg sz %lu) "
"after %lu (avg sz %lu)\n",
- ctr++,
+ stats__vts_pruning,
nBeforePruning, nSTSsBefore / (nBeforePruning ? nBeforePruning : 1),
nAfterPruning, nSTSsAfter / (nAfterPruning ? nAfterPruning : 1)
);
@@ -6275,7 +6277,8 @@
" libhb: %ld entries in vts_table (approximately %lu bytes)\n",
VG_(sizeXA)( vts_tab ), VG_(sizeXA)( vts_tab ) * sizeof(VtsTE)
);
- VG_(printf)(" libhb: #%lu vts_tab GC\n", stats__vts_tab_GC);
+ VG_(printf)(" libhb: #%lu vts_tab GC #%lu vts pruning\n",
+ stats__vts_tab_GC, stats__vts_pruning);
VG_(printf)( " libhb: %lu entries in vts_set\n",
VG_(sizeFM)( vts_set ) );
|
|
From: Florian K. <fl...@ei...> - 2015-05-11 20:54:54
|
On 11.05.2015 21:41, sv...@va... wrote:
> Author: philippe
> Date: Mon May 11 20:41:43 2015
> New Revision: 15211
>
> Log:
> Micro-optimisation following helgrind secmap gc
> Checking the range in indexXA can be done with one comparison.
>
>
> Modified:
> trunk/coregrind/m_xarray.c
>
> Modified: trunk/coregrind/m_xarray.c
> ==============================================================================
> --- trunk/coregrind/m_xarray.c (original)
> +++ trunk/coregrind/m_xarray.c Mon May 11 20:41:43 2015
> @@ -127,9 +127,10 @@
>
> inline void* VG_(indexXA) ( const XArray* xa, Word n )
> {
> - vg_assert(xa);
This assert should not be removed. It makes a good executable specification.
Florian
|
|
From: Will S. <wil...@vn...> - 2015-05-11 20:53:18
|
Fix multipleinheritance heuristic for ppc64LE (leak_cpp_interior test).
Adjust the PPC64 #ifdiffery to indicate that ppc64BE uses a thunk table,
but ppc64LE (in particular, the ELF ABIV2) does not. In this case, thunk
table == function descriptors.
Signed-off-by: Will Schmidt <wil...@vn...>
--
This patch replaces the previously posted "[6/7] add leak_cpp_interior
test .exp results ....."
diff --git a/memcheck/mc_leakcheck.c b/memcheck/mc_leakcheck.c
index 75ff3f2..791a5c1 100644
--- a/memcheck/mc_leakcheck.c
+++ b/memcheck/mc_leakcheck.c
@@ -648,9 +648,9 @@ static Bool aligned_ptr_above_page0_is_vtable_addr(Addr ptr)
if (pot_fn == 0)
continue; // NULL fn pointer. Seems it can happen in vtable.
seg = VG_(am_find_nsegment) (pot_fn);
-#if defined(VGA_ppc64be) || defined(VGA_ppc64le)
- // ppc64 use a thunk table. So, we have one more level of indirection
- // to follow.
+#if defined(VGA_ppc64be)
+ // ppc64BE uses a thunk table (function descriptors), so we have one
+ // more level of indirection to follow.
if (seg == NULL
|| seg->kind != SkFileC
|| !seg->hasR
|
|
From: <sv...@va...> - 2015-05-11 20:18:17
|
Author: philippe
Date: Mon May 11 21:18:10 2015
New Revision: 15213
Log:
Simplify shmem__invalidate_scache_range : it only has to handle
cacheline aligned ranges.
Modified:
trunk/helgrind/libhb_core.c
Modified: trunk/helgrind/libhb_core.c
==============================================================================
--- trunk/helgrind/libhb_core.c (original)
+++ trunk/helgrind/libhb_core.c Mon May 11 21:18:10 2015
@@ -1624,29 +1624,17 @@
normalise_CacheLine( cl );
}
-/* Invalid the cachelines corresponding to the given range. */
+/* Invalid the cachelines corresponding to the given range, which
+ must start and end on a cacheline boundary. */
static void shmem__invalidate_scache_range (Addr ga, SizeT szB)
{
- Addr before_start = ga;
- Addr aligned_start = ROUNDUP(ga, N_LINE_ARANGE);
- Addr after_start = ROUNDDN(ga + szB, N_LINE_ARANGE);
- UWord before_len = aligned_start - before_start;
- UWord after_len = ga + szB - after_start;
-
- /* Write-back cachelines partially set to NOACCESS */
- if (before_len > 0) {
- zsm_sset_range_SMALL (before_start, before_len, SVal_NOACCESS);
- szB += N_LINE_ARANGE - before_len;
- }
- if (after_len > 0) {
- zsm_sset_range_SMALL (after_start, after_len, SVal_NOACCESS);
- szB += N_LINE_ARANGE - after_len;
- }
+ Word wix;
- /* szB must now be a multiple of cacheline size. */
+ /* ga must be on a cacheline boundary. */
+ tl_assert (is_valid_scache_tag (ga));
+ /* szB must be a multiple of cacheline size. */
tl_assert (0 == (szB & (N_LINE_ARANGE - 1)));
-
- Word wix;
+
Word ga_ix = (ga >> N_LINE_BITS) & (N_WAY_NENT - 1);
Word nwix = szB / N_LINE_ARANGE;
|
|
From: <sv...@va...> - 2015-05-11 19:45:15
|
Author: philippe
Date: Mon May 11 20:45:08 2015
New Revision: 15212
Log:
Small optimisations in libhb_core.c
* avoid indirection via function pointers to call SVal__rcinc and SVal__rcdec
* declare these functions inlined
* transform 2 asserts on hot path in conditionally compiled checks
on CHECK_ZSM
This slightly optimises some perf tests with helgrind
Modified:
trunk/helgrind/libhb_core.c
Modified: trunk/helgrind/libhb_core.c
==============================================================================
--- trunk/helgrind/libhb_core.c (original)
+++ trunk/helgrind/libhb_core.c Mon May 11 20:45:08 2015
@@ -365,6 +365,8 @@
static inline VtsID SVal__unC_Rmin ( SVal s );
static inline VtsID SVal__unC_Wmin ( SVal s );
static inline SVal SVal__mkC ( VtsID rmini, VtsID wmini );
+static inline void SVal__rcinc ( SVal s );
+static inline void SVal__rcdec ( SVal s );
/* A double linked list of all the SO's. */
SO* admin_SO;
@@ -383,7 +385,7 @@
#define __HB_ZSM_H
/* Initialise the library. Once initialised, it will (or may) call
- rcinc and rcdec in response to all the calls below, in order to
+ SVal__rcinc and SVal__rcdec in response to all the calls below, in order to
allow the user to do reference counting on the SVals stored herein.
It is important to understand, however, that due to internal
caching, the reference counts are in general inaccurate, and can be
@@ -394,11 +396,11 @@
To make the reference counting exact and therefore non-pointless,
call zsm_flush_cache. Immediately after it returns, the reference
counts for all items, as deduced by the caller by observing calls
- to rcinc and rcdec, will be correct, and so any items with a zero
- reference count may be freed (or at least considered to be
+ to SVal__rcinc and SVal__rcdec, will be correct, and so any items with a
+ zero reference count may be freed (or at least considered to be
unreferenced by this library).
*/
-static void zsm_init ( void(*rcinc)(SVal), void(*rcdec)(SVal) );
+static void zsm_init ( void );
static void zsm_sset_range ( Addr, SizeT, SVal );
static void zsm_sset_range_SMALL ( Addr a, SizeT len, SVal svNew );
@@ -427,11 +429,6 @@
return a - start < szB;
}
-/* ------ User-supplied RC functions ------ */
-static void(*rcinc)(SVal) = NULL;
-static void(*rcdec)(SVal) = NULL;
-
-
/* ------ CacheLine ------ */
#define N_LINE_BITS 6 /* must be >= 3 */
@@ -908,30 +905,30 @@
UWord i;
tl_assert(lineF->inUse);
for (i = 0; i < N_LINE_ARANGE; i++)
- rcinc(lineF->w64s[i]);
+ SVal__rcinc(lineF->w64s[i]);
}
static void rcdec_LineF ( LineF* lineF ) {
UWord i;
tl_assert(lineF->inUse);
for (i = 0; i < N_LINE_ARANGE; i++)
- rcdec(lineF->w64s[i]);
+ SVal__rcdec(lineF->w64s[i]);
}
static void rcinc_LineZ ( LineZ* lineZ ) {
tl_assert(lineZ->dict[0] != SVal_INVALID);
- rcinc(lineZ->dict[0]);
- if (lineZ->dict[1] != SVal_INVALID) rcinc(lineZ->dict[1]);
- if (lineZ->dict[2] != SVal_INVALID) rcinc(lineZ->dict[2]);
- if (lineZ->dict[3] != SVal_INVALID) rcinc(lineZ->dict[3]);
+ SVal__rcinc(lineZ->dict[0]);
+ if (lineZ->dict[1] != SVal_INVALID) SVal__rcinc(lineZ->dict[1]);
+ if (lineZ->dict[2] != SVal_INVALID) SVal__rcinc(lineZ->dict[2]);
+ if (lineZ->dict[3] != SVal_INVALID) SVal__rcinc(lineZ->dict[3]);
}
static void rcdec_LineZ ( LineZ* lineZ ) {
tl_assert(lineZ->dict[0] != SVal_INVALID);
- rcdec(lineZ->dict[0]);
- if (lineZ->dict[1] != SVal_INVALID) rcdec(lineZ->dict[1]);
- if (lineZ->dict[2] != SVal_INVALID) rcdec(lineZ->dict[2]);
- if (lineZ->dict[3] != SVal_INVALID) rcdec(lineZ->dict[3]);
+ SVal__rcdec(lineZ->dict[0]);
+ if (lineZ->dict[1] != SVal_INVALID) SVal__rcdec(lineZ->dict[1]);
+ if (lineZ->dict[2] != SVal_INVALID) SVal__rcdec(lineZ->dict[2]);
+ if (lineZ->dict[3] != SVal_INVALID) SVal__rcdec(lineZ->dict[3]);
}
inline
@@ -1305,10 +1302,11 @@
UShort descr;
/* pre: incoming tree[0..7] does not have any invalid shvals, in
particular no zeroes. */
- if (UNLIKELY(tree[7] == SVal_INVALID || tree[6] == SVal_INVALID
- || tree[5] == SVal_INVALID || tree[4] == SVal_INVALID
- || tree[3] == SVal_INVALID || tree[2] == SVal_INVALID
- || tree[1] == SVal_INVALID || tree[0] == SVal_INVALID))
+ if (CHECK_ZSM
+ && UNLIKELY(tree[7] == SVal_INVALID || tree[6] == SVal_INVALID
+ || tree[5] == SVal_INVALID || tree[4] == SVal_INVALID
+ || tree[3] == SVal_INVALID || tree[2] == SVal_INVALID
+ || tree[1] == SVal_INVALID || tree[0] == SVal_INVALID))
tl_assert(0);
descr = TREE_DESCR_8_7 | TREE_DESCR_8_6 | TREE_DESCR_8_5
@@ -1616,12 +1614,10 @@
stats__cache_F_fetches++;
} else {
for (i = 0; i < N_LINE_ARANGE; i++) {
- SVal sv;
UWord ix = read_twobit_array( lineZ->ix2s, i );
- /* correct, but expensive: tl_assert(ix >= 0 && ix <= 3); */
- sv = lineZ->dict[ix];
- tl_assert(sv != SVal_INVALID);
- cl->svals[i] = sv;
+ if (CHECK_ZSM) tl_assert(ix >= 0 && ix <= 3);
+ cl->svals[i] = lineZ->dict[ix];
+ if (CHECK_ZSM) tl_assert(cl->svals[i] != SVal_INVALID);
}
stats__cache_Z_fetches++;
}
@@ -1943,13 +1939,10 @@
}
-static void zsm_init ( void(*p_rcinc)(SVal), void(*p_rcdec)(SVal) )
+static void zsm_init ( void )
{
tl_assert( sizeof(UWord) == sizeof(Addr) );
- rcinc = p_rcinc;
- rcdec = p_rcdec;
-
tl_assert(map_shmem == NULL);
map_shmem = VG_(newFM)( HG_(zalloc), "libhb.zsm_init.1 (map_shmem)",
HG_(free),
@@ -3997,7 +3990,7 @@
}
/* Direct callback from lib_zsm. */
-static void SVal__rcinc ( SVal s ) {
+static inline void SVal__rcinc ( SVal s ) {
if (SVal__isC(s)) {
VtsID__rcinc( SVal__unC_Rmin(s) );
VtsID__rcinc( SVal__unC_Wmin(s) );
@@ -4005,7 +3998,7 @@
}
/* Direct callback from lib_zsm. */
-static void SVal__rcdec ( SVal s ) {
+static inline void SVal__rcdec ( SVal s ) {
if (SVal__isC(s)) {
VtsID__rcdec( SVal__unC_Rmin(s) );
VtsID__rcdec( SVal__unC_Wmin(s) );
@@ -6141,7 +6134,7 @@
VtsID__invalidate_caches();
// initialise shadow memory
- zsm_init( SVal__rcinc, SVal__rcdec );
+ zsm_init( );
thr = Thr__new();
vi = VtsID__mk_Singleton( thr, 1 );
|
|
From: <sv...@va...> - 2015-05-11 19:41:50
|
Author: philippe
Date: Mon May 11 20:41:43 2015
New Revision: 15211
Log:
Micro-optimisation following helgrind secmap gc
Checking the range in indexXA can be done with one comparison.
Modified:
trunk/coregrind/m_xarray.c
Modified: trunk/coregrind/m_xarray.c
==============================================================================
--- trunk/coregrind/m_xarray.c (original)
+++ trunk/coregrind/m_xarray.c Mon May 11 20:41:43 2015
@@ -127,9 +127,10 @@
inline void* VG_(indexXA) ( const XArray* xa, Word n )
{
- vg_assert(xa);
- vg_assert(n >= 0);
- vg_assert(n < xa->usedsizeE);
+ // vg_assert(xa);
+ // vg_assert(n >= 0); If n negative, the UWord conversion will make
+ // it bigger than usedsizeE.
+ vg_assert((UWord)n < xa->usedsizeE);
return ((char*)xa->arr) + n * xa->elemSzB;
}
|
|
From: Matthias S. <zz...@ge...> - 2015-05-11 19:15:14
|
Hi! I updated the patch to now behave like this. The callstack is printed for: * xml output * verbose output * if signal is from kernel and the signal can trigger a coredump * if signal is from the thread itself (calling raise) This will support debugging by making calls to abort visible in valgrind output. https://bugs.kde.org/show_bug.cgi?id=191069 The patch: https://bugsfiles.kde.org/attachment.cgi?id=92548 Regards Matthias |
|
From: Will S. <wil...@vn...> - 2015-05-11 19:14:55
|
On Mon, 2015-05-11 at 20:28 +0200, Matthias Schwarzott wrote: > On 11.05.2015 19:14, Will Schmidt wrote: > > add a leak_cpp_interior test .exp entry to match the current ppc64* output. > > In contrast to the existing .exp entries, there are multiple changes > > throughout the generated output, this one is not filterable. > > > It looks like the multipleinheritance heuristic does not work on this > platform. > Maybe the code in aligned_ptr_above_page0_is_vtable_addr in > mc_leakcheck.c is wrong. > But at least it has: > #if defined(VGA_ppc64be) || defined(VGA_ppc64le) Ok. That actually seems to be the problem with this test. ppc64LE does not use the function descriptors like BE does. Thanks for pointing out where exactly to look. :-) locally, dropping the defined(VGA_ppc64le) portion of the ifdef appears to clear the failure up. I'll do a clean respin to verify and check for side affects and re-submit patch 6/7 shortly. Thanks, -Will > Regards > Matthias > |
|
From: Matthias S. <zz...@ge...> - 2015-05-11 18:29:06
|
On 11.05.2015 19:14, Will Schmidt wrote: > add a leak_cpp_interior test .exp entry to match the current ppc64* output. > In contrast to the existing .exp entries, there are multiple changes > throughout the generated output, this one is not filterable. > It looks like the multipleinheritance heuristic does not work on this platform. Maybe the code in aligned_ptr_above_page0_is_vtable_addr in mc_leakcheck.c is wrong. But at least it has: #if defined(VGA_ppc64be) || defined(VGA_ppc64le) Regards Matthias |
|
From: Will S. <wil...@vn...> - 2015-05-11 17:14:29
|
Temporarily remove assert from arch_2_07 check, allow continued
function on Power6, etc.
This is a temporary remove, code needs further rework.
Signed-off-by: Will Schmidt <wil...@vn...>
---
coregrind/m_initimg/initimg-linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c
index cd0b7f3..44f28c9 100644
--- a/coregrind/m_initimg/initimg-linux.c
+++ b/coregrind/m_initimg/initimg-linux.c
@@ -733,7 +733,7 @@ Addr setup_client_stack( void* init_sp,
/* Verify if PPC_FEATURE2_ARCH_2_07 is set in HWCAP2
* that arch_2_07 is also set in VEX HWCAPS
*/
- vg_assert((vex_archinfo->hwcaps & VEX_HWCAPS_PPC64_ISA2_07) == VEX_HWCAPS_PPC64_ISA2_07);
+// vg_assert((vex_archinfo->hwcaps & VEX_HWCAPS_PPC64_ISA2_07) == VEX_HWCAPS_PPC64_ISA2_07);
}
break;
|
|
From: Will S. <wil...@vn...> - 2015-05-11 17:14:26
|
add a leak_cpp_interior test .exp entry to match the current ppc64* output. In contrast to the existing .exp entries, there are multiple changes throughout the generated output, this one is not filterable. Signed-off-by: Will Schmidt <wil...@vn...> -- --- memcheck/tests/Makefile.am | 1 .../tests/leak_cpp_interior.stderr.exp-ppc64le | 144 ++++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 memcheck/tests/leak_cpp_interior.stderr.exp-ppc64le diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index f177167..03feb1d 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -90,6 +90,7 @@ EXTRA_DIST = \ cond_st.stderr.exp-64bit-non-arm \ cond_st.stderr.exp-32bit-non-arm \ leak_cpp_interior.stderr.exp leak_cpp_interior.stderr.exp-64bit leak_cpp_interior.vgtest \ + leak_cpp_interior.stderr.exp-ppc64le \ custom_alloc.stderr.exp custom_alloc.vgtest \ custom_alloc.stderr.exp-s390x-mvc \ custom-overlap.stderr.exp custom-overlap.vgtest \ diff --git a/memcheck/tests/leak_cpp_interior.stderr.exp-ppc64le b/memcheck/tests/leak_cpp_interior.stderr.exp-ppc64le new file mode 100644 index 0000000..1676210 --- /dev/null +++ b/memcheck/tests/leak_cpp_interior.stderr.exp-ppc64le @@ -0,0 +1,144 @@ + +valgrind output will go to log +VALGRIND_DO_LEAK_CHECK +8 bytes in 1 blocks are definitely lost in loss record ... of ... + by 0x........: doit() (leak_cpp_interior.cpp:112) + by 0x........: main (leak_cpp_interior.cpp:127) + +16 bytes in 1 blocks are possibly lost in loss record ... of ... + by 0x........: doit() (leak_cpp_interior.cpp:115) + by 0x........: main (leak_cpp_interior.cpp:127) + +32 bytes in 1 blocks are possibly lost in loss record ... of ... + by 0x........: doit() (leak_cpp_interior.cpp:117) + by 0x........: main (leak_cpp_interior.cpp:127) + +LEAK SUMMARY: + definitely lost: 8 bytes in 1 blocks + indirectly lost: 0 bytes in 0 blocks + possibly lost: 48 bytes in 2 blocks + still reachable: 191 bytes in 6 blocks + of which reachable via heuristic: + stdstring : 80 bytes in 2 blocks + length64 : 31 bytes in 1 blocks + newarray : 32 bytes in 1 blocks + suppressed: 0 bytes in 0 blocks +Reachable blocks (those to which a pointer was found) are not shown. +To see them, rerun with: --leak-check=full --show-leak-kinds=all + +leak_check summary heuristics multipleinheritance +LEAK SUMMARY: + definitely lost: 8 (+0) bytes in 1 (+0) blocks + indirectly lost: 0 (+0) bytes in 0 (+0) blocks + possibly lost: 191 (+143) bytes in 6 (+4) blocks + still reachable: 48 (-143) bytes in 2 (-4) blocks + of which reachable via heuristic: + stdstring : 0 (-80) bytes in 0 (-2) blocks + length64 : 0 (-31) bytes in 0 (-1) blocks + newarray : 0 (-32) bytes in 0 (-1) blocks + suppressed: 0 (+0) bytes in 0 (+0) blocks +To see details of leaked memory, give 'full' arg to leak_check + +leak_check summary any heuristics newarray +LEAK SUMMARY: + definitely lost: 8 (+0) bytes in 1 (+0) blocks + indirectly lost: 0 (+0) bytes in 0 (+0) blocks + possibly lost: 128 (-63) bytes in 4 (-2) blocks + still reachable: 111 (+63) bytes in 4 (+2) blocks + of which reachable via heuristic: + newarray : 63 (+63) bytes in 2 (+2) blocks + suppressed: 0 (+0) bytes in 0 (+0) blocks +To see details of leaked memory, give 'full' arg to leak_check + +leak_check summary heuristics length64 +LEAK SUMMARY: + definitely lost: 8 (+0) bytes in 1 (+0) blocks + indirectly lost: 0 (+0) bytes in 0 (+0) blocks + possibly lost: 160 (+32) bytes in 5 (+1) blocks + still reachable: 79 (-32) bytes in 3 (-1) blocks + of which reachable via heuristic: + length64 : 31 (+31) bytes in 1 (+1) blocks + newarray : 0 (-63) bytes in 0 (-2) blocks + suppressed: 0 (+0) bytes in 0 (+0) blocks +To see details of leaked memory, give 'full' arg to leak_check + +leak_check summary heuristics stdstring +LEAK SUMMARY: + definitely lost: 8 (+0) bytes in 1 (+0) blocks + indirectly lost: 0 (+0) bytes in 0 (+0) blocks + possibly lost: 111 (-49) bytes in 4 (-1) blocks + still reachable: 128 (+49) bytes in 4 (+1) blocks + of which reachable via heuristic: + stdstring : 80 (+80) bytes in 2 (+2) blocks + length64 : 0 (-31) bytes in 0 (-1) blocks + suppressed: 0 (+0) bytes in 0 (+0) blocks +To see details of leaked memory, give 'full' arg to leak_check + +leak_check summary heuristics multipleinheritance,newarray,stdstring,length64 +LEAK SUMMARY: + definitely lost: 8 (+0) bytes in 1 (+0) blocks + indirectly lost: 0 (+0) bytes in 0 (+0) blocks + possibly lost: 48 (-63) bytes in 2 (-2) blocks + still reachable: 191 (+63) bytes in 6 (+2) blocks + of which reachable via heuristic: + stdstring : 80 (+0) bytes in 2 (+0) blocks + length64 : 31 (+31) bytes in 1 (+1) blocks + newarray : 32 (+32) bytes in 1 (+1) blocks + suppressed: 0 (+0) bytes in 0 (+0) blocks +To see details of leaked memory, give 'full' arg to leak_check + +leak_check summary heuristics all +LEAK SUMMARY: + definitely lost: 8 (+0) bytes in 1 (+0) blocks + indirectly lost: 0 (+0) bytes in 0 (+0) blocks + possibly lost: 48 (+0) bytes in 2 (+0) blocks + still reachable: 191 (+0) bytes in 6 (+0) blocks + of which reachable via heuristic: + stdstring : 80 (+0) bytes in 2 (+0) blocks + length64 : 31 (+0) bytes in 1 (+0) blocks + newarray : 32 (+0) bytes in 1 (+0) blocks + suppressed: 0 (+0) bytes in 0 (+0) blocks +To see details of leaked memory, give 'full' arg to leak_check + +leak_check summary heuristics none +LEAK SUMMARY: + definitely lost: 8 (+0) bytes in 1 (+0) blocks + indirectly lost: 0 (+0) bytes in 0 (+0) blocks + possibly lost: 191 (+143) bytes in 6 (+4) blocks + still reachable: 48 (-143) bytes in 2 (-4) blocks + of which reachable via heuristic: + stdstring : 0 (-80) bytes in 0 (-2) blocks + length64 : 0 (-31) bytes in 0 (-1) blocks + newarray : 0 (-32) bytes in 0 (-1) blocks + suppressed: 0 (+0) bytes in 0 (+0) blocks +To see details of leaked memory, give 'full' arg to leak_check + +Searching for pointers pointing in 20 bytes from 0x........ +*0x........ interior points at 8 bytes inside 0x........ + Address 0x........ is 0 bytes inside data symbol "ptr" +block at 0x........ considered reachable by ptr 0x........ using newarray heuristic +destruct MyClass +destruct MyClass +destruct MyClass +destruct Ce +destruct Be +destruct Ae +destruct Ce +destruct Be +destruct Ae +destruct C +destruct B +destruct A +destruct C +destruct B +destruct A +Finished! + +HEAP SUMMARY: + in use at exit: 0 bytes in 0 blocks + total heap usage: 9 allocs, 9 frees, 247 bytes allocated + +All heap blocks were freed -- no leaks are possible + +For counts of detected and suppressed errors, rerun with: -v +ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) |
|
From: Will S. <wil...@vn...> - 2015-05-11 17:14:20
|
Add a .exp for the tc06_two_races_xml for power. This is specifically to cover the last line of output as seen on ppc64BE, which is "ERROR SUMMARY: X errors from 3 contexts", where X is 6, versus 3 as seen on other architectures. The additional errors show up on BE during the "Thread #1: pthread_cond _destroy: destruction of condition variable being waited upon." Signed-off-by: Will Schmidt <wil...@vn...> -- I did do some experimentation with filters for this change. Though I could squash the 3/6 values down to 0 to match, it would affect a number of other tests, and seemed rather invasive. I'm going with this as the most straightforward fix. --- helgrind/tests/Makefile.am | 1 .../tests/pth_cond_destroy_busy.stderr.exp-ppc64 | 50 ++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 helgrind/tests/pth_cond_destroy_busy.stderr.exp-ppc64 diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index e3dff80..c8409e1 100644 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -46,6 +46,7 @@ EXTRA_DIST = \ pth_destroy_cond.vgtest \ pth_destroy_cond.stdout.exp pth_destroy_cond.stderr.exp \ pth_cond_destroy_busy.vgtest pth_cond_destroy_busy.stderr.exp \ + pth_cond_destroy_busy.stderr.exp-ppc64 \ pth_spinlock.vgtest pth_spinlock.stdout.exp pth_spinlock.stderr.exp \ rwlock_race.vgtest rwlock_race.stdout.exp rwlock_race.stderr.exp \ rwlock_test.vgtest rwlock_test.stdout.exp rwlock_test.stderr.exp \ diff --git a/helgrind/tests/pth_cond_destroy_busy.stderr.exp-ppc64 b/helgrind/tests/pth_cond_destroy_busy.stderr.exp-ppc64 new file mode 100644 index 0000000..2da688e --- /dev/null +++ b/helgrind/tests/pth_cond_destroy_busy.stderr.exp-ppc64 @@ -0,0 +1,50 @@ + +---Thread-Announcement------------------------------------------ + +Thread #x is the program's root thread + +---Thread-Announcement------------------------------------------ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (pth_cond_destroy_busy.c:45) + +---------------------------------------------------------------- + +Possible data race during read of size 1 at 0x........ by thread #x +Locks held: none + at 0x........: my_memcmp (hg_intercepts.c:...) + by 0x........: pthread_cond_destroy_WRK (hg_intercepts.c:...) + by 0x........: pthread_cond_destroy@* (hg_intercepts.c:...) + by 0x........: main (pth_cond_destroy_busy.c:52) + +This conflicts with a previous write of size 4 by thread #x +Locks held: none + ... + by 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...) + by 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: thread_func (pth_cond_destroy_busy.c:31) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Address 0x........ is 4 bytes inside data symbol "s_cond" + +---------------------------------------------------------------- + +Thread #x: pthread_cond_destroy: destruction of condition variable being waited upon + at 0x........: pthread_cond_destroy_WRK (hg_intercepts.c:...) + by 0x........: pthread_cond_destroy@* (hg_intercepts.c:...) + by 0x........: main (pth_cond_destroy_busy.c:52) + +---------------------------------------------------------------- + +Thread #x's call to pthread_cond_destroy failed + with error code 16 (EBUSY: Device or resource busy) + at 0x........: pthread_cond_destroy_WRK (hg_intercepts.c:...) + by 0x........: pthread_cond_destroy@* (hg_intercepts.c:...) + by 0x........: main (pth_cond_destroy_busy.c:52) + +First pthread_cond_destroy() call returned EBUSY. +Second pthread_cond_destroy() call returned success. + +ERROR SUMMARY: 6 errors from 3 contexts (suppressed: 0 from 0) |
|
From: Will S. <wil...@vn...> - 2015-05-11 17:14:17
|
Add a suppression to handle a "Jump to the invalid address..." message
that gets generated on power. This is a variation of the existing
suppressions.
While here, I also updated the "prog:" line in the vgtest file to reference
the supp_unknown executable, versus the badjump executable. They share the
same source code, so I think this is effectively cosmetic.
Signed-off-by: Will Schmidt <wil...@vn...>
--
---
memcheck/tests/supp_unknown.supp | 7 +++++++
memcheck/tests/supp_unknown.vgtest | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/memcheck/tests/supp_unknown.supp b/memcheck/tests/supp_unknown.supp
index 50ef425..00ea65a 100644
--- a/memcheck/tests/supp_unknown.supp
+++ b/memcheck/tests/supp_unknown.supp
@@ -13,3 +13,10 @@
fun:main
}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Jump
+ obj:*
+ fun:generic_start_main.isra.0
+ fun:(below main)
+}
diff --git a/memcheck/tests/supp_unknown.vgtest b/memcheck/tests/supp_unknown.vgtest
index a19b054..7636eef 100644
--- a/memcheck/tests/supp_unknown.vgtest
+++ b/memcheck/tests/supp_unknown.vgtest
@@ -1,4 +1,4 @@
vgopts: -q --suppressions=supp_unknown.supp
-prog: badjump
+prog: supp_unknown
cleanup: rm -f vgcore.*
stderr_filter_args: badjump.c
|
|
From: Will S. <wil...@vn...> - 2015-05-11 17:14:09
|
Add a tc06_two_races_xml exp output for ppc64. This differs from the existing .exp in that does not contain the pthread_create_WRK entry frame. Note that the filter_stderr helper also removes the pthread_create_WRK content, so I believe this to be an extension of that change. Signed-off-by: Will Schmidt <wil...@vn...> -- --- helgrind/tests/Makefile.am | 2 helgrind/tests/tc06_two_races_xml.stderr.exp-ppc64 | 259 ++++++++++++++++++++ 2 files changed, 260 insertions(+), 1 deletion(-) create mode 100644 helgrind/tests/tc06_two_races_xml.stderr.exp-ppc64 diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index 7ed3478..e3dff80 100644 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -64,7 +64,7 @@ EXTRA_DIST = \ tc06_two_races.vgtest tc06_two_races.stdout.exp \ tc06_two_races.stderr.exp \ tc06_two_races_xml.vgtest tc06_two_races_xml.stdout.exp \ - tc06_two_races_xml.stderr.exp \ + tc06_two_races_xml.stderr.exp tc06_two_races_xml.stderr.exp-ppc64 \ tc07_hbl1.vgtest tc07_hbl1.stdout.exp tc07_hbl1.stderr.exp \ tc08_hbl2.vgtest tc08_hbl2.stdout.exp tc08_hbl2.stderr.exp \ tc09_bad_unlock.vgtest tc09_bad_unlock.stdout.exp \ diff --git a/helgrind/tests/tc06_two_races_xml.stderr.exp-ppc64 b/helgrind/tests/tc06_two_races_xml.stderr.exp-ppc64 new file mode 100644 index 0000000..e75829e --- /dev/null +++ b/helgrind/tests/tc06_two_races_xml.stderr.exp-ppc64 @@ -0,0 +1,259 @@ +<?xml version="1.0"?> + +<valgrindoutput> + +<protocolversion>4</protocolversion> +<protocoltool>helgrind</protocoltool> + +<preamble> + <line>Helgrind, a thread error detector</line> + <line>Copyright (C) XXXX-YYYY, and GNU GPL'd, by OpenWorks LLP et al.</line> + <line>Using Valgrind-X.Y.X and LibVEX; rerun with -h for copyright info</line> + <line>Command: ./tc06_two_races</line> +</preamble> + +<pid>...</pid> +<ppid>...</ppid> +<tool>helgrind</tool> + +<args> + <vargv> + <exe>...</exe> + <arg>--command-line-only=yes</arg> + <arg>--memcheck:leak-check=no</arg> + <arg>--tool=helgrind</arg> + <arg>--read-var-info=yes</arg> + <arg>--xml=yes</arg> + <arg>--xml-fd=2</arg> + <arg>--log-file=/dev/null</arg> + </vargv> + <argv> + <exe>...</exe> + </argv> +</args> + +<status> + <state>RUNNING</state> + <time>...</time> +</status> + +<announcethread> + <hthreadid>1</hthreadid> + <isrootthread></isrootthread> +</announcethread> + +<announcethread> + <hthreadid>2</hthreadid> + <stack> + <frame>...</frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>pthread_create@*</fn> + <dir>...</dir> + <file>hg_intercepts.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>tc06_two_races.c</file> + <line>26</line> + </frame> + </stack> +</announcethread> + +<error> + <unique>...</unique> + <tid>...</tid> + <kind>Race</kind> + <xwhat> + <text>Possible data race during read of size 4 at 0x........ by thread #x</text> + <hthreadid>1</hthreadid> + </xwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>tc06_two_races.c</file> + <line>31</line> + </frame> + </stack> + <xauxwhat> + <text>This conflicts with a previous write of size 4 by thread #x</text> + <hthreadid>2</hthreadid> + </xauxwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>child_fn</fn> + <dir>...</dir> + <file>tc06_two_races.c</file> + <line>14</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>mythread_wrapper</fn> + <dir>...</dir> + <file>hg_intercepts.c</file> + <line>...</line> + </frame> + <frame>...</frame> + </stack> + <auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat> + <xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>9</line> </xauxwhat> +</error> + +<error> + <unique>...</unique> + <tid>...</tid> + <kind>Race</kind> + <xwhat> + <text>Possible data race during write of size 4 at 0x........ by thread #x</text> + <hthreadid>1</hthreadid> + </xwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>tc06_two_races.c</file> + <line>31</line> + </frame> + </stack> + <xauxwhat> + <text>This conflicts with a previous write of size 4 by thread #x</text> + <hthreadid>2</hthreadid> + </xauxwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>child_fn</fn> + <dir>...</dir> + <file>tc06_two_races.c</file> + <line>14</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>mythread_wrapper</fn> + <dir>...</dir> + <file>hg_intercepts.c</file> + <line>...</line> + </frame> + <frame>...</frame> + </stack> + <auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat> + <xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>9</line> </xauxwhat> +</error> + +<error> + <unique>...</unique> + <tid>...</tid> + <kind>Race</kind> + <xwhat> + <text>Possible data race during read of size 4 at 0x........ by thread #x</text> + <hthreadid>1</hthreadid> + </xwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>tc06_two_races.c</file> + <line>35</line> + </frame> + </stack> + <xauxwhat> + <text>This conflicts with a previous write of size 4 by thread #x</text> + <hthreadid>2</hthreadid> + </xauxwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>child_fn</fn> + <dir>...</dir> + <file>tc06_two_races.c</file> + <line>18</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>mythread_wrapper</fn> + <dir>...</dir> + <file>hg_intercepts.c</file> + <line>...</line> + </frame> + <frame>...</frame> + </stack> + <auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat> + <xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>9</line> </xauxwhat> +</error> + +<error> + <unique>...</unique> + <tid>...</tid> + <kind>Race</kind> + <xwhat> + <text>Possible data race during write of size 4 at 0x........ by thread #x</text> + <hthreadid>1</hthreadid> + </xwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>tc06_two_races.c</file> + <line>35</line> + </frame> + </stack> + <xauxwhat> + <text>This conflicts with a previous write of size 4 by thread #x</text> + <hthreadid>2</hthreadid> + </xauxwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>child_fn</fn> + <dir>...</dir> + <file>tc06_two_races.c</file> + <line>18</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>mythread_wrapper</fn> + <dir>...</dir> + <file>hg_intercepts.c</file> + <line>...</line> + </frame> + <frame>...</frame> + </stack> + <auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat> + <xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>9</line> </xauxwhat> +</error> + + +<status> + <state>FINISHED</state> + <time>...</time> +</status> + +<errorcounts>...</errorcounts> + +<suppcounts>...</suppcounts> + +</valgrindoutput> + |
|
From: Will S. <wil...@vn...> - 2015-05-11 17:14:05
|
Add a deep-D test .exp values for ppc64.
Depending on the system and the systems endianness, there are variances
in the library reference, and to the specific line number in the library.
I was able to add and modify existing filters to cover most of the variations,
but did need to add a .exp to cover the additional call stack entry as seen
on power.
This change allows the ppc64 targets to pass the massif/deep-D test.
Signed-off-by: Will Schmidt <wil...@vn...>
--
---
massif/tests/Makefile.am | 1 +
massif/tests/deep-D.post.exp-ppc64 | 55 ++++++++++++++++++++++++++++++++++++
tests/filter_libc | 3 ++
3 files changed, 59 insertions(+)
create mode 100644 massif/tests/deep-D.post.exp-ppc64
diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am
index 50fcf6c..531d8e6 100644
--- a/massif/tests/Makefile.am
+++ b/massif/tests/Makefile.am
@@ -14,6 +14,7 @@ EXTRA_DIST = \
deep-B.post.exp deep-B.stderr.exp deep-B.vgtest \
deep-C.post.exp deep-C.stderr.exp deep-C.vgtest \
deep-D.post.exp deep-D.stderr.exp deep-D.vgtest \
+ deep-D.post.exp-ppc64 \
culling1.stderr.exp culling1.vgtest \
culling2.stderr.exp culling2.vgtest \
custom_alloc.post.exp custom_alloc.stderr.exp custom_alloc.vgtest \
diff --git a/massif/tests/deep-D.post.exp-ppc64 b/massif/tests/deep-D.post.exp-ppc64
new file mode 100644
index 0000000..ce68e3b
--- /dev/null
+++ b/massif/tests/deep-D.post.exp-ppc64
@@ -0,0 +1,55 @@
+--------------------------------------------------------------------------------
+Command: ./deep
+Massif arguments: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
+ms_print arguments: massif.out
+--------------------------------------------------------------------------------
+
+
+ KB
+3.984^ :
+ | :
+ | @@@@@@@:
+ | @ :
+ | :::::::@ :
+ | : @ :
+ | :::::::: @ :
+ | : : @ :
+ | :::::::: : @ :
+ | : : : @ :
+ | :::::::: : : @ :
+ | : : : : @ :
+ | ::::::::: : : : @ :
+ | : : : : : @ :
+ | :::::::: : : : : @ :
+ | : : : : : : @ :
+ | :::::::: : : : : : @ :
+ | : : : : : : : @ :
+ | :::::::: : : : : : : @ :
+ | : : : : : : : : @ :
+ 0 +----------------------------------------------------------------------->KB
+ 0 3.984
+
+Number of snapshots: 11
+ Detailed snapshots: [9]
+
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
+--------------------------------------------------------------------------------
+ 0 0 0 0 0 0
+ 1 408 408 400 8 0
+ 2 816 816 800 16 0
+ 3 1,224 1,224 1,200 24 0
+ 4 1,632 1,632 1,600 32 0
+ 5 2,040 2,040 2,000 40 0
+ 6 2,448 2,448 2,400 48 0
+ 7 2,856 2,856 2,800 56 0
+ 8 3,264 3,264 3,200 64 0
+ 9 3,672 3,672 3,600 72 0
+98.04% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
+->98.04% (3,600B) 0x........: generic_start_main.isra.0 (in /...libc...)
+ ->98.04% (3,600B) 0x........: (below main)
+
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
+--------------------------------------------------------------------------------
+ 10 4,080 4,080 4,000 80 0
diff --git a/tests/filter_libc b/tests/filter_libc
index 827af88..dd30ef1 100755
--- a/tests/filter_libc
+++ b/tests/filter_libc
@@ -22,6 +22,9 @@ while (<>)
# libc, on some (eg. Darwin) it will be in the main executable.
s/\(below main\) \(.+\)$/(below main)/;
+ # filter out the exact libc-start.c:### line number. (ppc64*)
+ s/\(libc-start.c:[0-9]*\)$/(in \/...libc...)/;
+
# Merge the different C++ operator variations.
s/(at.*)__builtin_new/$1...operator new.../;
s/(at.*)operator new\(unsigned(| int| long)\)/$1...operator new.../;
|
|
From: Will S. <wil...@vn...> - 2015-05-11 17:13:59
|
Update the massif/big-alloc test for ppc64*. In comparison to the existing .exp files, the time,total,extra-heap values generated on ppc64* vary from the other architectures. This .exp allows the ppc64 targets to pass the test. Signed-off-by: Will Schmidt <wil...@vn...> -- --- massif/tests/Makefile.am | 2 + massif/tests/big-alloc.post.exp-ppc64 | 54 +++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 massif/tests/big-alloc.post.exp-ppc64 diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am index 5017543..50fcf6c 100644 --- a/massif/tests/Makefile.am +++ b/massif/tests/Makefile.am @@ -8,7 +8,7 @@ EXTRA_DIST = \ alloc-fns-B.post.exp alloc-fns-B.stderr.exp alloc-fns-B.vgtest \ basic.post.exp basic.stderr.exp basic.vgtest \ basic2.post.exp basic2.stderr.exp basic2.vgtest \ - big-alloc.post.exp big-alloc.post.exp-64bit \ + big-alloc.post.exp big-alloc.post.exp-64bit big-alloc.post.exp-ppc64 \ big-alloc.stderr.exp big-alloc.vgtest \ deep-A.post.exp deep-A.stderr.exp deep-A.vgtest \ deep-B.post.exp deep-B.stderr.exp deep-B.vgtest \ diff --git a/massif/tests/big-alloc.post.exp-ppc64 b/massif/tests/big-alloc.post.exp-ppc64 new file mode 100644 index 0000000..1d2c906 --- /dev/null +++ b/massif/tests/big-alloc.post.exp-ppc64 @@ -0,0 +1,54 @@ +-------------------------------------------------------------------------------- +Command: ./big-alloc +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element +ms_print arguments: massif.out +-------------------------------------------------------------------------------- + + + MB +100.6^ : + | : + | @@@@@@@: + | @ : + | :::::::@ : + | : @ : + | :::::::: @ : + | : : @ : + | :::::::: : @ : + | : : : @ : + | :::::::: : : @ : + | : : : : @ : + | ::::::::: : : : @ : + | : : : : : @ : + | :::::::: : : : : @ : + | : : : : : : @ : + | :::::::: : : : : : @ : + | : : : : : : : @ : + | :::::::: : : : : : : @ : + | : : : : : : : : @ : + 0 +----------------------------------------------------------------------->MB + 0 100.6 + +Number of snapshots: 11 + Detailed snapshots: [9] + +-------------------------------------------------------------------------------- + n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) +-------------------------------------------------------------------------------- + 0 0 0 0 0 0 + 1 10,551,240 10,551,240 10,485,760 65,480 0 + 2 21,102,480 21,102,480 20,971,520 130,960 0 + 3 31,653,720 31,653,720 31,457,280 196,440 0 + 4 42,204,960 42,204,960 41,943,040 261,920 0 + 5 52,756,200 52,756,200 52,428,800 327,400 0 + 6 63,307,440 63,307,440 62,914,560 392,880 0 + 7 73,858,680 73,858,680 73,400,320 458,360 0 + 8 84,409,920 84,409,920 83,886,080 523,840 0 + 9 94,961,160 94,961,160 94,371,840 589,320 0 +99.38% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. +->99.38% (94,371,840B) 0x........: main (big-alloc.c:12) + +-------------------------------------------------------------------------------- + n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) +-------------------------------------------------------------------------------- + 10 105,512,400 105,512,400 104,857,600 654,800 0 |
|
From: Will S. <wil...@vn...> - 2015-05-11 17:13:55
|
This is a refresh of the remaining patches intended to clean up the valgrind regtest results as seen on powerpc platforms. I've locally been running against Fedora20 and Fedora21 installations, on Power6, Power7, and Power8 (LE and BE) platforms. With these changes in place, the tests are significantly cleaned up. Per feedback from pass#1, I've gone back through and utilized filters and suppressions to handle as many of the remaining issues as I could. There are still a handful of new .exp files here, these seem necessary due to the number of or invasiveness of the deltas against the existing expect scripts. Thanks, -Will |
|
From: <sv...@va...> - 2015-05-11 13:24:54
|
Author: rhyskidd
Date: Mon May 11 14:24:42 2015
New Revision: 15210
Log:
Fix typo in task_policy_set() output. n-i-bz.
Modified:
trunk/coregrind/m_syswrap/syswrap-darwin.c
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Mon May 11 14:24:42 2015
@@ -5774,7 +5774,7 @@
Request *req = (Request *)ARG1;
- PRINT("task_policy_set(%s) flacor:%d", name_for_port(MACH_REMOTE), req->flavor);
+ PRINT("task_policy_set(%s) flavor:%d", name_for_port(MACH_REMOTE), req->flavor);
AFTER = POST_FN(task_policy_set);
}
|
|
From: <sv...@va...> - 2015-05-11 13:19:56
|
Author: rhyskidd
Date: Mon May 11 14:19:48 2015
New Revision: 15209
Log:
OS X task_info: UNKNOWN task message [id 3405, to mach_task_self(), reply 0x........]
bz#254164
Before:
== 593 tests, 234 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
After:
== 593 tests, 233 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
trunk/coregrind/m_syswrap/syswrap-darwin.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon May 11 14:19:48 2015
@@ -70,6 +70,8 @@
211926 Avoid compilation warnings in valgrind.h with -pedantic
226609 Crediting upstream authors in man page
231257 Valgrind omits path when executing script from shebang line
+254164 OS X task_info: UNKNOWN task message [id 3405, to mach_task_self(),
+ reply 0x........]
269360 s390x: Fix addressing mode selection for compare-and-swap
333051 mmap of huge pages fails due to incorrect alignment
== 339163
Modified: trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
==============================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-darwin.h (original)
+++ trunk/coregrind/m_syswrap/priv_syswrap-darwin.h Mon May 11 14:19:48 2015
@@ -595,6 +595,7 @@
DECL_TEMPLATE(darwin, task_policy_set);
DECL_TEMPLATE(darwin, mach_ports_register);
DECL_TEMPLATE(darwin, mach_ports_lookup);
+DECL_TEMPLATE(darwin, task_info);
DECL_TEMPLATE(darwin, task_threads);
DECL_TEMPLATE(darwin, task_suspend);
DECL_TEMPLATE(darwin, task_resume);
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Mon May 11 14:19:48 2015
@@ -5869,6 +5869,44 @@
}
+PRE(task_info)
+{
+#pragma pack(4)
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ task_flavor_t flavor;
+ mach_msg_type_number_t task_info_outCnt;
+ } Request;
+#pragma pack()
+
+ Request *req = (Request *)ARG1;
+
+ PRINT("task_info(%s) flavor:%d", name_for_port(MACH_REMOTE), req->flavor);
+
+ AFTER = POST_FN(task_info);
+}
+
+POST(task_info)
+{
+#pragma pack(4)
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ mach_msg_type_number_t task_info_outCnt;
+ integer_t task_info_out[52];
+ } Reply;
+#pragma pack()
+
+ Reply *reply = (Reply *)ARG1;
+ if (!reply->RetCode) {
+ } else {
+ PRINT("mig return %d", reply->RetCode);
+ }
+}
+
+
PRE(task_threads)
{
#pragma pack(4)
@@ -7758,6 +7796,10 @@
CALL_PRE(mach_ports_lookup);
return;
+ case 3405:
+ CALL_PRE(task_info);
+ return;
+
case 3407:
CALL_PRE(task_suspend);
return;
|