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) |
|
|
|
|
|
|
Author: florian
Date: Wed May 13 15:02:17 2015
New Revision: 15223
Log:
Replace NSegment::isCH with NSegment::whatsit which tells what this
segment is part of: heap, stack, break area. So it's a generalisation
of sorts.
This is handy occasionally and also improves the segment listing.
The change affects the mergeability of segments. Previously, the
SkAnonC segment that makes up the mapped part of the extensible client stack
could be merged with an adjacent SkAnonC segment. This is no longer the case.
And likewise for the SkAnonC segment that is the client break area.
I'm not unduly concerned. Even before this change it was possible for
two neighbouring SkAnonC segments to exist, namely, if one was part of the
client heap (isCH == 1) and the other was not (isCH == 0).
So it was never (well.... since r4789) true that segments were "maximally
merged".
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_addrinfo.c
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/ASPACEM_TWEAKS/include/pub_tool_aspacemgr.h
branches/ASPACEM_TWEAKS/memcheck/mc_leakcheck.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_addrinfo.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_addrinfo.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_addrinfo.c Wed May 13 15:02:17 2015
@@ -264,10 +264,7 @@
const NSegment *seg = VG_(am_find_nsegment) (a);
/* Special case to detect the brk data segment. */
- if (seg != NULL
- && seg->kind == SkAnonC
- && VG_(brk_limit) >= seg->start
- && VG_(brk_limit) <= seg->end+1) {
+ if (seg != NULL && seg->whatsit == WiClientBreak) {
/* Address a is in a Anon Client segment which contains
VG_(brk_limit). So, this segment is the brk data segment
as initimg-linux.c:setup_client_dataseg maps an anonymous
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Wed May 13 15:02:17 2015
@@ -436,7 +436,7 @@
(ULong)seg->start, (ULong)seg->end, len_buf,
seg->hasR ? 'r' : '-', seg->hasW ? 'w' : '-',
seg->hasX ? 'x' : '-', seg->hasT ? 'T' : '-',
- seg->isCH ? 'H' : '-',
+ seg->whatsit,
show_ShrinkMode(seg->smode),
seg->dev, seg->ino, seg->offset,
ML_(am_segname_get_seqnr)(seg->fnIdx), seg->fnIdx,
@@ -471,7 +471,7 @@
(ULong)seg->start, (ULong)seg->end, len_buf,
seg->hasR ? 'r' : '-', seg->hasW ? 'w' : '-',
seg->hasX ? 'x' : '-', seg->hasT ? 'T' : '-',
- seg->isCH ? 'H' : '-'
+ seg->whatsit
);
break;
@@ -484,7 +484,7 @@
(ULong)seg->start, (ULong)seg->end, len_buf,
seg->hasR ? 'r' : '-', seg->hasW ? 'w' : '-',
seg->hasX ? 'x' : '-', seg->hasT ? 'T' : '-',
- seg->isCH ? 'H' : '-',
+ seg->whatsit,
seg->dev, seg->ino, seg->offset,
ML_(am_segname_get_seqnr)(seg->fnIdx), seg->fnIdx
);
@@ -498,7 +498,7 @@
(ULong)seg->start, (ULong)seg->end, len_buf,
seg->hasR ? 'r' : '-', seg->hasW ? 'w' : '-',
seg->hasX ? 'x' : '-', seg->hasT ? 'T' : '-',
- seg->isCH ? 'H' : '-',
+ seg->whatsit,
show_ShrinkMode(seg->smode)
);
break;
@@ -610,25 +610,26 @@
s->smode == SmFixed
&& s->dev == 0 && s->ino == 0 && s->offset == 0 && s->fnIdx == -1
&& !s->hasR && !s->hasW && !s->hasX && !s->hasT
- && !s->isCH;
+ && s->whatsit == WiUnknown;
case SkAnonC: case SkAnonV: case SkShmC:
return
s->smode == SmFixed
&& s->dev == 0 && s->ino == 0 && s->offset == 0 && s->fnIdx == -1
- && (s->kind==SkAnonC ? True : !s->isCH);
+ && (s->kind==SkAnonC ? True : s->whatsit == WiUnknown);
case SkFileC: case SkFileV:
return
s->smode == SmFixed
&& ML_(am_sane_segname)(s->fnIdx)
- && !s->isCH;
+ && s->whatsit == WiUnknown;
case SkResvn:
return
s->dev == 0 && s->ino == 0 && s->offset == 0 && s->fnIdx == -1
&& !s->hasR && !s->hasW && !s->hasX && !s->hasT
- && !s->isCH;
+ && (s->whatsit == WiClientBreak || s->whatsit == WiClientStack ||
+ s->whatsit == WiUnknown);
default:
return False;
@@ -660,7 +661,7 @@
case SkAnonC: case SkAnonV:
if (s1->hasR == s2->hasR && s1->hasW == s2->hasW
- && s1->hasX == s2->hasX && s1->isCH == s2->isCH) {
+ && s1->hasX == s2->hasX && s1->whatsit == s2->whatsit) {
s1->end = s2->end;
s1->hasT |= s2->hasT;
return True;
@@ -1452,7 +1453,8 @@
seg->mode = 0;
seg->offset = 0;
seg->fnIdx = -1;
- seg->hasR = seg->hasW = seg->hasX = seg->hasT = seg->isCH = False;
+ seg->hasR = seg->hasW = seg->hasX = seg->hasT = False;
+ seg->whatsit = WiUnknown;
}
/* Make an NSegment which holds a reservation. */
@@ -2592,7 +2594,7 @@
Addr addr = sr_Res(res);
Int ix = find_nsegment_idx(addr);
- nsegments[ix].isCH = True;
+ nsegments[ix].whatsit = WiClientHeap;
}
return res;
}
@@ -2735,8 +2737,8 @@
falls entirely within a single free segment. The returned Bool
indicates whether the creation succeeded. */
-static Bool create_reservation (Addr start, SizeT length,
- ShrinkMode smode, SSizeT extra)
+static Bool create_reservation (Addr start, SizeT length, ShrinkMode smode,
+ SSizeT extra, WhatsIt whatsit)
{
Int startI, endI;
NSegment seg;
@@ -2780,6 +2782,8 @@
reservation. */
seg.end = end1;
seg.smode = smode;
+ seg.whatsit = whatsit;
+
add_segment( &seg );
AM_SANITY_CHECK;
@@ -2931,7 +2935,8 @@
/* Try to create the data seg and associated reservation where
BASE says. */
- ok = create_reservation(resvn_start, resvn_size, SmLower, anon_size);
+ ok = create_reservation(resvn_start, resvn_size, SmLower, anon_size,
+ WiClientBreak);
if (!ok) {
/* Hmm, that didn't work. Well, let aspacem suggest an address
@@ -2940,7 +2945,8 @@
( 0/*floating*/, anon_size + resvn_size, &ok );
if (ok) {
resvn_start = anon_start + anon_size;
- ok = create_reservation(resvn_start, resvn_size, SmLower, anon_size);
+ ok = create_reservation(resvn_start, resvn_size, SmLower, anon_size,
+ WiClientBreak);
}
}
@@ -2949,7 +2955,12 @@
if (!ok)
return VG_(mk_SysRes_Error)( VKI_ENOMEM );
- return VG_(am_mmap_anon_fixed_client)( anon_start, anon_size, prot );
+ SysRes sres = VG_(am_mmap_anon_fixed_client)( anon_start, anon_size, prot );
+ if (! sr_isError(sres)) {
+ NSegment *seg = nsegments + find_nsegment_idx(sr_Res(sres));
+ seg->whatsit = WiClientBreak;
+ }
+ return sres;
}
/* Resize the client brk segment from OLDBRK to NEWBRK. Return an error if
@@ -3044,9 +3055,16 @@
/* Create a shrinkable reservation followed by an anonymous
segment. Together these constitute a growdown stack. */
- ok = create_reservation(resvn_start, resvn_size, SmUpper, anon_size);
- if (ok)
- return VG_(am_mmap_anon_fixed_client)( anon_start, anon_size, prot );
+ ok = create_reservation(resvn_start, resvn_size, SmUpper, anon_size,
+ WiClientStack);
+ if (ok) {
+ SysRes sres = VG_(am_mmap_anon_fixed_client)(anon_start, anon_size, prot);
+ if (! sr_isError(sres)) {
+ NSegment *seg = nsegments + find_nsegment_idx(sr_Res(sres));
+ seg->whatsit = WiClientStack;
+ }
+ return sres;
+ }
return VG_(mk_SysRes_Error)( VKI_ENOMEM );
}
@@ -3066,11 +3084,9 @@
const NSegment *seg = VG_(am_find_nsegment)(addr);
aspacem_assert(seg != NULL);
- /* TODO: the test "seg->kind == SkAnonC" is really inadequate,
- because although it tests whether the segment is mapped
- _somehow_, it doesn't check that it has the right permissions
- (r,w, maybe x) ? */
if (seg->kind == SkAnonC) {
+ /* Ought to be the extensible stack segment */
+ aspacem_assert(seg->whatsit == WiClientStack);
/* ADDR is already mapped. Nothing to do. */
*new_stack_base = seg->start; // not really "new" :)
return sres;
Modified: branches/ASPACEM_TWEAKS/include/pub_tool_aspacemgr.h
==============================================================================
--- branches/ASPACEM_TWEAKS/include/pub_tool_aspacemgr.h (original)
+++ branches/ASPACEM_TWEAKS/include/pub_tool_aspacemgr.h Wed May 13 15:02:17 2015
@@ -59,6 +59,17 @@
}
ShrinkMode;
+/* Describes what this segment is being part of. Encoding was chosen
+ to simplify printing. */
+typedef
+ enum {
+ WiClientHeap = 'H', // SkAnonC ONLY
+ WiClientStack = 'S', // SkAnonC and SkResvn ONLY
+ WiClientBreak = 'B', // SkAnonC and SkResvn ONLY
+ WiUnknown = '-'
+ }
+ WhatsIt;
+
/* Describes a segment. Invariants:
kind == SkFree:
@@ -111,7 +122,8 @@
Bool hasX;
Bool hasT; // True --> translations have (or MAY have)
// been taken from this segment
- Bool isCH; // True --> is client heap (SkAnonC ONLY)
+ /* Identifies what this segment is part of */
+ WhatsIt whatsit;
}
NSegment;
Modified: branches/ASPACEM_TWEAKS/memcheck/mc_leakcheck.c
==============================================================================
--- branches/ASPACEM_TWEAKS/memcheck/mc_leakcheck.c (original)
+++ branches/ASPACEM_TWEAKS/memcheck/mc_leakcheck.c Wed May 13 15:02:17 2015
@@ -1629,7 +1629,7 @@
seg->kind == SkShmC);
if (!(seg->hasR && seg->hasW)) continue;
- if (seg->isCH) continue;
+ if (seg->whatsit == WiClientHeap) continue;
// Don't poke around in device segments as this may cause
// hangs. Include /dev/zero just in case someone allocated
|
|
From: Ivo R. <iv...@iv...> - 2015-05-13 12:46:07
|
Dear developers, Please could you shed some light on why it is not allowed to return Ity_I1 from a clean helper (CCall). There is an explicit check in ir_defs.c which barfs: "Iex.CCall.retty: cannot return :: Ity_I1" I would like to use the return value from a clean helper as the guard condition for IRStmt_Exit. This requires an IRExpr of type Ity_I1. Thank you for any insights, I. |
|
From: <sv...@va...> - 2015-05-13 08:12:04
|
Author: florian
Date: Wed May 13 09:11:56 2015
New Revision: 15222
Log:
Function is_plausible_guest_addr should also consider SkShmC
segments.
Modified:
trunk/coregrind/m_redir.c
Modified: trunk/coregrind/m_redir.c
==============================================================================
--- trunk/coregrind/m_redir.c (original)
+++ trunk/coregrind/m_redir.c Wed May 13 09:11:56 2015
@@ -1537,7 +1537,8 @@
{
NSegment const* seg = VG_(am_find_nsegment)(a);
return seg != NULL
- && (seg->kind == SkAnonC || seg->kind == SkFileC)
+ && (seg->kind == SkAnonC || seg->kind == SkFileC ||
+ seg->kind == SkShmC)
&& (seg->hasX || seg->hasR); /* crude x86-specific hack */
}
|
Author: florian
Date: Tue May 12 22:52:08 2015
New Revision: 15221
Log:
In functions VG_(am_relocate_nooverlap_client) and VG_(am_extend_map_client)
need to allow SkShmC segments, too.
Added:
trunk/none/tests/linux/mremap5.c
trunk/none/tests/linux/mremap5.stderr.exp
trunk/none/tests/linux/mremap5.vgtest
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/none/tests/linux/ (props changed)
trunk/none/tests/linux/Makefile.am
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Tue May 12 22:52:08 2015
@@ -2901,7 +2901,8 @@
NSegment *seg = nsegments + ix;
- aspacem_assert(seg->kind == SkFileC || seg->kind == SkAnonC);
+ aspacem_assert(seg->kind == SkFileC || seg->kind == SkAnonC ||
+ seg->kind == SkShmC);
aspacem_assert(delta > 0 && VG_IS_PAGE_ALIGNED(delta)) ;
xStart = seg->end+1;
@@ -2979,7 +2980,8 @@
if (iLo != iHi)
return False;
- if (nsegments[iLo].kind != SkFileC && nsegments[iLo].kind != SkAnonC)
+ if (nsegments[iLo].kind != SkFileC && nsegments[iLo].kind != SkAnonC &&
+ nsegments[iLo].kind != SkShmC)
return False;
sres = ML_(am_do_relocate_nooverlap_mapping_NO_NOTIFY)
Modified: trunk/none/tests/linux/Makefile.am
==============================================================================
--- trunk/none/tests/linux/Makefile.am (original)
+++ trunk/none/tests/linux/Makefile.am Tue May 12 22:52:08 2015
@@ -12,6 +12,7 @@
mremap2.stderr.exp mremap2.stdout.exp mremap2.vgtest \
mremap3.stderr.exp mremap3.stdout.exp mremap3.vgtest \
mremap4.stderr.exp mremap4.vgtest \
+ mremap5.stderr.exp mremap5.vgtest \
pthread-stack.stderr.exp pthread-stack.vgtest \
stack-overflow.stderr.exp stack-overflow.vgtest
@@ -23,6 +24,7 @@
mremap2 \
mremap3 \
mremap4 \
+ mremap5 \
pthread-stack \
stack-overflow
Added: trunk/none/tests/linux/mremap5.c
==============================================================================
--- trunk/none/tests/linux/mremap5.c (added)
+++ trunk/none/tests/linux/mremap5.c Tue May 12 22:52:08 2015
@@ -0,0 +1,23 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+
+int main()
+{
+ int shmid = shmget(IPC_PRIVATE, 100 * 4096,
+ IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR);
+ assert(shmid != -1);
+
+ void *addr = shmat(shmid, NULL, 0);
+ assert(addr != (void *)-1);
+
+ addr = mremap(addr, 100 * 4096, 400 * 4096, MREMAP_MAYMOVE);
+ assert(addr != (void *)-1);
+
+ return 0;
+}
Added: trunk/none/tests/linux/mremap5.stderr.exp
==============================================================================
(empty)
Added: trunk/none/tests/linux/mremap5.vgtest
==============================================================================
--- trunk/none/tests/linux/mremap5.vgtest (added)
+++ trunk/none/tests/linux/mremap5.vgtest Tue May 12 22:52:08 2015
@@ -0,0 +1,2 @@
+prog: mremap5
+vgopts: -q
|
|
From: <sv...@va...> - 2015-05-12 21:44:55
|
Author: florian
Date: Tue May 12 22:44:48 2015
New Revision: 15220
Log:
Get prototype from system header.
Modified:
trunk/none/tests/linux/mremap4.c
Modified: trunk/none/tests/linux/mremap4.c
==============================================================================
--- trunk/none/tests/linux/mremap4.c (original)
+++ trunk/none/tests/linux/mremap4.c Tue May 12 22:44:48 2015
@@ -1,12 +1,11 @@
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
-
-
-extern void *mremap(void *, size_t, size_t, int, ...);
+#include <sys/mman.h>
int main()
{
|
Author: florian
Date: Tue May 12 22:19:25 2015
New Revision: 15219
Log:
Fix bug in do_mremap. Also need to allow SkShmC segments.
Added:
trunk/none/tests/linux/mremap4.c
trunk/none/tests/linux/mremap4.stderr.exp
trunk/none/tests/linux/mremap4.vgtest
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/none/tests/linux/ (props changed)
trunk/none/tests/linux/Makefile.am
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue May 12 22:19:25 2015
@@ -182,6 +182,7 @@
n-i-bz Fix compilation on distros with glibc < 2.5
n-i-bz (vex 3098) Avoid generation of Neon insns on non-Neon hosts
n-i-bz Enable rt_sigpending syscall on ppc64 linux.
+n-i-bz mremap did not work properly on shared memory
Release 3.10.1 (25 November 2014)
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c Tue May 12 22:19:25 2015
@@ -328,7 +328,8 @@
old_seg = VG_(am_find_nsegment)( old_addr );
if (old_addr < old_seg->start || old_addr+old_len-1 > old_seg->end)
goto eINVAL;
- if (old_seg->kind != SkAnonC && old_seg->kind != SkFileC)
+ if (old_seg->kind != SkAnonC && old_seg->kind != SkFileC &&
+ old_seg->kind != SkShmC)
goto eINVAL;
vg_assert(old_len > 0);
Modified: trunk/none/tests/linux/Makefile.am
==============================================================================
--- trunk/none/tests/linux/Makefile.am (original)
+++ trunk/none/tests/linux/Makefile.am Tue May 12 22:19:25 2015
@@ -11,6 +11,7 @@
mremap.vgtest \
mremap2.stderr.exp mremap2.stdout.exp mremap2.vgtest \
mremap3.stderr.exp mremap3.stdout.exp mremap3.vgtest \
+ mremap4.stderr.exp mremap4.vgtest \
pthread-stack.stderr.exp pthread-stack.vgtest \
stack-overflow.stderr.exp stack-overflow.vgtest
@@ -21,6 +22,7 @@
mremap \
mremap2 \
mremap3 \
+ mremap4 \
pthread-stack \
stack-overflow
Added: trunk/none/tests/linux/mremap4.c
==============================================================================
--- trunk/none/tests/linux/mremap4.c (added)
+++ trunk/none/tests/linux/mremap4.c Tue May 12 22:19:25 2015
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/stat.h>
+
+
+extern void *mremap(void *, size_t, size_t, int, ...);
+
+int main()
+{
+ int shmid = shmget(IPC_PRIVATE, 100 * 4096,
+ IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR);
+ assert(shmid != -1);
+
+ void *addr = shmat(shmid, NULL, 0);
+ assert(addr != (void *)-1);
+
+ addr = mremap(addr, 100 * 4096, 40 * 4096, 0);
+ assert(addr != (void *)-1);
+
+ return 0;
+}
Added: trunk/none/tests/linux/mremap4.stderr.exp
==============================================================================
(empty)
Added: trunk/none/tests/linux/mremap4.vgtest
==============================================================================
--- trunk/none/tests/linux/mremap4.vgtest (added)
+++ trunk/none/tests/linux/mremap4.vgtest Tue May 12 22:19:25 2015
@@ -0,0 +1,2 @@
+prog: mremap4
+vgopts: -q
|
On 12.05.2015 21:11, Philippe Waroquiers wrote: > On Tue, 2015-05-12 at 18:22 +0000, sv...@va... wrote: > >> + The KIND parameter tells what kind of ADDR is allowed: >> + 'M' ADDR must be mapped >> + 'U' ADDR must be unmapped >> + '*' ADDR can be mapped or unmapped >> +*/ >> +Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr, HChar kind ) > Any reason why an HChar is used, rather than the classical enum ? > (which is usually more readable?) I felt that the encoding characters were good enough and it wasn't worth inventing a new type and thinking about good enumerator names. Florian |
On Tue, 2015-05-12 at 18:22 +0000, sv...@va... wrote: > + The KIND parameter tells what kind of ADDR is allowed: > + 'M' ADDR must be mapped > + 'U' ADDR must be unmapped > + '*' ADDR can be mapped or unmapped > +*/ > +Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr, HChar kind ) Any reason why an HChar is used, rather than the classical enum ? (which is usually more readable?) |
Author: florian
Date: Tue May 12 19:22:17 2015
New Revision: 15218
Log:
Give VG_(am_addr_is_in_extensible_client_stack) an additional
parameter that allows to select whether mapped and/or unmapped
addresses should be considered.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-common.c
branches/ASPACEM_TWEAKS/coregrind/m_signals.c
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-main.c
branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Tue May 12 19:22:17 2015
@@ -1271,8 +1271,13 @@
extensible client stack segment. Return true if
(1) ADDR is located in an already mapped stack segment, OR
(2) ADDR is located in a reservation segment into which an abutting SkAnonC
- segment can be extended. */
-Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr )
+ segment can be extended.
+ The KIND parameter tells what kind of ADDR is allowed:
+ 'M' ADDR must be mapped
+ 'U' ADDR must be unmapped
+ '*' ADDR can be mapped or unmapped
+*/
+Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr, HChar kind )
{
const NSegment *seg = nsegments + find_nsegment_idx(addr);
@@ -1285,6 +1290,7 @@
return False;
case SkResvn: {
+ if (kind == 'M') return False;
if (seg->smode != SmUpper) return False;
/* If the the abutting segment towards higher addresses is an SkAnonC
segment, then ADDR is a future stack pointer. */
@@ -1298,6 +1304,7 @@
case SkAnonC: {
/* If the abutting segment towards lower addresses is an SkResvn
segment, then ADDR is a stack pointer into mapped memory. */
+ if (kind == 'U') return False;
const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ False);
if (next == NULL || next->kind != SkResvn || next->smode != SmUpper)
return False;
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-common.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-common.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-common.c Tue May 12 19:22:17 2015
@@ -64,7 +64,7 @@
/* If the sigframe is allocated on an alternate stack, then we cannot
extend that stack. Nothing to do here. */
stackseg = VG_(am_find_nsegment)(addr);
- } else if (VG_(am_addr_is_in_extensible_client_stack)(addr)) {
+ } else if (VG_(am_addr_is_in_extensible_client_stack)(addr, '*')) {
if (VG_(extend_stack)(tid, addr)) {
stackseg = VG_(am_find_nsegment)(addr);
if (0 && stackseg)
Modified: branches/ASPACEM_TWEAKS/coregrind/m_signals.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_signals.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_signals.c Tue May 12 19:22:17 2015
@@ -1736,7 +1736,7 @@
if (tid == 1) { // main thread
Addr esp = VG_(get_SP)(tid);
Addr base = VG_PGROUNDDN(esp - VG_STACK_REDZONE_SZB);
- if (VG_(am_addr_is_in_extensible_client_stack)(base) &&
+ if (VG_(am_addr_is_in_extensible_client_stack)(base, '*') &&
VG_(extend_stack)(tid, base)) {
if (VG_(clo_trace_signals))
VG_(dmsg)(" -> extended stack base to %#lx\n",
@@ -2407,7 +2407,7 @@
{
Addr fault;
Addr esp;
- NSegment const *seg, *seg_next;
+ NSegment const *seg;
if (info->si_signo != VKI_SIGSEGV)
return False;
@@ -2415,8 +2415,6 @@
fault = (Addr)info->VKI_SIGINFO_si_addr;
esp = VG_(get_SP)(tid);
seg = VG_(am_find_nsegment)(fault);
- seg_next = seg ? VG_(am_next_nsegment)( seg, True/*fwds*/ )
- : NULL;
if (VG_(clo_trace_signals)) {
if (seg == NULL)
@@ -2430,11 +2428,7 @@
}
if (info->si_code == VKI_SEGV_MAPERR
- && seg
- && seg->kind == SkResvn
- && seg->smode == SmUpper
- && seg_next
- && seg_next->kind == SkAnonC
+ && VG_(am_addr_is_in_extensible_client_stack)(fault, 'U')
&& fault >= fault_mask(esp - VG_STACK_REDZONE_SZB)) {
/* If the fault address is above esp but below the current known
stack segment base, and it was a fault because there was
@@ -2442,7 +2436,7 @@
then extend the stack segment.
*/
Addr base = VG_PGROUNDDN(esp - VG_STACK_REDZONE_SZB);
- if (VG_(am_addr_is_in_extensible_client_stack)(base) &&
+ if (VG_(am_addr_is_in_extensible_client_stack)(base, '*') &&
VG_(extend_stack)(tid, base)) {
if (VG_(clo_trace_signals))
VG_(dmsg)(" -> extended stack base to %#lx\n",
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 Tue May 12 19:22:17 2015
@@ -3661,16 +3661,8 @@
vg_assert(grows == VKI_PROT_GROWSDOWN);
- NSegment const *aseg = VG_(am_find_nsegment)(ARG1);
- NSegment const *rseg;
-
- vg_assert(aseg);
-
- rseg = VG_(am_next_nsegment)( aseg, False/*backwards*/ );
- if (rseg &&
- rseg->kind == SkResvn &&
- rseg->smode == SmUpper &&
- rseg->end+1 == aseg->start) {
+ if (VG_(am_addr_is_in_extensible_client_stack)(ARG1, 'M')) {
+ const NSegment *aseg = VG_(am_find_nsegment)(ARG1);
Addr end = ARG1 + ARG2;
ARG1 = aseg->start;
ARG2 = end - aseg->start;
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-main.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-main.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-main.c Tue May 12 19:22:17 2015
@@ -1550,7 +1550,7 @@
So the approximation we're taking here is to extend the stack only
if the client stack pointer does not look bogus. */
- if (VG_(am_addr_is_in_extensible_client_stack)(stackMin))
+ if (VG_(am_addr_is_in_extensible_client_stack)(stackMin, '*'))
VG_(extend_stack)( tid, stackMin );
}
# endif
Modified: branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h (original)
+++ branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h Tue May 12 19:22:17 2015
@@ -90,7 +90,7 @@
/* Check whether ADDR looks like an address or address-to-be located in an
extensible client stack segment. */
-extern Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr );
+extern Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr, HChar kind );
/* Trivial fn: return the total amount of space in anonymous mappings,
both for V and the client. Is used for printing stats in
|
|
From: <sv...@va...> - 2015-05-12 14:25:51
|
Author: rhyskidd
Date: Tue May 12 15:25:43 2015
New Revision: 15217
Log:
Allow suppression on OS X 10.10 in libSystem_initializer
Modified:
trunk/darwin14.supp
Modified: trunk/darwin14.supp
==============================================================================
--- trunk/darwin14.supp (original)
+++ trunk/darwin14.supp Tue May 12 15:25:43 2015
@@ -77,15 +77,15 @@
...
}
-#{
-# OSX1010:8-Leak
-# Memcheck:Leak
-# match-leak-kinds: indirect
-# fun:?alloc
-# ...
-# fun:libSystem_initializer
-# ...
-#}
+{
+ OSX1010:8-Leak
+ Memcheck:Leak
+ match-leak-kinds: definite
+ fun:?alloc
+ ...
+ fun:libSystem_initializer
+ ...
+}
{
OSX1010:9-Leak
|
|
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) |