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
(25) |
2
(25) |
3
(5) |
4
(13) |
|
5
(4) |
6
(8) |
7
(6) |
8
|
9
(10) |
10
(15) |
11
(9) |
|
12
(14) |
13
(10) |
14
(24) |
15
(41) |
16
(13) |
17
(9) |
18
(3) |
|
19
(10) |
20
(11) |
21
(28) |
22
(36) |
23
(52) |
24
(36) |
25
(12) |
|
26
(31) |
27
(27) |
28
(20) |
29
(15) |
30
(22) |
31
(17) |
|
|
From: <sv...@va...> - 2009-07-25 14:04:08
|
Author: bart
Date: 2009-07-25 15:03:53 +0100 (Sat, 25 Jul 2009)
New Revision: 10603
Log:
DRD is no longer considered experimental on Darwin.
Modified:
trunk/drd/drd_main.c
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2009-07-25 14:03:24 UTC (rev 10602)
+++ trunk/drd/drd_main.c 2009-07-25 14:03:53 UTC (rev 10603)
@@ -549,10 +549,8 @@
static void DRD_(post_clo_init)(void)
{
-#if defined(VGO_linux)
+#if defined(VGO_linux) || defined(VGO_darwin)
/* fine */
-#elif defined(VGO_darwin)
- VG_(printf)("\nWARNING: DRD support for Darwin is still considered as experimental.\n\n");
#else
VG_(printf)("\nWARNING: DRD has not yet been tested on this operating system.\n\n");
# endif
|
|
From: <sv...@va...> - 2009-07-25 14:03:43
|
Author: bart
Date: 2009-07-25 15:03:24 +0100 (Sat, 25 Jul 2009)
New Revision: 10602
Log:
Generalized some suppression patterns and added several new suppression patterns.
Modified:
trunk/darwin9-drd.supp
Modified: trunk/darwin9-drd.supp
===================================================================
--- trunk/darwin9-drd.supp 2009-07-25 13:57:43 UTC (rev 10601)
+++ trunk/darwin9-drd.supp 2009-07-25 14:03:24 UTC (rev 10602)
@@ -1,5 +1,5 @@
#
-# Suppressions for the dynamic loader.
+# Suppression patterns for dyld, the dynamic loader.
#
{
@@ -9,14 +9,6 @@
fun:_dyld_register_func_for_add_image
fun:__keymgr_initializer
fun:libSystem_initializer
- fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextE
- fun:_ZN4dyld24initializeMainExecutableEv
- fun:_ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_
- fun:_ZN13dyldbootstrap5startEPK11mach_headeriPPKcl
}
{
drd-darwin-dyld-2
@@ -25,14 +17,6 @@
fun:_dyld_register_func_for_remove_image
fun:__keymgr_initializer
fun:libSystem_initializer
- fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextE
- fun:_ZN4dyld24initializeMainExecutableEv
- fun:_ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_
- fun:_ZN13dyldbootstrap5startEPK11mach_headeriPPKcl
}
{
drd-darwin-dyld-3
@@ -40,35 +24,37 @@
fun:pthread_mutex_init
fun:_Z24dyldGlobalLockInitializev
fun:_dyld_initializer
- fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextE
- fun:_ZN4dyld24initializeMainExecutableEv
- fun:_ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_
- fun:_ZN13dyldbootstrap5startEPK11mach_headeriPPKcl
- fun:_dyld_start
}
{
drd-darwin-dyld-4
drd:ConflictingAccess
...
- fun:_ZN16ImageLoaderMachO16doBindLazySymbolEPmRKN11ImageLoader11LinkContextE
fun:_ZN4dyld14bindLazySymbolEPK11mach_headerPm
fun:stub_binding_helper_interface2
}
{
drd-darwin-dyld-5
drd:ConflictingAccess
- fun:_ZNK16ImageLoaderMachO18findExportedSymbolEPKcPKvbPPK11ImageLoader
+ ...
fun:_ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPKS0_
- fun:_ZN16ImageLoaderMachO16doBindLazySymbolEPmRKN11ImageLoader11LinkContextE
}
+{
+ drd-darwin-dyld-6
+ drd:ConflictingAccess
+ fun:_ZN4dyld8addImageEP11ImageLoader
+}
+{
+ drd-darwin-dyld-7
+ drd:ConflictingAccess
+ fun:_ZNK16ImageLoaderMachO18findExportedSymbolEPKcPKvbPPK11ImageLoader
+ fun:_ZNK11ImageLoader41findExportedSymbolInDependentImagesExceptEPKcPPKS_RS4_S4_S4_
+ fun:_ZNK11ImageLoader42findExportedSymbolInImageOrDependentImagesEPKcRKNS_11LinkContextEPPKS_
+ fun:dlsym
+}
#
-# Suppressions for Darwin's C library.
+# Suppression patterns for libc, Darwin's C library.
#
{
@@ -123,10 +109,37 @@
fun:__cxa_finalize
fun:exit
}
+{
+ drd-darwin-atexit-register
+ drd:ConflictingAccess
+ fun:atexit_register
+}
+{
+ drd-darwin-opendir
+ drd:ConflictingAccess
+ fun:telldir$UNIX2003
+ fun:__opendir2$UNIX2003
+ fun:opendir$UNIX2003
+}
+{
+ drd-darwin-readdir
+ drd:ConflictingAccess
+ fun:readdir
+}
+{
+ drd-darwin-closedir
+ drd:ConflictingAccess
+ fun:closedir$UNIX2003
+}
+{
+ drd:darwin-ptrace
+ drd:ConflictingAccess
+ fun:ptrace
+}
#
-# Suppressions for Darwin's POSIX threads implementation.
+# Suppression patterns for libpthread, Darwin's POSIX threads implementation.
#
{
@@ -186,3 +199,102 @@
fun:mig_dealloc_reply_port
fun:_pthread_free_pthread_onstack
}
+{
+ drd-darwin-pthread-mach-thread-np
+ drd:ConflictingAccess
+ ...
+ fun:pthread_mach_thread_np
+}
+{
+ drd-darwin-pthread-key-create
+ drd:ConflictingAccess
+ fun:pthread_key_create
+}
+
+
+#
+# Suppression patterns for libobjc.
+#
+
+{
+ drd-darwin-objc-1
+ drd:ConflictingAccess
+ fun:objc_msgSend
+}
+{
+ drd-darwin-objc-2
+ drd:ConflictingAccess
+ fun:_cache_fill
+ fun:log_and_fill_cache
+ fun:_class_lookupMethodAndLoadCache
+}
+{
+ drd-darwin-objc-3
+ drd:ConflictingAccess
+ fun:_cache_getMethod
+ fun:objc_msgSend
+}
+
+
+#
+# Suppression patterns for CoreFoundation.framework.
+#
+
+{
+ drd-darwin-corefoundation-framework-1
+ drd:ConflictingAccess
+ fun:-[NSLock lock]
+}
+{
+ drd-darwin-corefoundation-framework-2
+ drd:ConflictingAccess
+ ...
+ fun:-[NSObject release]
+}
+{
+ drd-darwin-corefoundation-framework-3
+ drd:ConflictingAccess
+ ...
+ fun:-[NSObject(NSObject) autorelease]
+}
+{
+ drd-darwin-corefoundation-framework-4
+ drd:ConflictingAccess
+ ...
+ fun:-[NSObject retain]
+}
+{
+ drd-darwin-corefoundation-framework-5
+ drd:ConflictingAccess
+ ...
+ fun:NSExtraRefCount
+}
+{
+ drd-darwin-corefoundation-framework-6
+ drd:ConflictingAccess
+ ...
+ fun:NSKVONotify
+}
+{
+ drd-darwin-corefoundation-framework-7
+ drd:ConflictingAccess
+ ...
+ fun:CFRunLoop*
+}
+{
+ drd-darwin-corefoundation-framework-8
+ drd:ConflictingAccess
+ fun:CFBag*
+}
+
+
+#
+# Suppression patterns for AudioToolbox.framework.
+#
+
+{
+ drd-darwin-audiotoolbox-framework-1
+ drd:ConflictingAccess
+ obj:*
+ fun:_Z26InitializeSystemSoundPortsv
+}
|
|
From: <sv...@va...> - 2009-07-25 13:57:56
|
Author: bart
Date: 2009-07-25 14:57:43 +0100 (Sat, 25 Jul 2009)
New Revision: 10601
Log:
Updated testing instructions.
Modified:
trunk/drd/Testing.txt
Modified: trunk/drd/Testing.txt
===================================================================
--- trunk/drd/Testing.txt 2009-07-25 13:28:24 UTC (rev 10600)
+++ trunk/drd/Testing.txt 2009-07-25 13:57:43 UTC (rev 10601)
@@ -40,13 +40,17 @@
50 for i == 10 with n == 200).
9. Test whether DRD works with standard KDE applications and whether it does
- not print any false positives. Test this both with KDE3 and KDE4.
+ not print any false positives. Test this both with KDE3 and KDE4 on Linux:
./vg-in-place --tool=drd --read-var-info=yes kate
./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes kate
./vg-in-place --tool=drd --read-var-info=yes --trace-children=yes knode
./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes --trace-children=yes knode
./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes /usr/bin/designer
+ and on Darwin:
+ ./vg-in-place --tool=drd --trace-fork-join=yes --show-confl-seg=no --gen-suppressions=all /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
+ ./vg-in-place --tool=drd --trace-fork-join=yes --show-confl-seg=no --gen-suppressions=all /Applications/Safari.app/Contents/MacOS/Safari
+
10. Test whether DRD works with standard GNOME applications. Expect
race reports triggered by ORBit_RootObject_duplicate() and after
having closed the GNOME terminal window:
|
|
From: John R. <jr...@bi...> - 2009-07-25 13:43:20
|
Nicholas Nethercote wrote: [snip] > It's a simplified version of a real problem, where a user implements a > custom allocator on top of malloc(). ... > I have a patch that tolerates overlaps such as these, where a custom > block falls entirely within a malloc()'d block. But there's a design > choice to be made. In such a case, what do we do with the malloc()'d > block? > > (1) Ignore it completely when leak checking > (2) Consider it when leak checking 0. Have a way for the custom allocator to say, "This interval will be used as an arena for custom allocation," and "This interval no longer will be used as such an arena." A custom allocator must tell memcheck these facts. If not then memcheck may adopt any policy at all, including random policy. 1. Overlap is allowed only for a custom arena and the blocks that it allocates. Arenas can nest. An arena can be cleared: all blocks free()d as a group in one operation without specifying each allocated block separately. 2. Each arena is considered to be its own root with respect to blocks that it allocates, and also each arena is considered to be an opaque allocated block within its nearest enclosing arena. Thus the leak report has a separate section for each arena, and an arena can be leaked within its nearest enclosing arena yet still contain its own non-leaked blocks. -- |
|
From: <sv...@va...> - 2009-07-25 13:28:36
|
Author: bart
Date: 2009-07-25 14:28:24 +0100 (Sat, 25 Jul 2009)
New Revision: 10600
Log:
Fixed an assertion failure that was triggered on Darwin by calling malloc_zone_realloc().
Modified:
trunk/drd/drd_malloc_wrappers.c
Modified: trunk/drd/drd_malloc_wrappers.c
===================================================================
--- trunk/drd/drd_malloc_wrappers.c 2009-07-25 11:16:51 UTC (rev 10599)
+++ trunk/drd/drd_malloc_wrappers.c 2009-07-25 13:28:24 UTC (rev 10600)
@@ -228,7 +228,8 @@
/* Free old memory. */
VG_(cli_free)(p_old);
- s_stop_using_mem_callback(mc->data, mc->size);
+ if (mc->size > 0)
+ s_stop_using_mem_callback(mc->data, mc->size);
VG_(HT_remove)(s_malloc_list, (UWord)p_old);
/* Update state information. */
|
|
From: Bart V. A. <bar...@gm...> - 2009-07-25 11:59:51
|
On Sat, Jul 25, 2009 at 12:09 AM, Greg Parker<gp...@ap...> wrote: > On Jul 24, 2009, at 4:28 AM, Bart Van Assche wrote: >> >> When running DRD's regression tests on Darwin, 63 out of 64 regression >> tests always pass and one regression test, rwlock_test, fails >> sometimes. If that test fails it is because DRD reported one or more >> conflicting memory loads triggered by line 35, the statement that >> reads s_counter protected by a reader lock. > > Darwin's pthread_rwlock_init() reads a value from the pthread_rwlock_t > struct before initializing anything. Valgrind doesn't like that. (They say > it's required for Unix compliance; I say it's a bug and the standard > requires no such thing.) With Nick's help I found the source code of the rwlock implementation: http://www.opensource.apple.com/source/Libc/Libc-498.1.7/pthreads/pthread_rwlock.c. The fact that pthread_rwlock_init() reads a value from the pthread_rwlock_t struct is indeed surprising -- this could cause initialization to be skipped for rwlock structures allocated on the stack. Since r10599 all DRD regression tests pass -- the regression test rwlock_test does no longer fail. Thanks for the help. I will now test DRD with larger applications. Bart. |
|
From: <sv...@va...> - 2009-07-25 11:17:08
|
Author: bart
Date: 2009-07-25 12:16:51 +0100 (Sat, 25 Jul 2009)
New Revision: 10599
Log:
DRD does now support sem_open() and sem_close().
Modified:
trunk/NEWS
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2009-07-25 11:15:03 UTC (rev 10598)
+++ trunk/NEWS 2009-07-25 11:16:51 UTC (rev 10599)
@@ -88,6 +88,7 @@
DRD thread ID), DRD does now identify threads via a single number (the DRD
thread ID). Furthermore "first observed at" information is now printed for
all error messages related to synchronization objects.
+ - Added support for named semaphores (sem_open() and sem_close()).
- Race conditions between pthread_barrier_wait() and
pthread_barrier_destroy() calls are now reported.
- Added support for memory pools through the macro's
|
|
From: <sv...@va...> - 2009-07-25 11:15:18
|
Author: bart
Date: 2009-07-25 12:15:03 +0100 (Sat, 25 Jul 2009)
New Revision: 10598
Log:
Fixed bug in DRD's rwlock implementation that caused the regression test called rwlock_test to fail sometimes on Darwin. The fact that this test only failed on Darwin and not on Linux implies that on Linux after unlocking an rwlock that was locked for writing there always happens a context switch to another thread waiting for acquiring the rwlock, and that this is not the case on Darwin.
Modified:
trunk/drd/drd_rwlock.c
Modified: trunk/drd/drd_rwlock.c
===================================================================
--- trunk/drd/drd_rwlock.c 2009-07-24 20:48:36 UTC (rev 10597)
+++ trunk/drd/drd_rwlock.c 2009-07-25 11:15:03 UTC (rev 10598)
@@ -43,8 +43,10 @@
UWord tid; // DrdThreadId.
UInt reader_nesting_count;
UInt writer_nesting_count;
- Segment* last_unlock_segment; // Segment of last unlock call by this thread.
- Bool last_lock_was_writer_lock;
+ // Segment of last unlock call by this thread that unlocked a writer lock.
+ Segment* latest_wrlocked_segment;
+ // Segment of last unlock call by this thread that unlocked a reader lock.
+ Segment* latest_rdlocked_segment;
};
@@ -151,8 +153,8 @@
q->tid = tid;
q->reader_nesting_count = 0;
q->writer_nesting_count = 0;
- q->last_unlock_segment = 0;
- q->last_lock_was_writer_lock = False;
+ q->latest_wrlocked_segment = 0;
+ q->latest_rdlocked_segment = 0;
VG_(OSetGen_Insert)(oset, q);
}
tl_assert(q);
@@ -174,10 +176,18 @@
VG_(OSetGen_ResetIter)(p->thread_info);
for ( ; (q = VG_(OSetGen_Next)(p->thread_info)) != 0; )
{
- if (q->tid != tid && (readers_too || q->last_lock_was_writer_lock))
+ if (q->tid != tid)
{
- DRD_(vc_combine)(&DRD_(g_threadinfo)[tid].last->vc,
- &q->last_unlock_segment->vc);
+ if (q->latest_wrlocked_segment)
+ {
+ DRD_(vc_combine)(&DRD_(g_threadinfo)[tid].last->vc,
+ &q->latest_wrlocked_segment->vc);
+ }
+ if (readers_too && q->latest_rdlocked_segment)
+ {
+ DRD_(vc_combine)(&DRD_(g_threadinfo)[tid].last->vc,
+ &q->latest_rdlocked_segment->vc);
+ }
}
}
DRD_(thread_update_conflict_set)(tid, &old_vc);
@@ -229,8 +239,10 @@
VG_(OSetGen_ResetIter)(p->thread_info);
for ( ; (q = VG_(OSetGen_Next)(p->thread_info)) != 0; )
{
- DRD_(sg_put)(q->last_unlock_segment);
+ DRD_(sg_put)(q->latest_wrlocked_segment);
+ DRD_(sg_put)(q->latest_rdlocked_segment);
}
+
VG_(OSetGen_Destroy)(p->thread_info);
}
@@ -243,9 +255,7 @@
tl_assert(offsetof(DrdClientobj, rwlock) == 0);
p = &(DRD_(clientobj_get)(rwlock, ClientRwlock)->rwlock);
if (p)
- {
return p;
- }
if (DRD_(clientobj_present)(rwlock, rwlock + 1))
{
@@ -382,7 +392,6 @@
q = DRD_(lookup_or_insert_node)(p->thread_info, drd_tid);
if (++q->reader_nesting_count == 1)
{
- q->last_lock_was_writer_lock = False;
DRD_(thread_new_segment)(drd_tid);
DRD_(s_rwlock_segment_creation_count)++;
DRD_(rwlock_combine_other_vc)(p, drd_tid, False);
@@ -413,9 +422,7 @@
}
if (p == 0)
- {
p = DRD_(rwlock_get_or_allocate)(rwlock);
- }
tl_assert(p);
@@ -459,7 +466,6 @@
DRD_(thread_get_running_tid)());
tl_assert(q->writer_nesting_count == 0);
q->writer_nesting_count++;
- q->last_lock_was_writer_lock = True;
tl_assert(q->writer_nesting_count == 1);
DRD_(thread_new_segment)(drd_tid);
DRD_(s_rwlock_segment_creation_count)++;
@@ -534,6 +540,17 @@
&HEI);
}
}
+ if (q->reader_nesting_count == 0 && q->writer_nesting_count == 0)
+ {
+ /*
+ * This pthread_rwlock_unlock() call really unlocks the rwlock. Save
+ * the current vector clock of the thread such that it is available
+ * when this rwlock is locked again.
+ */
+ DRD_(thread_get_latest_segment)(&q->latest_rdlocked_segment, drd_tid);
+ DRD_(thread_new_segment)(drd_tid);
+ DRD_(s_rwlock_segment_creation_count)++;
+ }
}
else if (q->writer_nesting_count > 0)
{
@@ -554,32 +571,30 @@
&HEI);
}
}
+ if (q->reader_nesting_count == 0 && q->writer_nesting_count == 0)
+ {
+ /*
+ * This pthread_rwlock_unlock() call really unlocks the rwlock. Save
+ * the current vector clock of the thread such that it is available
+ * when this rwlock is locked again.
+ */
+ DRD_(thread_get_latest_segment)(&q->latest_wrlocked_segment, drd_tid);
+ DRD_(thread_new_segment)(drd_tid);
+ DRD_(s_rwlock_segment_creation_count)++;
+ }
}
else
{
tl_assert(False);
}
-
- if (q->reader_nesting_count == 0 && q->writer_nesting_count == 0)
- {
- /* This pthread_rwlock_unlock() call really unlocks the rwlock. Save */
- /* the current vector clock of the thread such that it is available */
- /* when this rwlock is locked again. */
-
- DRD_(thread_get_latest_segment)(&q->last_unlock_segment, drd_tid);
- DRD_(thread_new_segment)(drd_tid);
- DRD_(s_rwlock_segment_creation_count)++;
- }
}
-/**
- * Call this function when thread tid stops to exist, such that the
- * "last owner" field can be cleared if it still refers to that thread.
- */
+/** Called when thread tid stops to exist. */
static void rwlock_delete_thread(struct rwlock_info* const p,
const DrdThreadId tid)
{
struct rwlock_thread_info* q;
+
if (DRD_(rwlock_is_locked_by)(p, tid))
{
RwlockErrInfo REI = { DRD_(thread_get_running_tid)(), p->a1 };
|
|
From: Bart V. A. <bar...@gm...> - 2009-07-25 07:58:05
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2009-07-25 02:15:57 EDT Ended at 2009-07-25 03:57:43 EDT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 433 tests, 45 stderr failures, 9 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell (stdout) none/tests/shell (stderr) none/tests/shell_valid1 (stderr) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 431 tests, 43 stderr failures, 9 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell (stdout) none/tests/shell (stderr) none/tests/shell_valid1 (stderr) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Jul 25 03:07:25 2009 --- new.short Sat Jul 25 03:57:43 2009 *************** *** 8,10 **** ! == 431 tests, 43 stderr failures, 9 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) --- 8,10 ---- ! == 433 tests, 45 stderr failures, 9 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) *************** *** 36,39 **** --- 36,41 ---- none/tests/shell_zerolength (stderr) + helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) + helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |
|
From: Bart V. A. <bar...@gm...> - 2009-07-25 05:11:17
|
On Fri, Jul 24, 2009 at 11:12 PM, Nicholas Nethercote <n.n...@gm...> wrote: > https://bugs.kde.org/show_bug.cgi?id=100628 concerns a program like this: > > #include <stdlib.h> > #include "valgrind.h" > > int main(void) > { > char* x; > > x = malloc(1000); > VALGRIND_MALLOCLIKE_BLOCK(x, /*szB*/ 16, /*rzB*/0, /*is_zeroed*/0); > VALGRIND_MALLOCLIKE_BLOCK(x+100, /*szB*/ 32, /*rzB*/0, /*is_zeroed*/0); > VALGRIND_MALLOCLIKE_BLOCK(x+200, /*szB*/ 64, /*rzB*/0, /*is_zeroed*/0); > VALGRIND_MALLOCLIKE_BLOCK(x+300, /*szB*/128, /*rzB*/0, /*is_zeroed*/0); > > return 0; > } > > It's a simplified version of a real problem, where a user implements a > custom allocator on top of malloc(). They use malloc() to allocate a > big chunk of memory, and then hand out pieces of it, using > MALLOCLIKE_BLOCK to mark those pieces as logically separate heap > blocks. Currently the leak checker barfs on it because it can't > handle overlapping heap blocks. > > I have a patch that tolerates overlaps such as these, where a custom > block falls entirely within a malloc()'d block. But there's a design > choice to be made. In such a case, what do we do with the malloc()'d > block? > > (1) Ignore it completely when leak checking > (2) Consider it when leak checking > > It's unclear to me which of these is preferable. (1) treats the > malloc() much as a mmap() or brk() would be treated, which is arguably > desirable, as many allocators are built on mmap() and/or brk() and so > treating malloc() in the same way makes some sense. But (2) involves > less special-casing, and is thus slightly easier to do than (1). > > Anyone have any preferences? My suggestion is to require that the user makes it clear to Valgrind that the memory allocated by the malloc() call in the example won't be used directly but will be handed out in pieces to the client program. Bart. |
|
From: Tom H. <th...@cy...> - 2009-07-25 02:47:42
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-07-25 03:05:05 BST Ended at 2009-07-25 03:47:25 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 516 tests, 2 stderr failures, 0 stdout failures, 0 post failures == helgrind/tests/hg03_inherit (stderr) helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 513 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Jul 25 03:26:25 2009 --- new.short Sat Jul 25 03:47:25 2009 *************** *** 8,10 **** ! == 513 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) --- 8,11 ---- ! == 516 tests, 2 stderr failures, 0 stdout failures, 0 post failures == ! helgrind/tests/hg03_inherit (stderr) helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Tom H. <th...@cy...> - 2009-07-25 02:31:07
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2009-07-25 03:10:06 BST Ended at 2009-07-25 03:30:49 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 523 tests, 2 stderr failures, 0 stdout failures, 0 post failures == helgrind/tests/hg03_inherit (stderr) helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 520 tests, 1 stderr failure, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Jul 25 03:20:34 2009 --- new.short Sat Jul 25 03:30:49 2009 *************** *** 8,11 **** ! == 520 tests, 1 stderr failure, 1 stdout failure, 0 post failures == ! none/tests/linux/mremap2 (stdout) helgrind/tests/tc06_two_races_xml (stderr) --- 8,11 ---- ! == 523 tests, 2 stderr failures, 0 stdout failures, 0 post failures == ! helgrind/tests/hg03_inherit (stderr) helgrind/tests/tc06_two_races_xml (stderr) |