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
(2) |
2
(9) |
3
(11) |
4
(12) |
5
(6) |
|
6
|
7
|
8
(3) |
9
(10) |
10
(18) |
11
(10) |
12
(5) |
|
13
(4) |
14
(40) |
15
(12) |
16
(8) |
17
(9) |
18
(6) |
19
|
|
20
|
21
|
22
|
23
(4) |
24
(6) |
25
(6) |
26
(1) |
|
27
(3) |
28
(10) |
|
|
|
|
|
|
From: <sv...@va...> - 2011-02-09 14:21:53
|
Author: sewardj
Date: 2011-02-09 14:21:45 +0000 (Wed, 09 Feb 2011)
New Revision: 2087
Log:
Handle moves from TPIDRURO to integer registers in Thumb mode.
Fixes #263877. (Jani Monoses, ja...@ub...)
Modified:
trunk/priv/guest_arm_toIR.c
Modified: trunk/priv/guest_arm_toIR.c
===================================================================
--- trunk/priv/guest_arm_toIR.c 2011-02-02 13:35:01 UTC (rev 2086)
+++ trunk/priv/guest_arm_toIR.c 2011-02-09 14:21:45 UTC (rev 2087)
@@ -17746,6 +17746,24 @@
}
}
+ /* -------------- read CP15 TPIDRURO register ------------- */
+ /* mrc p15, 0, r0, c13, c0, 3 up to
+ mrc p15, 0, r14, c13, c0, 3
+ */
+ /* I don't know whether this is really v7-only. But anyway, we
+ have to support it since arm-linux uses TPIDRURO as a thread
+ state register. */
+
+ if ((INSN0(15,0) == 0xEE1D) && (INSN1(11,0) == 0x0F70)) {
+ UInt rD = INSN1(15,12);
+ if (!isBadRegT(rD)) {
+ putIRegT(rD, IRExpr_Get(OFFB_TPIDRURO, Ity_I32), IRTemp_INVALID);
+ DIP("mrc p15,0, r%u, c13, c0, 3\n", rD);
+ goto decode_success;
+ }
+ /* fall through */
+ }
+
/* ------------------- NOP ------------------ */
if (INSN0(15,0) == 0xF3AF && INSN1(15,0) == 0x8000) {
DIP("nop\n");
|
|
From: <sv...@va...> - 2011-02-09 12:47:31
|
Author: sewardj
Date: 2011-02-09 12:47:23 +0000 (Wed, 09 Feb 2011)
New Revision: 11533
Log:
_pre_mem_asciiz handlers in both tools: don't segfault if passed an
obviously invalid address. Fixes #255009. Investigation & initial
patch by Philippe Waroquiers (phi...@sk...)
Modified:
trunk/drd/drd_main.c
trunk/helgrind/hg_main.c
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2011-02-09 11:55:12 UTC (rev 11532)
+++ trunk/drd/drd_main.c 2011-02-09 12:47:23 UTC (rev 11533)
@@ -51,6 +51,7 @@
#include "pub_tool_replacemalloc.h"
#include "pub_tool_threadstate.h" // VG_(get_running_tid)()
#include "pub_tool_tooliface.h"
+#include "pub_tool_aspacemgr.h" // VG_(am_is_valid_for_client)
/* Local variables. */
@@ -257,6 +258,13 @@
const char* p = (void*)a;
SizeT size = 0;
+ // Don't segfault if the string starts in an obviously stupid
+ // place. Actually we should check the whole string, not just
+ // the start address, but that's too much trouble. At least
+ // checking the first byte is better than nothing. See #255009.
+ if (!VG_(am_is_valid_for_client) (a, 1, VKI_PROT_READ))
+ return;
+
/* Note: the expression '*p' reads client memory and may crash if the */
/* client provided an invalid pointer ! */
while (*p)
Modified: trunk/helgrind/hg_main.c
===================================================================
--- trunk/helgrind/hg_main.c 2011-02-09 11:55:12 UTC (rev 11532)
+++ trunk/helgrind/hg_main.c 2011-02-09 12:47:23 UTC (rev 11533)
@@ -53,6 +53,7 @@
#include "pub_tool_redir.h" // sonames for the dynamic linkers
#include "pub_tool_vki.h" // VKI_PAGE_SIZE
#include "pub_tool_libcproc.h" // VG_(atfork)
+#include "pub_tool_aspacemgr.h" // VG_(am_is_valid_for_client)
#include "hg_basics.h"
#include "hg_wordset.h"
@@ -1797,7 +1798,12 @@
if (SHOW_EVENTS >= 1)
VG_(printf)("evh__pre_mem_asciiz(ctid=%d, \"%s\", %p)\n",
(Int)tid, s, (void*)a );
- // FIXME: think of a less ugly hack
+ // Don't segfault if the string starts in an obviously stupid
+ // place. Actually we should check the whole string, not just
+ // the start address, but that's too much trouble. At least
+ // checking the first byte is better than nothing. See #255009.
+ if (!VG_(am_is_valid_for_client) (a, 1, VKI_PROT_READ))
+ return;
len = VG_(strlen)( (Char*) a );
shadow_mem_cread_range( map_threads_lookup(tid), a, len+1 );
if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE))
|
|
From: <sv...@va...> - 2011-02-09 11:55:20
|
Author: bart
Date: 2011-02-09 11:55:12 +0000 (Wed, 09 Feb 2011)
New Revision: 11532
Log:
DRD: handle fork() in processes with detached threads correctly (see also #255355).
Modified:
trunk/drd/drd_thread.c
trunk/drd/drd_thread.h
Modified: trunk/drd/drd_thread.c
===================================================================
--- trunk/drd/drd_thread.c 2011-02-09 11:32:58 UTC (rev 11531)
+++ trunk/drd/drd_thread.c 2011-02-09 11:55:12 UTC (rev 11532)
@@ -367,7 +367,7 @@
DRD_(thread_get_stack_max)(drd_joinee));
}
DRD_(clientobj_delete_thread)(drd_joinee);
- DRD_(thread_delete)(drd_joinee);
+ DRD_(thread_delete)(drd_joinee, False);
}
/**
@@ -450,7 +450,7 @@
* Clean up thread-specific data structures. Call this just after
* pthread_join().
*/
-void DRD_(thread_delete)(const DrdThreadId tid)
+void DRD_(thread_delete)(const DrdThreadId tid, const Bool detached)
{
Segment* sg;
Segment* sg_prev;
@@ -467,7 +467,10 @@
}
DRD_(g_threadinfo)[tid].vg_thread_exists = False;
DRD_(g_threadinfo)[tid].posix_thread_exists = False;
- tl_assert(DRD_(g_threadinfo)[tid].detached_posix_thread == False);
+ if (detached)
+ DRD_(g_threadinfo)[tid].detached_posix_thread = False;
+ else
+ tl_assert(!DRD_(g_threadinfo)[tid].detached_posix_thread);
DRD_(g_threadinfo)[tid].first = 0;
DRD_(g_threadinfo)[tid].last = 0;
@@ -514,7 +517,7 @@
if (i == tid)
continue;
if (DRD_(IsValidDrdThreadId(i)))
- DRD_(thread_delete)(i);
+ DRD_(thread_delete)(i, True);
tl_assert(!DRD_(IsValidDrdThreadId(i)));
}
}
Modified: trunk/drd/drd_thread.h
===================================================================
--- trunk/drd/drd_thread.h 2011-02-09 11:32:58 UTC (rev 11531)
+++ trunk/drd/drd_thread.h 2011-02-09 11:55:12 UTC (rev 11532)
@@ -134,7 +134,7 @@
const ThreadId vg_created);
DrdThreadId DRD_(thread_post_create)(const ThreadId vg_created);
void DRD_(thread_post_join)(DrdThreadId drd_joiner, DrdThreadId drd_joinee);
-void DRD_(thread_delete)(const DrdThreadId tid);
+void DRD_(thread_delete)(const DrdThreadId tid, Bool detached);
void DRD_(thread_finished)(const DrdThreadId tid);
void DRD_(drd_thread_atfork_child)(const DrdThreadId tid);
void DRD_(thread_pre_cancel)(const DrdThreadId tid);
|
|
From: <sv...@va...> - 2011-02-09 11:33:09
|
Author: bart Date: 2011-02-09 11:32:58 +0000 (Wed, 09 Feb 2011) New Revision: 11531 Log: Updated Subversion ignore list. Modified: trunk/memcheck/tests/ Property changes on: trunk/memcheck/tests ___________________________________________________________________ Name: svn:ignore - *.dSYM *.stderr.diff* *.stderr.out *.stdout.diff* *.stdout.out .deps addressable atomic_incs badaddrvalue badfree badjump badjump2 badloop badpoll badrw brk brk2 buflen_check calloc-overflow clientperm clientstackperm custom-overlap custom_alloc deep_templates describe-block dir doublefree erringfds error_counts errs1 execve execve2 exitprog file_locking filter_leak_check_size filter_stderr fprw fwrite hello inits inline leak-0 leak-cases leak-cycle leak-pool leak-regroot leak-tree leakotron linux-capget linux-syscalls-2007 linux-syslog-syscall linux-timerfd-syscall long-supps long_namespace_xml lsframe1 lsframe2 Makefile Makefile.in mallinfo malloc1 malloc2 malloc3 malloc_free_fill malloc_usable manuel1 manuel2 manuel3 match-overrun memalign2 memalign_test memcmptest mempool metadata mismatches mmaptest nanoleak nanoleak2 nanoleak_supp new_nothrow new_override noisy_child null_socket origin1-yes origin2-not-quite origin3-no origin4-many origin5-bz2 origin6-fp oset_test overlap partiallydefinedeq partial_load pdb-realloc pdb-realloc2 pipe pointer-trace post-syscall realloc1 realloc2 realloc3 scalar scalar_exit_group scalar_fork scalar_supp scalar_vfork sh-mem sh-mem-random sigaltstack sigkill signal2 sigprocmask stack_changes stack_switch strchr str_tester supp1 supp2 suppfree supp_unknown threadederrno trivialleak unit_libcbase unit_oset varinfo1 varinfo2 varinfo3 varinfo4 varinfo5 varinfo5so.so varinfo6 vcpu_bz2 vcpu_fbench vcpu_fnfns vgtest_ume weirdioctl with space wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 writev xml1 zeropage + *.dSYM *.stderr.diff* *.stderr.out *.stdout.diff* *.stdout.out .deps addressable atomic_incs badaddrvalue badfree badjump badjump2 badloop badpoll badrw brk brk2 buflen_check calloc-overflow clientperm clientstackperm custom-overlap custom_alloc deep_templates describe-block dir doublefree erringfds error_counts errs1 execve execve2 exitprog file_locking filter_leak_check_size filter_stderr fprw fwrite hello inits inline leak-0 leak-cases leak-cycle leak-pool leak-regroot leak-tree leakotron linux-capget linux-syscalls-2007 linux-syslog-syscall linux-timerfd-syscall long-supps long_namespace_xml lsframe1 lsframe2 Makefile Makefile.in mallinfo malloc1 malloc2 malloc3 malloc_free_fill malloc_usable manuel1 manuel2 manuel3 match-overrun memalign2 memalign_test memcmptest mempool mempool2 metadata mismatches mmaptest nanoleak nanoleak2 nanoleak_supp new_nothrow new_override noisy_child null_socket origin1-yes origin2-not-quite origin3-no origin4-many origin5-bz2 origin6-fp oset_test overlap partiallydefinedeq partial_load pdb-realloc pdb-realloc2 pipe pointer-trace post-syscall realloc1 realloc2 realloc3 scalar scalar_exit_group scalar_fork scalar_supp scalar_vfork sh-mem sh-mem-random sigaltstack sigkill signal2 sigprocmask stack_changes stack_switch strchr str_tester supp1 supp2 suppfree supp_unknown threadederrno trivialleak unit_libcbase unit_oset varinfo1 varinfo2 varinfo3 varinfo4 varinfo5 varinfo5so.so varinfo6 vcpu_bz2 vcpu_fbench vcpu_fnfns vgtest_ume weirdioctl with space wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 writev xml1 zeropage |
|
From: <sv...@va...> - 2011-02-09 11:32:42
|
Author: bart Date: 2011-02-09 11:32:34 +0000 (Wed, 09 Feb 2011) New Revision: 11530 Log: Updated Subversion ignore list. Modified: trunk/exp-dhat/ Property changes on: trunk/exp-dhat ___________________________________________________________________ Name: svn:ignore - .deps exp-dhat-x86-linux Makefile Makefile.in + .deps exp-dhat-x86-linux exp-dhat-amd64-linux Makefile Makefile.in |
|
From: <sv...@va...> - 2011-02-09 11:32:10
|
Author: bart Date: 2011-02-09 11:32:02 +0000 (Wed, 09 Feb 2011) New Revision: 11529 Log: Updated Subversion ignore list. Modified: trunk/none/tests/x86/ Property changes on: trunk/none/tests/x86 ___________________________________________________________________ Name: svn:ignore - *.dSYM *.stderr.diff *.stderr.out *.stdout.diff *.stdout.out .deps badseg bt_everything bt_literal bug125959-x86 bug126147-x86 bug132813-x86 bug135421-x86 bug137714-x86 bug152818-x86 cmpxchg8b cpuid cse_fail dastest faultstatus fcmovnu fpu_lazy_eflags fxtract getseg incdec_alt insn_basic insn_basic.c insn_cmov insn_cmov.c insn_fpu insn_fpu.c insn_mmx insn_mmx.c insn_mmxext insn_mmxext.c insn_sse insn_sse.c insn_sse2 insn_sse2.c insn_sse3 insn_sse3.c insn_ssse3 insn_ssse3.c int jcxz lahf looper lzcnt32 Makefile Makefile.in movx pushpopseg rcl_assert sbbmisc seg_override sigcontext smc1 ssse3_misaligned x86locked xadd yield + *.dSYM *.stderr.diff *.stderr.out *.stdout.diff *.stdout.out .deps aad_aam badseg bt_everything bt_literal bug125959-x86 bug126147-x86 bug132813-x86 bug135421-x86 bug137714-x86 bug152818-x86 cmpxchg8b cpuid cse_fail dastest faultstatus fcmovnu fpu_lazy_eflags fxtract getseg incdec_alt insn_basic insn_basic.c insn_cmov insn_cmov.c insn_fpu insn_fpu.c insn_mmx insn_mmx.c insn_mmxext insn_mmxext.c insn_sse insn_sse.c insn_sse2 insn_sse2.c insn_sse3 insn_sse3.c insn_ssse3 insn_ssse3.c int jcxz lahf looper lzcnt32 Makefile Makefile.in movx pushpopseg rcl_assert sbbmisc seg_override sigcontext smc1 ssse3_misaligned x86locked xadd yield |
|
From: <sv...@va...> - 2011-02-09 11:31:45
|
Author: bart Date: 2011-02-09 11:31:35 +0000 (Wed, 09 Feb 2011) New Revision: 11528 Log: Updated Subversion ignore list. Modified: trunk/none/tests/amd64/ Property changes on: trunk/none/tests/amd64 ___________________________________________________________________ Name: svn:ignore - *.stderr.diff *.stderr.out *.stdout.diff *.stdout.out .deps Makefile Makefile.in amd64locked bug127521-64 bug132813-amd64 bug132918 bug137714-amd64 bug156404-amd64 clc cmpxchg faultstatus fcmovnu fxtract insn_basic insn_basic.c insn_fpu insn_fpu.c insn_mmx insn_mmx.c insn_pclmulqdq insn_pclmulqdq.c insn_sse insn_sse.c insn_sse2 insn_sse2.c insn_sse3 insn_sse3.c insn_ssse3 insn_ssse3.c jrcxz looper lzcnt64 nibz_bennee_mmap rcl-amd64 redundantRexW sbbmisc shrld slahf-amd64 smc1 ssse3_misaligned xadd + *.stderr.diff *.stderr.out *.stdout.diff *.stdout.out .deps amd64locked bug127521-64 bug132813-amd64 bug132918 bug137714-amd64 bug156404-amd64 clc cmpxchg crc32 faultstatus fcmovnu fxtract insn_basic insn_basic.c insn_fpu insn_fpu.c insn_mmx insn_mmx.c insn_pclmulqdq insn_pclmulqdq.c insn_sse insn_sse.c insn_sse2 insn_sse2.c insn_sse3 insn_sse3.c insn_ssse3 insn_ssse3.c jrcxz looper loopnel lzcnt64 Makefile Makefile.in nibz_bennee_mmap pcmpstr64 pcmpxstrx64 rcl-amd64 redundantRexW sbbmisc shrld slahf-amd64 smc1 sse4-64 ssse3_misaligned xadd |
|
From: <sv...@va...> - 2011-02-09 11:30:24
|
Author: bart Date: 2011-02-09 11:30:10 +0000 (Wed, 09 Feb 2011) New Revision: 11527 Log: Updated Subversion ignore list. Modified: trunk/drd/tests/ 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 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* + *.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 threaded-fork thread_name trylock tsan_unittest unit_bitmap unit_vc vg_regtest.tmp* |
|
From: <sv...@va...> - 2011-02-09 11:29:20
|
Author: bart
Date: 2011-02-09 11:29:11 +0000 (Wed, 09 Feb 2011)
New Revision: 11526
Log:
DRD: added a test program that forks a process containing a detached thread.
Added:
trunk/drd/tests/threaded-fork.c
trunk/drd/tests/threaded-fork.stderr.exp
trunk/drd/tests/threaded-fork.vgtest
Modified:
trunk/drd/tests/Makefile.am
Modified: trunk/drd/tests/Makefile.am
===================================================================
--- trunk/drd/tests/Makefile.am 2011-02-09 10:34:00 UTC (rev 11525)
+++ trunk/drd/tests/Makefile.am 2011-02-09 11:29:11 UTC (rev 11526)
@@ -252,6 +252,8 @@
tc24_nonzero_sem.vgtest \
thread_name.stderr.exp \
thread_name.vgtest \
+ threaded-fork.stderr.exp \
+ threaded-fork.vgtest \
trylock.stderr.exp \
trylock.vgtest \
unit_bitmap.stderr.exp \
@@ -294,6 +296,7 @@
sem_open \
sigalrm \
thread_name \
+ threaded-fork \
trylock \
unit_bitmap \
unit_vc
Added: trunk/drd/tests/threaded-fork.c
===================================================================
--- trunk/drd/tests/threaded-fork.c (rev 0)
+++ trunk/drd/tests/threaded-fork.c 2011-02-09 11:29:11 UTC (rev 11526)
@@ -0,0 +1,55 @@
+/* fork a process that has created a detached thread. */
+
+#include <stdlib.h>
+#include <sys/wait.h>
+#include <pthread.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <signal.h>
+
+static void *threadmain(void *dummy)
+{
+ sleep((unsigned long)dummy);
+ return NULL;
+}
+
+int main(int argc, char **argv)
+{
+ int ctr;
+ pid_t childpid;
+ pthread_t childthread;
+ void *res;
+ int status;
+
+ pthread_create(&childthread, NULL, threadmain, (void *)2);
+ pthread_detach(childthread);
+
+ childpid = fork();
+ switch (childpid) {
+ case 0:
+ pthread_create(&childthread, NULL, threadmain, 0);
+ pthread_join(childthread, &res);
+ exit(0);
+ break;
+ case -1:
+ perror("FAILED: fork failed\n");
+ break;
+ default:
+ break;
+ }
+
+ ctr = 0;
+ while (waitpid(childpid, &status, 0) != childpid) {
+ sleep(1);
+ ctr++;
+ if (ctr >= 10) {
+ fprintf(stderr, "FAILED - timeout waiting for child\n");
+ return 0;
+ }
+ }
+
+ fprintf(stderr, "PASS\n");
+
+ return 0;
+}
Added: trunk/drd/tests/threaded-fork.stderr.exp
===================================================================
--- trunk/drd/tests/threaded-fork.stderr.exp (rev 0)
+++ trunk/drd/tests/threaded-fork.stderr.exp 2011-02-09 11:29:11 UTC (rev 11526)
@@ -0,0 +1,6 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+PASS
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Added: trunk/drd/tests/threaded-fork.vgtest
===================================================================
--- trunk/drd/tests/threaded-fork.vgtest (rev 0)
+++ trunk/drd/tests/threaded-fork.vgtest 2011-02-09 11:29:11 UTC (rev 11526)
@@ -0,0 +1,2 @@
+prereq: ./supported_libpthread
+prog: threaded-fork
|
|
From: <sv...@va...> - 2011-02-09 10:34:10
|
Author: sewardj
Date: 2011-02-09 10:34:00 +0000 (Wed, 09 Feb 2011)
New Revision: 11525
Log:
Don't assert in the child after a threaded program does fork().
Fixes #255355 (helgrind part).
Modified:
trunk/helgrind/hg_main.c
Modified: trunk/helgrind/hg_main.c
===================================================================
--- trunk/helgrind/hg_main.c 2011-02-04 20:50:58 UTC (rev 11524)
+++ trunk/helgrind/hg_main.c 2011-02-09 10:34:00 UTC (rev 11525)
@@ -52,6 +52,7 @@
#include "pub_tool_debuginfo.h" // VG_(find_seginfo), VG_(seginfo_soname)
#include "pub_tool_redir.h" // sonames for the dynamic linkers
#include "pub_tool_vki.h" // VKI_PAGE_SIZE
+#include "pub_tool_libcproc.h" // VG_(atfork)
#include "hg_basics.h"
#include "hg_wordset.h"
@@ -1679,6 +1680,8 @@
- tell libhb the thread is gone
- clear the map_threads entry, in order that the Valgrind core
can re-use it. */
+ /* Cleanup actions (next 5 lines) copied in evh__atfork_child; keep
+ in sync. */
tl_assert(thr_q->hbthr);
libhb_async_exit(thr_q->hbthr);
tl_assert(thr_q->coretid == quit_tid);
@@ -1689,7 +1692,36 @@
all__sanity_check("evh__pre_thread_ll_exit-post");
}
+/* This is called immediately after fork, for the child only. 'tid'
+ is the only surviving thread (as per POSIX rules on fork() in
+ threaded programs), so we have to clean up map_threads to remove
+ entries for any other threads. */
+static
+void evh__atfork_child ( ThreadId tid )
+{
+ UInt i;
+ Thread* thr;
+ /* Slot 0 should never be used. */
+ thr = map_threads_maybe_lookup( 0/*INVALID*/ );
+ tl_assert(!thr);
+ /* Clean up all other slots except 'tid'. */
+ for (i = 1; i < VG_N_THREADS; i++) {
+ if (i == tid)
+ continue;
+ thr = map_threads_maybe_lookup(i);
+ if (!thr)
+ continue;
+ /* Cleanup actions (next 5 lines) copied from end of
+ evh__pre_thread_ll_exit; keep in sync. */
+ tl_assert(thr->hbthr);
+ libhb_async_exit(thr->hbthr);
+ tl_assert(thr->coretid == i);
+ thr->coretid = VG_INVALID_THREADID;
+ map_threads_delete(i);
+ }
+}
+
static
void evh__HG_PTHREAD_JOIN_POST ( ThreadId stay_tid, Thread* quit_thr )
{
@@ -4916,6 +4948,8 @@
hg_mallocmeta_table
= VG_(HT_construct)( "hg_malloc_metadata_table" );
+ // add a callback to clean up on (threaded) fork.
+ VG_(atfork)(NULL/*pre*/, NULL/*parent*/, evh__atfork_child/*child*/);
}
VG_DETERMINE_INTERFACE_VERSION(hg_pre_clo_init)
|