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
(11) |
3
|
4
(9) |
5
(10) |
6
(4) |
7
(14) |
|
8
(15) |
9
(15) |
10
(14) |
11
(13) |
12
(16) |
13
(12) |
14
(9) |
|
15
(21) |
16
(13) |
17
(11) |
18
(13) |
19
(5) |
20
(29) |
21
(20) |
|
22
(13) |
23
(18) |
24
(21) |
25
(17) |
26
(26) |
27
(13) |
28
(17) |
|
29
(10) |
30
(5) |
|
|
|
|
|
|
From: <sv...@va...> - 2014-06-09 22:09:00
|
Author: philippe
Date: Mon Jun 9 22:08:45 2014
New Revision: 14018
Log:
Avoid warnings due to implicit conversion between void*, Addr, and fn pointers
Modified:
trunk/coregrind/m_gdbserver/server.c
Modified: trunk/coregrind/m_gdbserver/server.c
==============================================================================
--- trunk/coregrind/m_gdbserver/server.c (original)
+++ trunk/coregrind/m_gdbserver/server.c Mon Jun 9 22:08:45 2014
@@ -327,7 +327,7 @@
hostvisibility = True;
}
if (hostvisibility) {
- const DebugInfo *tooldi = VG_(find_DebugInfo) (handle_gdb_valgrind_command);
+ const DebugInfo *tooldi = VG_(find_DebugInfo) ((Addr)handle_gdb_valgrind_command);
vg_assert(tooldi);
const NSegment *toolseg = VG_(am_find_nsegment)
(VG_(DebugInfo_get_text_avma) (tooldi));
@@ -336,7 +336,7 @@
("Enabled access to Valgrind memory/status by GDB\n"
"If not yet done, tell GDB which valgrind file(s) to use, "
"typically:\n"
- "add-symbol-file %s %p\n", VG_(am_get_filename)(toolseg), toolseg->start);
+ "add-symbol-file %s %p\n", VG_(am_get_filename)(toolseg), (void*) toolseg->start);
} else
VG_(gdb_printf)
("Disabled access to Valgrind memory/status by GDB\n");
|
|
From: <sv...@va...> - 2014-06-09 15:47:55
|
Author: philippe
Date: Mon Jun 9 15:47:46 2014
New Revision: 14017
Log:
When enabling hostvisibility in gdbsrv, give a more user friendly
message for the required GDB add-symbol-file command
Modified:
trunk/coregrind/m_gdbserver/server.c
Modified: trunk/coregrind/m_gdbserver/server.c
==============================================================================
--- trunk/coregrind/m_gdbserver/server.c (original)
+++ trunk/coregrind/m_gdbserver/server.c Mon Jun 9 15:47:46 2014
@@ -326,12 +326,18 @@
} else {
hostvisibility = True;
}
- if (hostvisibility)
+ if (hostvisibility) {
+ const DebugInfo *tooldi = VG_(find_DebugInfo) (handle_gdb_valgrind_command);
+ vg_assert(tooldi);
+ const NSegment *toolseg = VG_(am_find_nsegment)
+ (VG_(DebugInfo_get_text_avma) (tooldi));
+ vg_assert(toolseg);
VG_(gdb_printf)
("Enabled access to Valgrind memory/status by GDB\n"
- "If not yet done, tell GDB which valgrind file(s) to use:\n"
- "add-symbol-file <tool or preloaded file> <loadaddr>\n");
- else
+ "If not yet done, tell GDB which valgrind file(s) to use, "
+ "typically:\n"
+ "add-symbol-file %s %p\n", VG_(am_get_filename)(toolseg), toolseg->start);
+ } else
VG_(gdb_printf)
("Disabled access to Valgrind memory/status by GDB\n");
break;
|
|
From: <sv...@va...> - 2014-06-09 10:55:00
|
Author: dejanj
Date: Mon Jun 9 10:54:49 2014
New Revision: 2870
Log:
mips: Fix non mips compiler warning.
Modified:
trunk/priv/guest_mips_toIR.c
Modified: trunk/priv/guest_mips_toIR.c
==============================================================================
--- trunk/priv/guest_mips_toIR.c (original)
+++ trunk/priv/guest_mips_toIR.c Mon Jun 9 10:54:49 2014
@@ -2344,7 +2344,7 @@
DIP("lasd r%u,(r%u)\n", regRd, regRs);
IRTemp new = newTemp(Ity_I64);
assign (addr, getIReg(regRs));
- assign(new, mkU64(0xffffffffffffffff));
+ assign(new, mkU64(0xffffffffffffffffULL));
mips_irgen_load_and_add64(addr, new, regRd, True);
break;
}
|
|
From: <sv...@va...> - 2014-06-09 09:20:27
|
Author: bart
Date: Mon Jun 9 09:20:20 2014
New Revision: 14016
Log:
drd/tests: Update Subversion ignore list
Modified:
trunk/drd/tests/ (props changed)
|
|
From: <sv...@va...> - 2014-06-09 09:19:45
|
Author: bart
Date: Mon Jun 9 09:19:26 2014
New Revision: 14015
Log:
drd: Ignore ordering introduced by a mutex used in the thread creation wrapper
Modified:
trunk/drd/drd.h
trunk/drd/drd_clientobj.h
trunk/drd/drd_clientreq.c
trunk/drd/drd_mutex.c
trunk/drd/drd_mutex.h
trunk/drd/drd_pthread_intercepts.c
Modified: trunk/drd/drd.h
==============================================================================
--- trunk/drd/drd.h (original)
+++ trunk/drd/drd.h Mon Jun 9 09:19:26 2014
@@ -488,6 +488,10 @@
VG_USERREQ__DRD_ANNOTATE_SEM_POST_PRE,
/* args: Addr. */
+ /* Tell DRD to ignore the inter-thread ordering introduced by a mutex. */
+ VG_USERREQ__DRD_IGNORE_MUTEX_ORDERING,
+ /* args: Addr. */
+
/* Tell DRD that a user-defined reader-writer synchronization object
* has been created. */
VG_USERREQ__DRD_ANNOTATE_RWLOCK_CREATE
Modified: trunk/drd/drd_clientobj.h
==============================================================================
--- trunk/drd/drd_clientobj.h (original)
+++ trunk/drd/drd_clientobj.h Mon Jun 9 09:19:26 2014
@@ -68,6 +68,7 @@
ExeContext* first_observed_at;
MutexT mutex_type; // pthread_mutex_t or pthread_spinlock_t.
int recursion_count; // 0 if free, >= 1 if locked.
+ Bool ignore_ordering;
DrdThreadId owner; // owner if locked, last owner if free.
struct segment* last_locked_segment;
ULong acquiry_time_ms;
Modified: trunk/drd/drd_clientreq.c
==============================================================================
--- trunk/drd/drd_clientreq.c (original)
+++ trunk/drd/drd_clientreq.c Mon Jun 9 09:19:26 2014
@@ -378,6 +378,10 @@
DRD_(thread_leave_synchr)(drd_tid);
break;
+ case VG_USERREQ__DRD_IGNORE_MUTEX_ORDERING:
+ DRD_(mutex_ignore_ordering)(arg[1]);
+ break;
+
case VG_USERREQ__PRE_SPIN_INIT_OR_UNLOCK:
if (DRD_(thread_enter_synchr)(drd_tid) == 0)
DRD_(spinlock_init_or_unlock)(arg[1]);
Modified: trunk/drd/drd_mutex.c
==============================================================================
--- trunk/drd/drd_mutex.c (original)
+++ trunk/drd/drd_mutex.c Mon Jun 9 09:19:26 2014
@@ -76,12 +76,30 @@
= (void(*)(DrdClientobj*, DrdThreadId))mutex_delete_thread;
p->mutex_type = mutex_type;
p->recursion_count = 0;
+ p->ignore_ordering = False;
p->owner = DRD_INVALID_THREADID;
p->last_locked_segment = 0;
p->acquiry_time_ms = 0;
p->acquired_at = 0;
}
+void DRD_(mutex_ignore_ordering)(const Addr mutex)
+{
+ struct mutex_info* p = DRD_(mutex_get)(mutex);
+
+ if (s_trace_mutex)
+ DRD_(trace_msg)("[%d] mutex_ignore_ordering %s 0x%lx",
+ DRD_(thread_get_running_tid)(),
+ p ? DRD_(mutex_type_name)(p->mutex_type) : "(?)",
+ mutex);
+
+ if (p) {
+ p->ignore_ordering = True;
+ } else {
+ DRD_(not_a_mutex)(mutex);
+ }
+}
+
/** Deallocate the memory that was allocated by mutex_initialize(). */
static void mutex_cleanup(struct mutex_info* p)
{
@@ -302,17 +320,18 @@
return;
if (p->recursion_count == 0) {
- if (p->owner != drd_tid && p->owner != DRD_INVALID_THREADID)
- {
- tl_assert(p->last_locked_segment);
+ if (!p->ignore_ordering) {
+ if (p->owner != drd_tid && p->owner != DRD_INVALID_THREADID) {
+ tl_assert(p->last_locked_segment);
+
+ DRD_(thread_new_segment_and_combine_vc)(drd_tid,
+ p->last_locked_segment);
+ } else {
+ DRD_(thread_new_segment)(drd_tid);
+ }
- DRD_(thread_new_segment_and_combine_vc)(drd_tid,
- p->last_locked_segment);
+ s_mutex_segment_creation_count++;
}
- else
- DRD_(thread_new_segment)(drd_tid);
-
- s_mutex_segment_creation_count++;
p->owner = drd_tid;
p->acquiry_time_ms = VG_(read_millisecond_timer)();
@@ -426,7 +445,8 @@
/* this mutex is locked again. */
DRD_(thread_get_latest_segment)(&p->last_locked_segment, drd_tid);
- DRD_(thread_new_segment)(drd_tid);
+ if (!p->ignore_ordering)
+ DRD_(thread_new_segment)(drd_tid);
p->acquired_at = 0;
s_mutex_segment_creation_count++;
}
Modified: trunk/drd/drd_mutex.h
==============================================================================
--- trunk/drd/drd_mutex.h (original)
+++ trunk/drd/drd_mutex.h Mon Jun 9 09:19:26 2014
@@ -37,6 +37,7 @@
void DRD_(mutex_set_trace)(const Bool trace_mutex);
void DRD_(mutex_set_lock_threshold)(const UInt lock_threshold_ms);
struct mutex_info* DRD_(mutex_init)(const Addr mutex, const MutexT mutex_type);
+void DRD_(mutex_ignore_ordering)(const Addr mutex);
void DRD_(mutex_post_destroy)(const Addr mutex);
void DRD_(not_a_mutex)(const Addr mutex);
struct mutex_info* DRD_(mutex_get)(const Addr mutex);
Modified: trunk/drd/drd_pthread_intercepts.c
==============================================================================
--- trunk/drd/drd_pthread_intercepts.c (original)
+++ trunk/drd/drd_pthread_intercepts.c Mon Jun 9 09:19:26 2014
@@ -179,10 +179,17 @@
DRD_(set_main_thread_state)();
}
+static __always_inline void DRD_(ignore_mutex_ordering)(pthread_mutex_t *mutex)
+{
+ VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DRD_IGNORE_MUTEX_ORDERING,
+ mutex, 0, 0, 0, 0);
+}
+
static void DRD_(sema_init)(DrdSema* sema)
{
- DRD_IGNORE_VAR(sema->counter);
+ DRD_IGNORE_VAR(*sema);
pthread_mutex_init(&sema->mutex, NULL);
+ DRD_(ignore_mutex_ordering)(&sema->mutex);
sema->counter = 0;
sema->waiters = 0;
}
|
|
From: <sv...@va...> - 2014-06-09 09:01:55
|
Author: bart
Date: Mon Jun 9 09:01:46 2014
New Revision: 14014
Log:
drd/tests/std_thread2: Add
Added:
trunk/drd/tests/std_thread2.cpp
trunk/drd/tests/std_thread2.stderr.exp
trunk/drd/tests/std_thread2.vgtest
Modified:
trunk/drd/tests/Makefile.am
Modified: trunk/drd/tests/Makefile.am
==============================================================================
--- trunk/drd/tests/Makefile.am (original)
+++ trunk/drd/tests/Makefile.am Mon Jun 9 09:01:46 2014
@@ -254,6 +254,8 @@
std_string.vgtest \
std_thread.stderr.exp \
std_thread.vgtest \
+ std_thread2.stderr.exp \
+ std_thread2.vgtest \
str_tester.stderr.exp \
str_tester.vgtest \
tc01_simple_race.stderr.exp \
@@ -399,7 +401,8 @@
std_atomic \
std_list \
std_string \
- std_thread
+ std_thread \
+ std_thread2
endif
endif
@@ -493,4 +496,7 @@
std_thread_SOURCES = std_thread.cpp
std_thread_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
+std_thread2_SOURCES = std_thread2.cpp
+std_thread2_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
+
sem_wait_SOURCES = sem_wait.cpp
Added: trunk/drd/tests/std_thread2.cpp
==============================================================================
--- trunk/drd/tests/std_thread2.cpp (added)
+++ trunk/drd/tests/std_thread2.cpp Mon Jun 9 09:01:46 2014
@@ -0,0 +1,72 @@
+// Test whether no race conditions are reported on std::thread. Note: since
+// the implementation of std::thread uses the shared pointer implementation,
+// that implementation has to be annotated in order to avoid false positives.
+// See also http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug.html for more
+// information.
+
+#include "../../drd/drd.h"
+#define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(addr) \
+ ANNOTATE_HAPPENS_BEFORE(addr)
+#define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(addr) \
+ ANNOTATE_HAPPENS_AFTER(addr)
+
+#include <iostream>
+#include <thread>
+#include <unistd.h>
+
+static int i;
+
+int main(int argc, char** argv)
+{
+ std::thread t1( []() { sleep(1); i = 1; } );
+ std::thread t2( []() { i = 2; } );
+ t2.join();
+ t1.join();
+ std::cerr << "Done.\n";
+ return 0;
+}
+
+//
+// From libstdc++-v3/src/c++11/thread.cc
+//
+
+extern "C" void* execute_native_thread_routine(void* __p)
+{
+ std::thread::_Impl_base* __t = static_cast<std::thread::_Impl_base*>(__p);
+ std::thread::__shared_base_type __local;
+ __local.swap(__t->_M_this_ptr);
+
+ __try {
+ __t->_M_run();
+ } __catch(const __cxxabiv1::__forced_unwind&) {
+ __throw_exception_again;
+ } __catch(...) {
+ std::terminate();
+ }
+
+ return 0;
+}
+
+#include <system_error>
+
+namespace std
+{
+ void thread::_M_start_thread(__shared_base_type __b)
+ {
+ if (!__gthread_active_p())
+#if __EXCEPTIONS
+ throw system_error(make_error_code(errc::operation_not_permitted),
+ "Enable multithreading to use std::thread");
+#else
+ __throw_system_error(int(errc::operation_not_permitted));
+#endif
+
+ __b->_M_this_ptr = __b;
+ int __e = __gthread_create(&_M_id._M_thread, execute_native_thread_routine,
+ __b.get());
+ if (__e) {
+ __b->_M_this_ptr.reset();
+ __throw_system_error(__e);
+ }
+ }
+}
Added: trunk/drd/tests/std_thread2.stderr.exp
==============================================================================
--- trunk/drd/tests/std_thread2.stderr.exp (added)
+++ trunk/drd/tests/std_thread2.stderr.exp Mon Jun 9 09:01:46 2014
@@ -0,0 +1,13 @@
+
+Thread 2:
+Conflicting store by thread 2 at 0x........ size 4
+ at 0x........: main::{lambda()#1}::operator()() const (std_thread2.cpp:21)
+ by 0x........: void std::_Bind_simple<main::{lambda()#1} ()>::_M_invoke<>(std::_Index_tuple<>) (functional:1732)
+ by 0x........: std::_Bind_simple<main::{lambda()#1} ()>::operator()() (functional:1720)
+ by 0x........: std::thread::_Impl<std::_Bind_simple<main::{lambda()#1} ()> >::_M_run() (thread:115)
+ by 0x........: execute_native_thread_routine (std_thread2.cpp:40)
+Allocation context: BSS section of std_thread2
+
+Done.
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Added: trunk/drd/tests/std_thread2.vgtest
==============================================================================
--- trunk/drd/tests/std_thread2.vgtest (added)
+++ trunk/drd/tests/std_thread2.vgtest Mon Jun 9 09:01:46 2014
@@ -0,0 +1,4 @@
+prereq: test -e std_thread2 && ./supported_libpthread
+vgopts: --check-stack-var=yes --show-confl-seg=no --num-callers=5
+prog: std_thread2
+stderr_filter: filter_stderr
|
|
From: <sv...@va...> - 2014-06-09 09:00:55
|
Author: bart
Date: Mon Jun 9 09:00:42 2014
New Revision: 14013
Log:
drd/tests/local_static: Disable because g++ does not yet allow proper interception of initialization of local static variables
Modified:
trunk/drd/tests/local_static.vgtest
Modified: trunk/drd/tests/local_static.vgtest
==============================================================================
--- trunk/drd/tests/local_static.vgtest (original)
+++ trunk/drd/tests/local_static.vgtest Mon Jun 9 09:00:42 2014
@@ -1,4 +1,4 @@
-prereq: test -e local_static && ./supported_libpthread
+prereq: false && test -e local_static && ./supported_libpthread
vgopts: --check-stack-var=yes --show-confl-seg=no
prog: local_static
stderr_filter: filter_stderr
|
|
From: <sv...@va...> - 2014-06-09 07:55:34
|
Author: bart
Date: Mon Jun 9 07:55:14 2014
New Revision: 14012
Log:
drd: Add __cxa_guard_*() intercepts
Added:
trunk/drd/drd_libstdcxx_intercepts.c
Modified:
trunk/drd/Makefile.am
trunk/drd/drd_clientreq.h
trunk/drd/drd_mutex.c
Modified: trunk/drd/Makefile.am
==============================================================================
--- trunk/drd/Makefile.am (original)
+++ trunk/drd/Makefile.am Mon Jun 9 07:55:14 2014
@@ -122,6 +122,7 @@
endif
VGPRELOAD_DRD_SOURCES_COMMON = \
+ drd_libstdcxx_intercepts.c \
drd_pthread_intercepts.c \
drd_qtcore_intercepts.c \
drd_strmem_intercepts.c
Modified: trunk/drd/drd_clientreq.h
==============================================================================
--- trunk/drd/drd_clientreq.h (original)
+++ trunk/drd/drd_clientreq.h Mon Jun 9 07:55:14 2014
@@ -240,6 +240,7 @@
mutex_type_errorcheck_mutex = 2,
mutex_type_default_mutex = 3,
mutex_type_spinlock = 4,
+ mutex_type_cxa_guard = 5,
} MutexT;
/**
Added: trunk/drd/drd_libstdcxx_intercepts.c
==============================================================================
--- trunk/drd/drd_libstdcxx_intercepts.c (added)
+++ trunk/drd/drd_libstdcxx_intercepts.c Mon Jun 9 07:55:14 2014
@@ -0,0 +1,109 @@
+/*--------------------------------------------------------------------*/
+/*--- Client-space code for DRD. drd_libstdcxx_intercepts.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of DRD, a thread error detector.
+
+ Copyright (C) 2014 Bart Van Assche <bva...@ac...>.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+/* ---------------------------------------------------------------------
+ ALL THE CODE IN THIS FILE RUNS ON THE SIMULATED CPU.
+
+ These functions are not called directly - they're the targets of code
+ redirection or load notifications (see pub_core_redir.h for info).
+ They're named weirdly so that the intercept code can find them when the
+ shared object is initially loaded.
+
+ Note that this filename has the "drd_" prefix because it can appear
+ in stack traces, and the "drd_" makes it a little clearer that it
+ originates from Valgrind.
+ ------------------------------------------------------------------ */
+
+#include "drd_basics.h" /* DRD_() */
+#include "drd_clientreq.h"
+#include "pub_tool_redir.h" /* VG_WRAP_FUNCTION_ZZ() */
+
+/* From <cxxabi.h> */
+int __cxa_guard_acquire(void* guard);
+void __cxa_guard_release(void* guard) __attribute__((__nothrow__));
+void __cxa_guard_abort(void* guard) __attribute__((__nothrow__));
+
+#define LIBSTDCXX_FUNC(ret_ty, zf, implf, argl_decl, argl) \
+ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBSTDCXX_SONAME,zf) argl_decl; \
+ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBSTDCXX_SONAME,zf) argl_decl \
+ { return implf argl; }
+
+/*
+ * Not inlining one of the intercept functions will cause the regression
+ * tests to fail because this would cause an additional stackfram to appear
+ * in the output. The __always_inline macro guarantees that inlining will
+ * happen, even when compiling with optimization disabled.
+ */
+#undef __always_inline /* since already defined in <cdefs.h> */
+#if __GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 2
+#define __always_inline __inline__ __attribute__((always_inline))
+#else
+#define __always_inline __inline__
+#endif
+
+static __always_inline
+int __cxa_guard_acquire_intercept(void *guard)
+{
+ int ret;
+ OrigFn fn;
+ VALGRIND_GET_ORIG_FN(fn);
+ VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_MUTEX_LOCK,
+ guard, mutex_type_cxa_guard, 0, 0, 0);
+ CALL_FN_W_W(ret, fn, guard);
+ VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_MUTEX_LOCK,
+ guard, 1, 0, 0, 0);
+ if (ret == 0) {
+ VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_MUTEX_UNLOCK,
+ guard, mutex_type_cxa_guard, 0, 0, 0);
+ VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_MUTEX_UNLOCK,
+ guard, 0, 0, 0, 0);
+ }
+ return ret;
+}
+
+LIBSTDCXX_FUNC(int, ZuZucxaZuguardZuacquire, __cxa_guard_acquire_intercept,
+ (void *guard), (guard));
+LIBSTDCXX_FUNC(int, ZuZucxaZuguardZuacquireZAZACXXABIZu1Zd3,
+ __cxa_guard_acquire_intercept, (void *guard), (guard));
+
+static __always_inline
+void __cxa_guard_abort_release_intercept(void *guard)
+{
+ int ret;
+ OrigFn fn;
+ VALGRIND_GET_ORIG_FN(fn);
+ VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_MUTEX_UNLOCK,
+ guard, mutex_type_cxa_guard, 0, 0, 0);
+ CALL_FN_W_W(ret, fn, guard);
+ VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_MUTEX_UNLOCK,
+ guard, 0, 0, 0, 0);
+}
+
+LIBSTDCXX_FUNC(void, ZuZucxaZuguardZurelease,
+ __cxa_guard_abort_release_intercept, (void *guard), (guard));
+LIBSTDCXX_FUNC(void, ZuZucxaZuguardZuabort,
+ __cxa_guard_abort_release_intercept, (void *guard), (guard));
Modified: trunk/drd/drd_mutex.c
==============================================================================
--- trunk/drd/drd_mutex.c (original)
+++ trunk/drd/drd_mutex.c Mon Jun 9 07:55:14 2014
@@ -468,6 +468,8 @@
return "mutex";
case mutex_type_spinlock:
return "spinlock";
+ case mutex_type_cxa_guard:
+ return "cxa_guard";
}
tl_assert(0);
return "?";
|
|
From: <sv...@va...> - 2014-06-09 07:39:07
|
Author: bart
Date: Mon Jun 9 07:38:32 2014
New Revision: 14011
Log:
drd/tests/local_static: Fix a typo
Modified:
trunk/drd/tests/local_static.cpp
Modified: trunk/drd/tests/local_static.cpp
==============================================================================
--- trunk/drd/tests/local_static.cpp (original)
+++ trunk/drd/tests/local_static.cpp Mon Jun 9 07:38:32 2014
@@ -34,7 +34,7 @@
for (std::vector<pthread_t>::iterator p = thread.begin(); p != thread.end();
p++) {
- if (pthread_create(&*p, 0, thread_func, 0) == 0) {
+ if (pthread_create(&*p, 0, thread_func, 0) != 0) {
fprintf(stderr, "Creation of thread %ld failed\n",
&*p - &*thread.begin());
return 1;
|
|
From: <sv...@va...> - 2014-06-09 06:56:18
|
Author: bart
Date: Mon Jun 9 06:56:06 2014
New Revision: 14010
Log:
drd/tests: Update Subversion ignore list
Modified:
trunk/drd/tests/ (props changed)
|
|
From: <sv...@va...> - 2014-06-09 06:54:47
|
Author: bart
Date: Mon Jun 9 06:54:30 2014
New Revision: 14009
Log:
drd/tests/local_static: Add
Added:
trunk/drd/tests/local_static.cpp
trunk/drd/tests/local_static.stderr.exp
trunk/drd/tests/local_static.vgtest
Modified:
trunk/drd/tests/Makefile.am
Modified: trunk/drd/tests/Makefile.am
==============================================================================
--- trunk/drd/tests/Makefile.am (original)
+++ trunk/drd/tests/Makefile.am Mon Jun 9 06:54:30 2014
@@ -128,6 +128,8 @@
linuxthreads_det.stdout.exp \
linuxthreads_det.stdout.exp-linuxthreads \
linuxthreads_det.vgtest \
+ local_static.stderr.exp \
+ local_static.vgtest \
matinv.stderr.exp \
matinv.stdout.exp \
matinv.vgtest \
@@ -340,6 +342,7 @@
free_is_write \
hold_lock \
linuxthreads_det \
+ local_static \
memory_allocation \
monitor_example \
new_delete \
@@ -458,6 +461,8 @@
annotate_static_SOURCES = annotate_static.cpp
+local_static_SOURCES = local_static.cpp
+
if HAVE_OPENMP
omp_matinv_CFLAGS = $(AM_CFLAGS) -fopenmp
omp_matinv_LDFLAGS = -fopenmp
Added: trunk/drd/tests/local_static.cpp
==============================================================================
--- trunk/drd/tests/local_static.cpp (added)
+++ trunk/drd/tests/local_static.cpp Mon Jun 9 06:54:30 2014
@@ -0,0 +1,53 @@
+// A C++ compiler is supposed to have thread-safe statics
+
+#include <cstdio>
+#include <vector>
+#include <pthread.h>
+
+class Singleton
+{
+public:
+ Singleton()
+ : value(42)
+ { }
+
+ int value;
+};
+
+void* thread_func(void*)
+{
+ static Singleton singleton;
+
+ fprintf(stderr, "%d\n", singleton.value);
+ fprintf(stderr, "%d\n", singleton.value);
+ fprintf(stderr, "%d\n", singleton.value);
+ fprintf(stderr, "%d\n", singleton.value);
+ fprintf(stderr, "%d\n", singleton.value);
+
+ return 0;
+}
+
+int main(int, char**)
+{
+ std::vector<pthread_t> thread(2);
+ void* v;
+
+ for (std::vector<pthread_t>::iterator p = thread.begin(); p != thread.end();
+ p++) {
+ if (pthread_create(&*p, 0, thread_func, 0) == 0) {
+ fprintf(stderr, "Creation of thread %ld failed\n",
+ &*p - &*thread.begin());
+ return 1;
+ }
+ }
+
+ for (std::vector<pthread_t>::const_iterator p = thread.begin();
+ p != thread.end(); p++) {
+ pthread_join(*p, &v);
+ }
+
+ fprintf(stderr, "Done.\n");
+
+ return 0;
+}
+
Added: trunk/drd/tests/local_static.stderr.exp
==============================================================================
(empty)
Added: trunk/drd/tests/local_static.vgtest
==============================================================================
--- trunk/drd/tests/local_static.vgtest (added)
+++ trunk/drd/tests/local_static.vgtest Mon Jun 9 06:54:30 2014
@@ -0,0 +1,4 @@
+prereq: test -e local_static && ./supported_libpthread
+vgopts: --check-stack-var=yes --show-confl-seg=no
+prog: local_static
+stderr_filter: filter_stderr
|
|
From: <sv...@va...> - 2014-06-09 06:53:19
|
Author: bart
Date: Mon Jun 9 06:53:13 2014
New Revision: 14008
Log:
gdbserver_tests: Update Subversion ignore list
Modified:
trunk/gdbserver_tests/ (props changed)
|
|
From: <sv...@va...> - 2014-06-09 06:53:01
|
Author: bart
Date: Mon Jun 9 06:52:46 2014
New Revision: 14007
Log:
memcheck/tests: Update Subversion ignore list
Modified:
trunk/memcheck/tests/ (props changed)
|
|
From: <sv...@va...> - 2014-06-09 06:52:34
|
Author: bart
Date: Mon Jun 9 06:52:24 2014
New Revision: 14006
Log:
none/tests/amd64: Update Subversion ignore list
Modified:
trunk/none/tests/amd64/ (props changed)
|
|
From: <sv...@va...> - 2014-06-09 06:51:51
|
Author: bart
Date: Mon Jun 9 06:51:03 2014
New Revision: 14005
Log:
shared: Update ignore list
Modified:
trunk/shared/ (props changed)
|