You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(6) |
2
(3) |
3
(2) |
4
(1) |
5
(1) |
6
(6) |
7
(9) |
|
8
(8) |
9
(6) |
10
(13) |
11
(9) |
12
(12) |
13
(6) |
14
(1) |
|
15
(4) |
16
(8) |
17
(15) |
18
(7) |
19
(3) |
20
(11) |
21
(7) |
|
22
(26) |
23
(7) |
24
(4) |
25
(9) |
26
(10) |
27
(13) |
28
(6) |
|
29
(11) |
30
(6) |
31
(8) |
|
|
|
|
|
From: <sv...@va...> - 2010-08-29 16:59:56
|
Author: bart
Date: 2010-08-29 17:59:48 +0100 (Sun, 29 Aug 2010)
New Revision: 11308
Log:
Removed a recently added suppression pattern again.
Modified:
trunk/glibc-2.X-drd.supp
Modified: trunk/glibc-2.X-drd.supp
===================================================================
--- trunk/glibc-2.X-drd.supp 2010-08-29 16:22:04 UTC (rev 11307)
+++ trunk/glibc-2.X-drd.supp 2010-08-29 16:59:48 UTC (rev 11308)
@@ -8,15 +8,6 @@
drd:ConflictingAccess
obj:/lib*/ld-*.so
}
-{
- drd-ld
- drd:ConflictingAccess
- ...
- obj:/lib*/ld-*.so
- obj:/lib*/ld-*.so
- obj:/lib*/ld-*.so
- obj:/lib*/ld-*.so
-}
#
# Suppression patterns for libc.
|
|
From: <sv...@va...> - 2010-08-29 16:22:14
|
Author: bart
Date: 2010-08-29 17:22:04 +0100 (Sun, 29 Aug 2010)
New Revision: 11307
Log:
Removed ANNOTATE_HAPPENS_BEFORE/AFTER() usage restrictions.
Modified:
trunk/drd/drd_clientobj.h
trunk/drd/drd_hb.c
trunk/drd/tests/annotate_hb_err.stderr.exp
Modified: trunk/drd/drd_clientobj.h
===================================================================
--- trunk/drd/drd_clientobj.h 2010-08-29 16:20:54 UTC (rev 11306)
+++ trunk/drd/drd_clientobj.h 2010-08-29 16:22:04 UTC (rev 11307)
@@ -95,7 +95,6 @@
void (*delete_thread)(union drd_clientobj*, DrdThreadId);
ExeContext* first_observed_at;
OSet* oset; // Per-thread order annotation information.
- Bool done; // Whether happens-done has already been invoked.
};
struct semaphore_info
Modified: trunk/drd/drd_hb.c
===================================================================
--- trunk/drd/drd_hb.c 2010-08-29 16:20:54 UTC (rev 11306)
+++ trunk/drd/drd_hb.c 2010-08-29 16:22:04 UTC (rev 11307)
@@ -94,7 +94,6 @@
p->delete_thread = 0;
p->oset = VG_(OSetGen_Create)(0, 0, VG_(malloc), "drd.hb",
VG_(free));
- p->done = False;
}
/**
@@ -176,20 +175,6 @@
if (!p)
return;
- if (p->done)
- {
- GenericErrInfo gei = {
- .tid = DRD_(thread_get_running_tid)(),
- .addr = hb,
- };
- VG_(maybe_record_error)(VG_(get_running_tid)(),
- GenericErr,
- VG_(get_IP)(VG_(get_running_tid)()),
- "happens-before after happens-after",
- &gei);
- return;
- }
-
/* Allocate the per-thread data structure if necessary. */
q = VG_(OSetGen_Lookup)(p->oset, &word_tid);
if (!q)
@@ -215,7 +200,7 @@
struct hb_thread_info* q;
VectorClock old_vc;
- p = DRD_(hb_get)(hb);
+ p = DRD_(hb_get_or_allocate)(hb);
if (DRD_(s_trace_hb))
{
@@ -224,21 +209,8 @@
}
if (!p)
- {
- GenericErrInfo gei = {
- .tid = DRD_(thread_get_running_tid)(),
- .addr = hb,
- };
- VG_(maybe_record_error)(VG_(get_running_tid)(),
- GenericErr,
- VG_(get_IP)(VG_(get_running_tid)()),
- "missing happens-before annotation",
- &gei);
return;
- }
- p->done = True;
-
DRD_(thread_new_segment)(tid);
/*
Modified: trunk/drd/tests/annotate_hb_err.stderr.exp
===================================================================
--- trunk/drd/tests/annotate_hb_err.stderr.exp 2010-08-29 16:20:54 UTC (rev 11306)
+++ trunk/drd/tests/annotate_hb_err.stderr.exp 2010-08-29 16:22:04 UTC (rev 11307)
@@ -1,8 +1,4 @@
-missing happens-before annotation
- at 0x........: vgDrdCl_annotate_happens_after (drd.h:?)
- by 0x........: main (annotate_hb_err.c:?)
-
wrong type of synchronization object
at 0x........: vgDrdCl_annotate_happens_before (drd.h:?)
by 0x........: main (annotate_hb_err.c:?)
@@ -21,16 +17,9 @@
at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?)
by 0x........: main (annotate_hb_err.c:?)
order annotation 0x........ was first observed at:
- at 0x........: vgDrdCl_annotate_happens_before (drd.h:?)
+ at 0x........: vgDrdCl_annotate_happens_after (drd.h:?)
by 0x........: main (annotate_hb_err.c:?)
-happens-before after happens-after
- at 0x........: vgDrdCl_annotate_happens_before (drd.h:?)
- by 0x........: main (annotate_hb_err.c:?)
-order annotation 0x........ was first observed at:
- at 0x........: vgDrdCl_annotate_happens_before (drd.h:?)
- by 0x........: main (annotate_hb_err.c:?)
-
Done.
-ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
|
|
From: <sv...@va...> - 2010-08-29 16:21:02
|
Author: bart
Date: 2010-08-29 17:20:54 +0100 (Sun, 29 Aug 2010)
New Revision: 11306
Log:
DRD does now recognize Helgrind's start/stop tracking client requests too.
Modified:
trunk/drd/drd_clientreq.c
Modified: trunk/drd/drd_clientreq.c
===================================================================
--- trunk/drd/drd_clientreq.c 2010-08-29 16:19:45 UTC (rev 11305)
+++ trunk/drd/drd_clientreq.c 2010-08-29 16:20:54 UTC (rev 11306)
@@ -108,10 +108,14 @@
break;
case VG_USERREQ__DRD_START_SUPPRESSION:
+ /*_VG_USERREQ__HG_ARANGE_MAKE_UNTRACKED*/
+ case VG_USERREQ_TOOL_BASE('H','G') + 256 + 39:
DRD_(start_suppression)(arg[1], arg[1] + arg[2], "client");
break;
case VG_USERREQ__DRD_FINISH_SUPPRESSION:
+ /*_VG_USERREQ__HG_ARANGE_MAKE_TRACKED*/
+ case VG_USERREQ_TOOL_BASE('H','G') + 256 + 40:
DRD_(finish_suppression)(arg[1], arg[1] + arg[2]);
break;
|
|
From: <sv...@va...> - 2010-08-29 16:19:53
|
Author: bart
Date: 2010-08-29 17:19:45 +0100 (Sun, 29 Aug 2010)
New Revision: 11305
Log:
Added more suppression patterns.
Modified:
trunk/glibc-2.X-drd.supp
Modified: trunk/glibc-2.X-drd.supp
===================================================================
--- trunk/glibc-2.X-drd.supp 2010-08-29 15:30:16 UTC (rev 11304)
+++ trunk/glibc-2.X-drd.supp 2010-08-29 16:19:45 UTC (rev 11305)
@@ -8,6 +8,15 @@
drd:ConflictingAccess
obj:/lib*/ld-*.so
}
+{
+ drd-ld
+ drd:ConflictingAccess
+ ...
+ obj:/lib*/ld-*.so
+ obj:/lib*/ld-*.so
+ obj:/lib*/ld-*.so
+ obj:/lib*/ld-*.so
+}
#
# Suppression patterns for libc.
@@ -94,6 +103,11 @@
fun:pthread_detach
}
{
+ drd-libpthread-pthread_cancel_init
+ drd:ConflictingAccess
+ fun:pthread_cancel_init
+}
+{
drd-libpthread-_Unwind_ForcedUnwind
drd:ConflictingAccess
...
@@ -114,7 +128,6 @@
drd-libpthread-?
drd:ConflictingAccess
obj:/lib/libgcc_s.so.1
- obj:/lib/libpthread-2.11.2.so
}
{
drd-libpthread-nanosleep
|
|
From: <sv...@va...> - 2010-08-29 15:30:25
|
Author: bart
Date: 2010-08-29 16:30:16 +0100 (Sun, 29 Aug 2010)
New Revision: 11304
Log:
Don't trigger an assertion failure if len == 0.
Modified:
trunk/drd/drd_main.c
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2010-08-29 12:35:37 UTC (rev 11303)
+++ trunk/drd/drd_main.c 2010-08-29 15:30:16 UTC (rev 11304)
@@ -326,6 +326,9 @@
{
const Addr a2 = a1 + len;
+ if (len == 0)
+ return;
+
tl_assert(a1 < a2);
if (UNLIKELY(DRD_(any_address_is_traced)()))
|
|
From: <sv...@va...> - 2010-08-29 12:35:46
|
Author: sewardj Date: 2010-08-29 13:35:37 +0100 (Sun, 29 Aug 2010) New Revision: 11303 Log: Add test cases for v6 media instructions in both ARM and Thumb mode. (Donna Robinson, do...@va...). Added: trunk/none/tests/arm/v6media.c trunk/none/tests/arm/v6media.stderr.exp trunk/none/tests/arm/v6media.stdout.exp trunk/none/tests/arm/v6media.vgtest Modified: trunk/none/tests/arm/Makefile.am [... diff too large to include ...] |
|
From: <sv...@va...> - 2010-08-29 12:33:11
|
Author: sewardj Date: 2010-08-29 13:33:02 +0100 (Sun, 29 Aug 2010) New Revision: 2020 Log: Add support for v6 media instructions in both ARM and Thumb modes. (Donna Robinson, do...@va...) Modified: trunk/priv/guest_arm_helpers.c trunk/priv/guest_arm_toIR.c trunk/pub/libvex_guest_arm.h [... diff too large to include ...] |
|
From: <sv...@va...> - 2010-08-29 09:51:15
|
Author: bart
Date: 2010-08-29 10:51:06 +0100 (Sun, 29 Aug 2010)
New Revision: 11302
Log:
Source code cleanup.
Modified:
trunk/drd/drd_load_store.c
trunk/drd/drd_load_store.h
trunk/drd/drd_main.c
Modified: trunk/drd/drd_load_store.c
===================================================================
--- trunk/drd/drd_load_store.c 2010-08-29 09:19:07 UTC (rev 11301)
+++ trunk/drd/drd_load_store.c 2010-08-29 09:51:06 UTC (rev 11302)
@@ -114,12 +114,12 @@
}
}
-VG_REGPARM(2) void DRD_(trace_mem_load)(const Addr addr, const SizeT size)
+static VG_REGPARM(2) void drd_trace_mem_load(const Addr addr, const SizeT size)
{
return DRD_(trace_mem_access)(addr, size, eLoad);
}
-VG_REGPARM(2) void DRD_(trace_mem_store)(const Addr addr,const SizeT size)
+static VG_REGPARM(2) void drd_trace_mem_store(const Addr addr,const SizeT size)
{
return DRD_(trace_mem_access)(addr, size, eStore);
}
@@ -324,7 +324,7 @@
unsafeIRDirty_0_N(/*regparms*/2,
"drd_trace_load",
VG_(fnptr_to_fnentry)
- (DRD_(trace_mem_load)),
+ (drd_trace_mem_load),
mkIRExprVec_2(addr_expr,
mkIRExpr_HWord(size)))));
}
@@ -389,7 +389,7 @@
unsafeIRDirty_0_N(/*regparms*/2,
"drd_trace_store",
VG_(fnptr_to_fnentry)
- (DRD_(trace_mem_store)),
+ (drd_trace_mem_store),
mkIRExprVec_2(addr_expr,
mkIRExpr_HWord(size)))));
}
Modified: trunk/drd/drd_load_store.h
===================================================================
--- trunk/drd/drd_load_store.h 2010-08-29 09:19:07 UTC (rev 11301)
+++ trunk/drd/drd_load_store.h 2010-08-29 09:51:06 UTC (rev 11302)
@@ -40,8 +40,6 @@
void DRD_(set_check_stack_accesses)(const Bool c);
Bool DRD_(get_first_race_only)(void);
void DRD_(set_first_race_only)(const Bool fro);
-VG_REGPARM(2) void DRD_(trace_mem_load)(const Addr addr, const SizeT size);
-VG_REGPARM(2) void DRD_(trace_mem_store)(const Addr addr,const SizeT size);
IRSB* DRD_(instrument)(VgCallbackClosure* const closure,
IRSB* const bb_in,
VexGuestLayout* const layout,
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2010-08-29 09:19:07 UTC (rev 11301)
+++ trunk/drd/drd_main.c 2010-08-29 09:51:06 UTC (rev 11302)
@@ -329,24 +329,20 @@
tl_assert(a1 < a2);
if (UNLIKELY(DRD_(any_address_is_traced)()))
- {
DRD_(trace_mem_access)(a1, len, eEnd);
- }
if (!is_stack_mem && s_trace_alloc)
VG_(message)(Vg_UserMsg, "Stopped using memory range 0x%lx + %ld\n",
a1, len);
- if (! is_stack_mem || DRD_(get_check_stack_accesses)())
+ if (!is_stack_mem || DRD_(get_check_stack_accesses)())
{
DRD_(thread_stop_using_mem)(a1, a2, !is_stack_mem && s_free_is_write);
DRD_(clientobj_stop_using_mem)(a1, a2);
DRD_(suppression_stop_using_mem)(a1, a2);
}
- if (! is_stack_mem && s_free_is_write)
- {
- DRD_(trace_mem_store)(a1, len);
- }
+ if (!is_stack_mem && s_free_is_write)
+ DRD_(trace_store)(a1, len);
}
static __inline__
|
|
From: <sv...@va...> - 2010-08-29 09:19:15
|
Author: bart
Date: 2010-08-29 10:19:07 +0100 (Sun, 29 Aug 2010)
New Revision: 11301
Log:
Added command-line option --trace-alloc and disabled --free-is-write by default.
Modified:
trunk/drd/docs/drd-manual.xml
trunk/drd/drd_load_store.c
trunk/drd/drd_load_store.h
trunk/drd/drd_main.c
trunk/drd/drd_thread.c
trunk/drd/drd_thread.h
Modified: trunk/drd/docs/drd-manual.xml
===================================================================
--- trunk/drd/docs/drd-manual.xml 2010-08-29 09:15:19 UTC (rev 11300)
+++ trunk/drd/docs/drd-manual.xml 2010-08-29 09:19:07 UTC (rev 11301)
@@ -364,12 +364,12 @@
<varlistentry>
<term>
<option>
- <![CDATA[--free-is-write=<yes|no> [default: yes]]]>
+ <![CDATA[--free-is-write=<yes|no> [default: no]]]>
</option>
</term>
<listitem>
<para>
- Whether to report reading freed memory as a race. Helps to detect
+ Whether to report accessing freed memory as a race. Helps to detect
memory accesses that occur after memory has been freed but might cause
DRD to run slightly slower.
</para>
@@ -493,6 +493,17 @@
</varlistentry>
<varlistentry>
<term>
+ <option><![CDATA[--trace-alloc=<yes|no> [default: no]]]></option>
+ </term>
+ <listitem>
+ <para>
+ Trace all memory allocations and deallocations. May produce a huge
+ amount of output.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
<option><![CDATA[--trace-barrier=<yes|no> [default: no]]]></option>
</term>
<listitem>
Modified: trunk/drd/drd_load_store.c
===================================================================
--- trunk/drd/drd_load_store.c 2010-08-29 09:15:19 UTC (rev 11300)
+++ trunk/drd/drd_load_store.c 2010-08-29 09:19:07 UTC (rev 11301)
@@ -114,12 +114,12 @@
}
}
-static VG_REGPARM(2) void drd_trace_mem_load(const Addr addr, const SizeT size)
+VG_REGPARM(2) void DRD_(trace_mem_load)(const Addr addr, const SizeT size)
{
return DRD_(trace_mem_access)(addr, size, eLoad);
}
-static VG_REGPARM(2) void drd_trace_mem_store(const Addr addr,const SizeT size)
+VG_REGPARM(2) void DRD_(trace_mem_store)(const Addr addr,const SizeT size)
{
return DRD_(trace_mem_access)(addr, size, eStore);
}
@@ -324,7 +324,7 @@
unsafeIRDirty_0_N(/*regparms*/2,
"drd_trace_load",
VG_(fnptr_to_fnentry)
- (drd_trace_mem_load),
+ (DRD_(trace_mem_load)),
mkIRExprVec_2(addr_expr,
mkIRExpr_HWord(size)))));
}
@@ -389,7 +389,7 @@
unsafeIRDirty_0_N(/*regparms*/2,
"drd_trace_store",
VG_(fnptr_to_fnentry)
- (drd_trace_mem_store),
+ (DRD_(trace_mem_store)),
mkIRExprVec_2(addr_expr,
mkIRExpr_HWord(size)))));
}
Modified: trunk/drd/drd_load_store.h
===================================================================
--- trunk/drd/drd_load_store.h 2010-08-29 09:15:19 UTC (rev 11300)
+++ trunk/drd/drd_load_store.h 2010-08-29 09:19:07 UTC (rev 11301)
@@ -40,6 +40,8 @@
void DRD_(set_check_stack_accesses)(const Bool c);
Bool DRD_(get_first_race_only)(void);
void DRD_(set_first_race_only)(const Bool fro);
+VG_REGPARM(2) void DRD_(trace_mem_load)(const Addr addr, const SizeT size);
+VG_REGPARM(2) void DRD_(trace_mem_store)(const Addr addr,const SizeT size);
IRSB* DRD_(instrument)(VgCallbackClosure* const closure,
IRSB* const bb_in,
VexGuestLayout* const layout,
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2010-08-29 09:15:19 UTC (rev 11300)
+++ trunk/drd/drd_main.c 2010-08-29 09:19:07 UTC (rev 11301)
@@ -59,6 +59,7 @@
static Bool s_print_stats = False;
static Bool s_var_info = False;
static Bool s_show_stack_usage = False;
+static Bool s_trace_alloc = False;
/**
@@ -99,6 +100,7 @@
{}
else if VG_BOOL_CLO(arg, "--show-confl-seg", show_confl_seg) {}
else if VG_BOOL_CLO(arg, "--show-stack-usage", s_show_stack_usage) {}
+ else if VG_BOOL_CLO(arg, "--trace-alloc", s_trace_alloc) {}
else if VG_BOOL_CLO(arg, "--trace-barrier", trace_barrier) {}
else if VG_BOOL_CLO(arg, "--trace-clientobj", trace_clientobj) {}
else if VG_BOOL_CLO(arg, "--trace-cond", trace_cond) {}
@@ -186,7 +188,7 @@
" --first-race-only=yes|no Only report the first data race that occurs on\n"
" a memory location instead of all races [no].\n"
" --free-is-write=yes|no Whether to report races between freeing memory\n"
-" and subsequent accesses of that memory[yes].\n"
+" and subsequent accesses of that memory[no].\n"
" --report-signal-unlocked=yes|no Whether to report calls to\n"
" pthread_cond_signal() where the mutex associated\n"
" with the signal via pthread_cond_wait() is not\n"
@@ -206,6 +208,7 @@
" drd options for monitoring process behavior:\n"
" --trace-addr=<address> Trace all load and store activity for the.\n"
" specified address [off].\n"
+" --trace-alloc=yes|no Trace all memory allocations and deallocations\n"" [no].\n"
" --trace-barrier=yes|no Trace all barrier activity [no].\n"
" --trace-cond=yes|no Trace all condition variable activity [no].\n"
" --trace-fork-join=yes|no Trace all thread fork/join activity [no].\n"
@@ -282,10 +285,16 @@
}
static __inline__
-void drd_start_using_mem(const Addr a1, const SizeT len)
+void drd_start_using_mem(const Addr a1, const SizeT len,
+ const Bool is_stack_mem)
{
tl_assert(a1 < a1 + len);
+ if (!is_stack_mem && s_trace_alloc)
+ VG_(message)(Vg_UserMsg, "Started using memory range 0x%lx + %ld%s\n",
+ a1, len, DRD_(running_thread_inside_pthread_create)()
+ ? " (inside pthread_create())" : "");
+
if (UNLIKELY(DRD_(any_address_is_traced)()))
{
DRD_(trace_mem_access)(a1, len, eStart);
@@ -301,14 +310,14 @@
const SizeT len,
UInt ec_uniq)
{
- drd_start_using_mem(a1, len);
+ drd_start_using_mem(a1, len, False);
}
static void drd_start_using_mem_w_tid(const Addr a1,
const SizeT len,
ThreadId tid)
{
- drd_start_using_mem(a1, len);
+ drd_start_using_mem(a1, len, False);
}
static __inline__
@@ -323,15 +332,20 @@
{
DRD_(trace_mem_access)(a1, len, eEnd);
}
+
+ if (!is_stack_mem && s_trace_alloc)
+ VG_(message)(Vg_UserMsg, "Stopped using memory range 0x%lx + %ld\n",
+ a1, len);
+
if (! is_stack_mem || DRD_(get_check_stack_accesses)())
{
- DRD_(thread_stop_using_mem)(a1, a2);
+ DRD_(thread_stop_using_mem)(a1, a2, !is_stack_mem && s_free_is_write);
DRD_(clientobj_stop_using_mem)(a1, a2);
DRD_(suppression_stop_using_mem)(a1, a2);
}
if (! is_stack_mem && s_free_is_write)
{
- DRD_(trace_store)(a1, len);
+ DRD_(trace_mem_store)(a1, len);
}
}
@@ -349,7 +363,7 @@
{
const Bool is_stack_memory = DRD_(thread_address_on_any_stack)(a1);
drd_stop_using_mem(a1, len, is_stack_memory);
- drd_start_using_mem(a1, len);
+ drd_start_using_mem(a1, len, is_stack_memory);
}
/**
@@ -408,7 +422,7 @@
{
DRD_(thread_set_vg_running_tid)(VG_(get_running_tid)());
- drd_start_using_mem(a, len);
+ drd_start_using_mem(a, len, False);
DRD_(suppress_relocation_conflicts)(a, len);
}
@@ -422,7 +436,8 @@
DRD_(thread_set_stack_min)(DRD_(thread_get_running_tid)(),
a - VG_STACK_REDZONE_SZB);
drd_start_using_mem(a - VG_STACK_REDZONE_SZB,
- len + VG_STACK_REDZONE_SZB);
+ len + VG_STACK_REDZONE_SZB,
+ True);
}
/* Called by the core when the stack of a thread shrinks, to indicate that */
@@ -450,7 +465,7 @@
ThreadId tid)
{
DRD_(thread_set_vg_running_tid)(VG_(get_running_tid)());
- drd_start_using_mem(a, len);
+ drd_start_using_mem(a, len, True);
}
static void drd_stop_using_mem_stack_signal(Addr a, SizeT len)
Modified: trunk/drd/drd_thread.c
===================================================================
--- trunk/drd/drd_thread.c 2010-08-29 09:15:19 UTC (rev 11300)
+++ trunk/drd/drd_thread.c 2010-08-29 09:19:07 UTC (rev 11301)
@@ -1104,7 +1104,8 @@
* [ a1, a2 [, e.g. because of a call to free() or a stack pointer
* increase.
*/
-void DRD_(thread_stop_using_mem)(const Addr a1, const Addr a2)
+void DRD_(thread_stop_using_mem)(const Addr a1, const Addr a2,
+ const Bool dont_clear_access)
{
DrdThreadId other_user;
unsigned i;
@@ -1119,13 +1120,18 @@
if (other_user == DRD_INVALID_THREADID
&& i != DRD_(g_drd_running_tid))
{
- if (UNLIKELY(DRD_(bm_test_and_clear)(DRD_(sg_bm)(p), a1, a2)))
+ if (UNLIKELY((!dont_clear_access
+ && DRD_(bm_test_and_clear)(DRD_(sg_bm)(p), a1, a2))
+ || (dont_clear_access
+ && DRD_(bm_has_any_access)(DRD_(sg_bm)(p), a1, a2))
+ ))
{
other_user = i;
}
continue;
}
- DRD_(bm_clear)(DRD_(sg_bm)(p), a1, a2);
+ if (!dont_clear_access)
+ DRD_(bm_clear)(DRD_(sg_bm)(p), a1, a2);
}
}
Modified: trunk/drd/drd_thread.h
===================================================================
--- trunk/drd/drd_thread.h 2010-08-29 09:15:19 UTC (rev 11300)
+++ trunk/drd/drd_thread.h 2010-08-29 09:19:07 UTC (rev 11301)
@@ -165,7 +165,8 @@
void DRD_(thread_update_conflict_set)(const DrdThreadId tid,
const VectorClock* const old_vc);
-void DRD_(thread_stop_using_mem)(const Addr a1, const Addr a2);
+void DRD_(thread_stop_using_mem)(const Addr a1, const Addr a2,
+ const Bool dont_clear_access);
void DRD_(thread_set_record_loads)(const DrdThreadId tid, const Bool enabled);
void DRD_(thread_set_record_stores)(const DrdThreadId tid, const Bool enabled);
void DRD_(thread_print_all)(void);
|
|
From: <sv...@va...> - 2010-08-29 09:15:28
|
Author: bart
Date: 2010-08-29 10:15:19 +0100 (Sun, 29 Aug 2010)
New Revision: 11300
Log:
Added read_after_free regression test.
Added:
trunk/drd/tests/read_after_free.c
trunk/drd/tests/read_after_free.stderr.exp
trunk/drd/tests/read_after_free.vgtest
Modified:
trunk/drd/tests/
trunk/drd/tests/Makefile.am
Property changes on: trunk/drd/tests
___________________________________________________________________
Name: svn:ignore
- *.dSYM
*.stderr.diff*
*.stderr.out
*.stdout.diff*
*.stdout.out
.deps
annotate_barrier
annotate_hb_err
annotate_hb_race
annotate_ignore_rw
annotate_ignore_write
annotate_publish_hg
annotate_rwlock
annotate_smart_pointer
annotate_static
atomic_var
bar_bad
bar_trivial
boost_thread
bug-235681
circular_buffer
custom_alloc
drd_bitmap_test
fp_race
hg01_all_ok
hg02_deadlock
hg03_inherit
hg04_race
hg05_race2
hg06_readshared
hold_lock
linuxthreads_det
Makefile
Makefile.in
matinv
memory_allocation
monitor_example
new_delete
omp_matinv
omp_prime
omp_printf
pth_barrier
pth_barrier_race
pth_barrier_reinit
pth_broadcast
pth_cancel_locked
pth_cleanup_handler
pth_cond_race
pth_create_chain
pth_create_glibc_2_0
pth_detached
pth_detached_sem
pth_inconsistent_cond_wait
pth_mutex_reinit
pth_process_shared_mutex
pth_spinlock
pth_uninitialized_cond
qt4_atomic
qt4_mutex
qt4_rwlock
qt4_semaphore
recursive_mutex
rwlock_race
rwlock_test
rwlock_type_checking
sem_as_mutex
sem_open
sigalrm
tc01_simple_race
tc02_simple_tls
tc03_re_excl
tc04_free_lock
tc05_simple_race
tc06_two_races
tc07_hbl1
tc08_hbl2
tc09_bad_unlock
tc10_rec_lock
tc11_XCHG
tc12_rwl_trivial
tc13_laog1
tc15_laog_lockdel
tc16_byterace
tc17_sembar
tc18_semabuse
tc19_shadowmem
tc20_verifywrap
tc21_pthonce
tc22_exit_w_lock
tc23_bogus_condwait
tc24_nonzero_sem
thread_name
trylock
tsan_unittest
unit_bitmap
unit_vc
vg_regtest.tmp*
+ *.dSYM
*.stderr.diff*
*.stderr.out
*.stdout.diff*
*.stdout.out
.deps
annotate_barrier
annotate_hb_err
annotate_hb_race
annotate_ignore_rw
annotate_ignore_write
annotate_publish_hg
annotate_rwlock
annotate_smart_pointer
annotate_static
atomic_var
bar_bad
bar_trivial
boost_thread
bug-235681
circular_buffer
custom_alloc
drd_bitmap_test
fp_race
hg01_all_ok
hg02_deadlock
hg03_inherit
hg04_race
hg05_race2
hg06_readshared
hold_lock
linuxthreads_det
Makefile
Makefile.in
matinv
memory_allocation
monitor_example
new_delete
omp_matinv
omp_prime
omp_printf
pth_barrier
pth_barrier_race
pth_barrier_reinit
pth_broadcast
pth_cancel_locked
pth_cleanup_handler
pth_cond_race
pth_create_chain
pth_create_glibc_2_0
pth_detached
pth_detached_sem
pth_inconsistent_cond_wait
pth_mutex_reinit
pth_process_shared_mutex
pth_spinlock
pth_uninitialized_cond
qt4_atomic
qt4_mutex
qt4_rwlock
qt4_semaphore
read_after_free
recursive_mutex
rwlock_race
rwlock_test
rwlock_type_checking
sem_as_mutex
sem_open
sigalrm
tc01_simple_race
tc02_simple_tls
tc03_re_excl
tc04_free_lock
tc05_simple_race
tc06_two_races
tc07_hbl1
tc08_hbl2
tc09_bad_unlock
tc10_rec_lock
tc11_XCHG
tc12_rwl_trivial
tc13_laog1
tc15_laog_lockdel
tc16_byterace
tc17_sembar
tc18_semabuse
tc19_shadowmem
tc20_verifywrap
tc21_pthonce
tc22_exit_w_lock
tc23_bogus_condwait
tc24_nonzero_sem
thread_name
trylock
tsan_unittest
unit_bitmap
unit_vc
vg_regtest.tmp*
Modified: trunk/drd/tests/Makefile.am
===================================================================
--- trunk/drd/tests/Makefile.am 2010-08-29 07:20:30 UTC (rev 11299)
+++ trunk/drd/tests/Makefile.am 2010-08-29 09:15:19 UTC (rev 11300)
@@ -170,6 +170,8 @@
qt4_rwlock.vgtest \
qt4_semaphore.stderr.exp \
qt4_semaphore.vgtest \
+ read_after_free.stderr.exp \
+ read_after_free.vgtest \
recursive_mutex.stderr.exp-linux \
recursive_mutex.stderr.exp-darwin \
recursive_mutex.vgtest \
@@ -307,6 +309,7 @@
annotate_smart_pointer \
atomic_var \
circular_buffer \
+ read_after_free \
tsan_unittest
endif
Added: trunk/drd/tests/read_after_free.c
===================================================================
--- trunk/drd/tests/read_after_free.c (rev 0)
+++ trunk/drd/tests/read_after_free.c 2010-08-29 09:15:19 UTC (rev 11300)
@@ -0,0 +1,45 @@
+#define _GNU_SOURCE 1
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+static char* s_mem;
+static volatile int s_freed;
+
+static void* thread_func(void* arg)
+{
+ // Busy-wait until pthread_create() has finished.
+ while (s_freed == 0)
+ pthread_yield();
+ free(s_mem);
+ __sync_add_and_fetch(&s_freed, 1);
+ return NULL;
+}
+
+int main(int argc, char** argv)
+{
+ pthread_t tid;
+ int quiet;
+ char result;
+
+ quiet = argc > 1;
+
+ s_mem = malloc(10);
+ if (!quiet)
+ fprintf(stderr, "Pointer to allocated memory: %p\n", s_mem);
+ assert(s_mem);
+ pthread_create(&tid, NULL, thread_func, NULL);
+ __sync_add_and_fetch(&s_freed, 1);
+ // Busy-wait until the memory has been freed.
+ while (s_freed == 1)
+ pthread_yield();
+ // Read-after-free.
+ result = s_mem[0];
+ if (!quiet)
+ fprintf(stderr, "Read-after-free result: %d\n", result);
+ pthread_join(tid, NULL);
+ fprintf(stderr, "Done.\n");
+ return 0;
+}
Added: trunk/drd/tests/read_after_free.stderr.exp
===================================================================
--- trunk/drd/tests/read_after_free.stderr.exp (rev 0)
+++ trunk/drd/tests/read_after_free.stderr.exp 2010-08-29 09:15:19 UTC (rev 11300)
@@ -0,0 +1,8 @@
+
+Conflicting load by thread 1 at 0x........ size 1
+ at 0x........: main (read_after_free.c:?)
+Allocation context: unknown.
+
+Done.
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Added: trunk/drd/tests/read_after_free.vgtest
===================================================================
--- trunk/drd/tests/read_after_free.vgtest (rev 0)
+++ trunk/drd/tests/read_after_free.vgtest 2010-08-29 09:15:19 UTC (rev 11300)
@@ -0,0 +1,4 @@
+prereq: test -e read_after_free && ./supported_libpthread
+vgopts: --read-var-info=yes --check-stack-var=yes --free-is-write=yes --show-confl-seg=no
+prog: read_after_free
+args: -q
|
|
From: <sv...@va...> - 2010-08-29 07:20:40
|
Author: bart
Date: 2010-08-29 08:20:30 +0100 (Sun, 29 Aug 2010)
New Revision: 11299
Log:
Added new DRD command-line option --free-is-write and enabled it by default.
Modified:
trunk/drd/docs/drd-manual.xml
trunk/drd/drd_main.c
Modified: trunk/drd/docs/drd-manual.xml
===================================================================
--- trunk/drd/docs/drd-manual.xml 2010-08-27 16:13:41 UTC (rev 11298)
+++ trunk/drd/docs/drd-manual.xml 2010-08-29 07:20:30 UTC (rev 11299)
@@ -364,6 +364,20 @@
<varlistentry>
<term>
<option>
+ <![CDATA[--free-is-write=<yes|no> [default: yes]]]>
+ </option>
+ </term>
+ <listitem>
+ <para>
+ Whether to report reading freed memory as a race. Helps to detect
+ memory accesses that occur after memory has been freed but might cause
+ DRD to run slightly slower.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>
<![CDATA[--report-signal-unlocked=<yes|no> [default: yes]]]>
</option>
</term>
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2010-08-27 16:13:41 UTC (rev 11298)
+++ trunk/drd/drd_main.c 2010-08-29 07:20:30 UTC (rev 11299)
@@ -55,9 +55,10 @@
/* Local variables. */
-static Bool DRD_(s_print_stats) = False;
-static Bool DRD_(s_var_info) = False;
-static Bool DRD_(s_show_stack_usage) = False;
+static Bool s_free_is_write = False;
+static Bool s_print_stats = False;
+static Bool s_var_info = False;
+static Bool s_show_stack_usage = False;
/**
@@ -88,16 +89,16 @@
Char* trace_address = 0;
if VG_BOOL_CLO(arg, "--check-stack-var", check_stack_accesses) {}
- else if VG_BOOL_CLO(arg, "--drd-stats", DRD_(s_print_stats)) {}
+ else if VG_BOOL_CLO(arg, "--drd-stats", s_print_stats) {}
else if VG_BOOL_CLO(arg, "--first-race-only", first_race_only) {}
+ else if VG_BOOL_CLO(arg, "--free-is-write", s_free_is_write) {}
else if VG_BOOL_CLO(arg,"--report-signal-unlocked",report_signal_unlocked)
{}
else if VG_BOOL_CLO(arg, "--segment-merging", segment_merging) {}
else if VG_INT_CLO (arg, "--segment-merging-interval", segment_merge_interval)
{}
else if VG_BOOL_CLO(arg, "--show-confl-seg", show_confl_seg) {}
- else if VG_BOOL_CLO(arg, "--show-stack-usage",
- DRD_(s_show_stack_usage)) {}
+ else if VG_BOOL_CLO(arg, "--show-stack-usage", s_show_stack_usage) {}
else if VG_BOOL_CLO(arg, "--trace-barrier", trace_barrier) {}
else if VG_BOOL_CLO(arg, "--trace-clientobj", trace_clientobj) {}
else if VG_BOOL_CLO(arg, "--trace-cond", trace_cond) {}
@@ -110,7 +111,7 @@
else if VG_BOOL_CLO(arg, "--trace-segment", trace_segment) {}
else if VG_BOOL_CLO(arg, "--trace-semaphore", trace_semaphore) {}
else if VG_BOOL_CLO(arg, "--trace-suppr", trace_suppression) {}
- else if VG_BOOL_CLO(arg, "--var-info", DRD_(s_var_info)) {}
+ else if VG_BOOL_CLO(arg, "--var-info", s_var_info) {}
else if VG_INT_CLO (arg, "--exclusive-threshold", exclusive_threshold_ms) {}
else if VG_INT_CLO (arg, "--shared-threshold", shared_threshold_ms) {}
else if VG_STR_CLO (arg, "--trace-addr", trace_address) {}
@@ -184,6 +185,8 @@
" writer lock is held longer than the specified time (in milliseconds).\n"
" --first-race-only=yes|no Only report the first data race that occurs on\n"
" a memory location instead of all races [no].\n"
+" --free-is-write=yes|no Whether to report races between freeing memory\n"
+" and subsequent accesses of that memory[yes].\n"
" --report-signal-unlocked=yes|no Whether to report calls to\n"
" pthread_cond_signal() where the mutex associated\n"
" with the signal via pthread_cond_wait() is not\n"
@@ -326,6 +329,10 @@
DRD_(clientobj_stop_using_mem)(a1, a2);
DRD_(suppression_stop_using_mem)(a1, a2);
}
+ if (! is_stack_mem && s_free_is_write)
+ {
+ DRD_(trace_store)(a1, len);
+ }
}
static __inline__
@@ -512,7 +519,7 @@
? ""
: " (which is a detached thread)");
}
- if (DRD_(s_show_stack_usage))
+ if (s_show_stack_usage)
{
const SizeT stack_size = DRD_(thread_get_stack_size)(drd_tid);
const SizeT used_stack
@@ -551,7 +558,7 @@
VG_(printf)("\nWARNING: DRD has not yet been tested on this operating system.\n\n");
# endif
- if (DRD_(s_var_info))
+ if (s_var_info)
{
VG_(needs_var_info)();
}
@@ -572,7 +579,7 @@
"rerun with: -v\n");
}
- if (VG_(clo_stats) || DRD_(s_print_stats))
+ if (VG_(clo_stats) || s_print_stats)
{
ULong pu = DRD_(thread_get_update_conflict_set_count)();
ULong pu_seg_cr = DRD_(thread_get_update_conflict_set_new_sg_count)();
|