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
(15) |
3
(20) |
|
4
(4) |
5
(11) |
6
(8) |
7
(36) |
8
(23) |
9
(6) |
10
(4) |
|
11
(4) |
12
(19) |
13
(17) |
14
(33) |
15
(16) |
16
(17) |
17
(4) |
|
18
(4) |
19
(30) |
20
(22) |
21
(23) |
22
(29) |
23
(20) |
24
(12) |
|
25
(7) |
26
(33) |
27
(10) |
28
(12) |
29
(19) |
30
(15) |
31
(8) |
|
From: <sv...@va...> - 2009-01-20 23:07:40
|
Author: njn
Date: 2009-01-20 23:07:34 +0000 (Tue, 20 Jan 2009)
New Revision: 9003
Log:
Merge r8995..r9002 from the trunk (DRD test fixes for less-capable systems).
Added:
branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-1
branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-2
branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp1
branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp2
Removed:
branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins
branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp
Modified:
branches/DARWIN/configure.in
branches/DARWIN/drd/tests/Makefile.am
branches/DARWIN/drd/tests/bar_bad.vgtest
branches/DARWIN/drd/tests/bar_trivial.vgtest
branches/DARWIN/drd/tests/matinv.vgtest
branches/DARWIN/drd/tests/pth_barrier.vgtest
branches/DARWIN/drd/tests/pth_barrier2.vgtest
branches/DARWIN/drd/tests/pth_barrier3.vgtest
branches/DARWIN/drd/tests/pth_barrier_reinit.vgtest
branches/DARWIN/drd/tests/pth_spinlock.vgtest
branches/DARWIN/drd/tests/tc20_verifywrap.vgtest
branches/DARWIN/drd/tests/trylock.c
Modified: branches/DARWIN/configure.in
===================================================================
--- branches/DARWIN/configure.in 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/configure.in 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1410,7 +1410,12 @@
mkdir \
mremap \
ppoll \
- pthread_condattr_setclock \
+ pthread_barrier_init \
+ pthread_condattr_setclock \
+ pthread_mutex_timedlock \
+ pthread_rwlock_timedrdlock \
+ pthread_rwlock_timedwrlock \
+ pthread_spin_lock \
semtimedop \
signalfd \
syscall \
@@ -1428,6 +1433,13 @@
# want for e.g. vgpreload_core-x86-linux.so
LIBS=""
+AM_CONDITIONAL([HAVE_PTHREAD_BARRIER],
+ [test x$ac_cv_func_pthread_barrier_init = xyes])
+AM_CONDITIONAL([HAVE_PTHREAD_MUTEX_TIMEDLOCK],
+ [test x$ac_cv_func_pthread_mutex_timedlock = xyes])
+AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
+ [test x$ac_cv_func_pthread_spin_lock = xyes])
+
# Do we have a useable MPI setup on the primary and/or secondary targets?
# On Linux, by default, assumes mpicc and -m32/-m64
# On AIX, by default, assumes mpxlc and -q32/-q64
Modified: branches/DARWIN/drd/tests/Makefile.am
===================================================================
--- branches/DARWIN/drd/tests/Makefile.am 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/Makefile.am 2009-01-20 23:07:34 UTC (rev 9003)
@@ -17,7 +17,8 @@
EXTRA_DIST = \
$(noinst_SCRIPTS) \
- atomic_var.stderr.exp-with-atomic-builtins \
+ atomic_var.stderr.exp-with-atomic-builtins-1 \
+ atomic_var.stderr.exp-with-atomic-builtins-2 \
atomic_var.stderr.exp-without-atomic-builtins \
atomic_var.vgtest \
bar_bad.stderr.exp \
@@ -107,7 +108,8 @@
pth_detached_sem.stderr.exp \
pth_detached_sem.stdout.exp \
pth_detached_sem.vgtest \
- pth_inconsistent_cond_wait.stderr.exp \
+ pth_inconsistent_cond_wait.stderr.exp1 \
+ pth_inconsistent_cond_wait.stderr.exp2 \
pth_inconsistent_cond_wait.vgtest \
pth_spinlock.stderr.exp \
pth_spinlock.vgtest \
@@ -228,6 +230,7 @@
rwlock_race \
rwlock_test \
sem_as_mutex \
+ sigalrm \
tc01_simple_race \
tc02_simple_tls \
tc03_re_excl \
@@ -246,11 +249,11 @@
tc17_sembar \
tc18_semabuse \
tc19_shadowmem \
- tc20_verifywrap \
tc21_pthonce \
tc22_exit_w_lock \
tc23_bogus_condwait \
- tc24_nonzero_sem
+ tc24_nonzero_sem \
+ trylock
if HAVE_BOOST_1_35
check_PROGRAMS += boost_thread
@@ -260,36 +263,26 @@
check_PROGRAMS += omp_matinv omp_prime omp_printf
endif
+if HAVE_PTHREAD_BARRIER
+check_PROGRAMS += bar_bad bar_trivial matinv pth_barrier pth_barrier_reinit
+endif
+
+if HAVE_PTHREAD_MUTEX_TIMEDLOCK
+check_PROGRAMS += tc20_verifywrap
+endif
+
+if HAVE_PTHREAD_SPINLOCK
+check_PROGRAMS += pth_spinlock
+endif
+
if HAVE_QTCORE
check_PROGRAMS += qt4_mutex qt4_rwlock qt4_semaphore
endif
-# DDD: all of these (except sigalrm and trylock) use barriers and/or
-# spinlocks, which are optional in pthreads and Darwin doesn't support.
-# Could do a configure-time test like the one done for Qt above.
-# (Not sure about sigalrm and trylock, whether they should work or not.)
-if ! VGO_DARWIN
- check_PROGRAMS += \
- bar_bad \
- bar_trivial \
- matinv \
- pth_barrier \
- pth_barrier_reinit \
- pth_spinlock \
- sigalrm \
- trylock
-endif
-
atomic_var_SOURCES = atomic_var.c
atomic_var_LDADD = -lpthread
-bar_bad_SOURCES = ../../helgrind/tests/bar_bad.c
-bar_bad_LDADD = -lpthread
-
-bar_trivial_SOURCES = ../../helgrind/tests/bar_trivial.c
-bar_trivial_LDADD = -lpthread
-
circular_buffer_SOURCES = circular_buffer.c
circular_buffer_LDADD = -lpthread
@@ -325,9 +318,6 @@
linuxthreads_det_SOURCES = linuxthreads_det.c
linuxthreads_det_LDADD = -lpthread
-matinv_SOURCES = matinv.c
-matinv_LDADD = -lpthread -lm
-
memory_allocation_SOURCES = memory_allocation.c
monitor_example_SOURCES = monitor_example.cpp
@@ -335,12 +325,6 @@
new_delete_SOURCES = new_delete.cpp
-pth_barrier_SOURCES = pth_barrier.c
-pth_barrier_LDADD = -lpthread
-
-pth_barrier_reinit_SOURCES = pth_barrier_reinit.c
-pth_barrier_reinit_LDADD = -lpthread
-
pth_broadcast_SOURCES = pth_broadcast.c
pth_broadcast_LDADD = -lpthread
@@ -362,9 +346,6 @@
pth_inconsistent_cond_wait_SOURCES = pth_inconsistent_cond_wait.c
pth_inconsistent_cond_wait_LDADD = -lpthread
-pth_spinlock_SOURCES = pth_spinlock.c
-pth_spinlock_LDADD = -lpthread
-
recursive_mutex_SOURCES = recursive_mutex.c
recursive_mutex_LDADD = -lpthread
@@ -434,9 +415,6 @@
tc19_shadowmem_SOURCES = ../../helgrind/tests/tc19_shadowmem.c
tc19_shadowmem_LDADD = -lpthread
-tc20_verifywrap_SOURCES = ../../helgrind/tests/tc20_verifywrap.c
-tc20_verifywrap_LDADD = -lpthread
-
tc21_pthonce_SOURCES = ../../helgrind/tests/tc21_pthonce.c
tc21_pthonce_LDADD = -lpthread
@@ -450,7 +428,7 @@
tc24_nonzero_sem_LDADD = -lpthread
trylock_SOURCES = trylock.c
-trylock_LDADD = -lpthread -lrt
+trylock_LDADD = -lpthread
if HAVE_BOOST_1_35
boost_thread_SOURCES = boost_thread.cpp
@@ -475,6 +453,33 @@
omp_printf_LDADD = -lm
endif
+if HAVE_PTHREAD_BARRIER
+bar_bad_SOURCES = ../../helgrind/tests/bar_bad.c
+bar_bad_LDADD = -lpthread
+
+bar_trivial_SOURCES = ../../helgrind/tests/bar_trivial.c
+bar_trivial_LDADD = -lpthread
+
+matinv_SOURCES = matinv.c
+matinv_LDADD = -lpthread -lm
+
+pth_barrier_SOURCES = pth_barrier.c
+pth_barrier_LDADD = -lpthread
+
+pth_barrier_reinit_SOURCES = pth_barrier_reinit.c
+pth_barrier_reinit_LDADD = -lpthread
+endif
+
+if HAVE_PTHREAD_MUTEX_TIMEDLOCK
+tc20_verifywrap_SOURCES = ../../helgrind/tests/tc20_verifywrap.c
+tc20_verifywrap_LDADD = -lpthread
+endif
+
+if HAVE_PTHREAD_SPINLOCK
+pth_spinlock_SOURCES = pth_spinlock.c
+pth_spinlock_LDADD = -lpthread
+endif
+
if HAVE_QTCORE
qt4_mutex_SOURCES = qt4_mutex.cpp
qt4_mutex_CXXFLAGS = $(AM_CXXFLAGS) $(QTCORE_CFLAGS)
Deleted: branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins
===================================================================
--- branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,14 +0,0 @@
-
-Start of test.
-Thread 2:
-Conflicting load by thread 2/3 at 0x........ size 4
- at 0x........: thread_func_2 (atomic_var.c:?)
- by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
- by 0x........: (within libpthread-?.?.so)
- by 0x........: clone (in /...libc...)
-Location 0x........ is 0 bytes inside local var "s_y"
-declared at atomic_var.c:39, in frame #? of thread 2
-y = 1
-Test finished.
-
-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Copied: branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-1 (from rev 9001, trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-1)
===================================================================
--- branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-1 (rev 0)
+++ branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-1 2009-01-20 23:07:34 UTC (rev 9003)
@@ -0,0 +1,14 @@
+
+Start of test.
+Thread 2:
+Conflicting load by thread 2/3 at 0x........ size 4
+ at 0x........: thread_func_2 (atomic_var.c:?)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
+Location 0x........ is 0 bytes inside local var "s_y"
+declared at atomic_var.c:39, in frame #? of thread 2
+y = 1
+Test finished.
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Copied: branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-2 (from rev 9001, trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-2)
===================================================================
--- branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-2 (rev 0)
+++ branches/DARWIN/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-2 2009-01-20 23:07:34 UTC (rev 9003)
@@ -0,0 +1,14 @@
+
+Start of test.
+Thread 3:
+Conflicting load by thread 3/3 at 0x........ size 4
+ at 0x........: thread_func_2 (atomic_var.c:?)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
+Location 0x........ is 0 bytes inside local var "s_y"
+declared at atomic_var.c:39, in frame #? of thread 3
+y = 1
+Test finished.
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: branches/DARWIN/drd/tests/bar_bad.vgtest
===================================================================
--- branches/DARWIN/drd/tests/bar_bad.vgtest 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/bar_bad.vgtest 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,3 +1,3 @@
-prereq: ./supported_libpthread
+prereq: test -e bar_bad && ./supported_libpthread
prog: bar_bad
vgopts: -q
Modified: branches/DARWIN/drd/tests/bar_trivial.vgtest
===================================================================
--- branches/DARWIN/drd/tests/bar_trivial.vgtest 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/bar_trivial.vgtest 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,3 +1,3 @@
-prereq: ./supported_libpthread
+prereq: test -e bar_trivial && ./supported_libpthread
prog: bar_trivial
vgopts: -q
Modified: branches/DARWIN/drd/tests/matinv.vgtest
===================================================================
--- branches/DARWIN/drd/tests/matinv.vgtest 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/matinv.vgtest 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,3 +1,3 @@
-prereq: ./supported_libpthread
+prereq: test -e matinv && ./supported_libpthread
prog: matinv
args: 30 -t 15 -q
Modified: branches/DARWIN/drd/tests/pth_barrier.vgtest
===================================================================
--- branches/DARWIN/drd/tests/pth_barrier.vgtest 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/pth_barrier.vgtest 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,4 +1,4 @@
-prereq: ./supported_libpthread
+prereq: test -e pth_barrier && ./supported_libpthread
prog: pth_barrier
args: 2 1 1
stderr_filter: filter_error_summary
Modified: branches/DARWIN/drd/tests/pth_barrier2.vgtest
===================================================================
--- branches/DARWIN/drd/tests/pth_barrier2.vgtest 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/pth_barrier2.vgtest 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,4 +1,4 @@
-prereq: ./supported_libpthread
+prereq: test -e pth_barrier && ./supported_libpthread
prog: pth_barrier
args: 2 32 1
stderr_filter: filter_error_summary
Modified: branches/DARWIN/drd/tests/pth_barrier3.vgtest
===================================================================
--- branches/DARWIN/drd/tests/pth_barrier3.vgtest 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/pth_barrier3.vgtest 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,4 +1,4 @@
-prereq: ./supported_libpthread
+prereq: test -e pth_barrier && ./supported_libpthread
prog: pth_barrier
args: 32 1 1
stderr_filter: filter_error_summary
Modified: branches/DARWIN/drd/tests/pth_barrier_reinit.vgtest
===================================================================
--- branches/DARWIN/drd/tests/pth_barrier_reinit.vgtest 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/pth_barrier_reinit.vgtest 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,2 +1,2 @@
-prereq: ./supported_libpthread
+prereq: test -e pth_barrier_reinit && ./supported_libpthread
prog: pth_barrier_reinit
Deleted: branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp
===================================================================
--- branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,40 +0,0 @@
-
-Thread 3:
-Inconsistent association of condition variable and mutex: condition variable 0x........, mutexes 0x........ and 0x........
- at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
- by 0x........: thread2 (pth_inconsistent_cond_wait.c:?)
- by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
- by 0x........: (within libpthread-?.?.so)
- by 0x........: clone (in /...libc...)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
- by 0x........: main (pth_inconsistent_cond_wait.c:?)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (pth_inconsistent_cond_wait.c:?)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (pth_inconsistent_cond_wait.c:?)
-
-Thread 1:
-Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
- at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
- by 0x........: main (pth_inconsistent_cond_wait.c:?)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
- by 0x........: main (pth_inconsistent_cond_wait.c:?)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (pth_inconsistent_cond_wait.c:?)
-
-Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
- at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
- by 0x........: main (pth_inconsistent_cond_wait.c:?)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
- by 0x........: main (pth_inconsistent_cond_wait.c:?)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (pth_inconsistent_cond_wait.c:?)
-
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Copied: branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 (from rev 9001, trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp1)
===================================================================
--- branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 (rev 0)
+++ branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 2009-01-20 23:07:34 UTC (rev 9003)
@@ -0,0 +1,40 @@
+
+Thread 3:
+Inconsistent association of condition variable and mutex: condition variable 0x........, mutexes 0x........ and 0x........
+ at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
+ by 0x........: thread2 (pth_inconsistent_cond_wait.c:?)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+
+Thread 1:
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Copied: branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 (from rev 9001, trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp2)
===================================================================
--- branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 (rev 0)
+++ branches/DARWIN/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 2009-01-20 23:07:34 UTC (rev 9003)
@@ -0,0 +1,40 @@
+
+Thread 2:
+Inconsistent association of condition variable and mutex: condition variable 0x........, mutexes 0x........ and 0x........
+ at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
+ by 0x........: thread1 (pth_inconsistent_cond_wait.c:?)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+
+Thread 1:
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Modified: branches/DARWIN/drd/tests/pth_spinlock.vgtest
===================================================================
--- branches/DARWIN/drd/tests/pth_spinlock.vgtest 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/pth_spinlock.vgtest 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,3 +1,3 @@
-prereq: ./supported_libpthread
+prereq: test -e pth_spinlock && ./supported_libpthread
vgopts: --var-info=yes --check-stack-var=yes
prog: pth_spinlock
Modified: branches/DARWIN/drd/tests/tc20_verifywrap.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap.vgtest 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/tc20_verifywrap.vgtest 2009-01-20 23:07:34 UTC (rev 9003)
@@ -1,3 +1,3 @@
-prereq: ./supported_libpthread
+prereq: test -e tc20_verifywrap && ./supported_libpthread
vgopts: --var-info=yes --check-stack-var=yes
prog: tc20_verifywrap
Modified: branches/DARWIN/drd/tests/trylock.c
===================================================================
--- branches/DARWIN/drd/tests/trylock.c 2009-01-20 22:54:50 UTC (rev 9002)
+++ branches/DARWIN/drd/tests/trylock.c 2009-01-20 23:07:34 UTC (rev 9003)
@@ -10,6 +10,7 @@
#define _GNU_SOURCE 1
+#include "../../config.h"
#include <stdio.h>
#include <assert.h>
#include <pthread.h>
@@ -24,7 +25,6 @@
time(&abs_timeout.tv_sec);
abs_timeout.tv_nsec = 0;
-
abs_timeout.tv_sec += 10;
r = pthread_rwlock_init(&rwlock, NULL); assert(r == 0);
@@ -35,8 +35,10 @@
r = pthread_rwlock_trywrlock(&rwlock); assert(r == 0);
r = pthread_rwlock_unlock(&rwlock); assert(r == 0);
fprintf(stderr, "Locking rwlock via pthread_rwlock_timedwrlock().\n");
+#ifdef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
r = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout); assert(r == 0);
r = pthread_rwlock_unlock(&rwlock); assert(r == 0);
+#endif
fprintf(stderr, "Locking rwlock via pthread_rwlock_rdlock().\n");
r = pthread_rwlock_rdlock(&rwlock); assert(r == 0);
r = pthread_rwlock_rdlock(&rwlock); assert(r == 0);
@@ -48,8 +50,10 @@
r = pthread_rwlock_tryrdlock(&rwlock); assert(r == 0);
r = pthread_rwlock_unlock(&rwlock); assert(r == 0);
fprintf(stderr, "Locking rwlock via pthread_rwlock_timedrdlock().\n");
+#ifdef HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK
r = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout); assert(r == 0);
r = pthread_rwlock_unlock(&rwlock); assert(r == 0);
+#endif
fprintf(stderr, "Attempt to lock for writing recursively (not allowed).\n");
r = pthread_rwlock_wrlock(&rwlock); assert(r == 0);
r = pthread_rwlock_wrlock(&rwlock); assert(r != 0);
@@ -64,8 +68,10 @@
r = pthread_mutex_lock(&mutex); assert(r == 0);
r = pthread_mutex_unlock(&mutex); assert(r == 0);
fprintf(stderr, "Locking mutex via pthread_mutex_timedlock().\n");
+#ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK
r = pthread_mutex_timedlock(&mutex, &abs_timeout); assert(r == 0);
r = pthread_mutex_unlock(&mutex); assert(r == 0);
+#endif
r = pthread_mutex_destroy(&mutex); assert(r == 0);
return 0;
|
|
From: <sv...@va...> - 2009-01-20 22:54:56
|
Author: njn Date: 2009-01-20 22:54:50 +0000 (Tue, 20 Jan 2009) New Revision: 9002 Log: A couple more changes to fix the conditional building of DRD tests. Modified: trunk/drd/tests/pth_barrier2.vgtest trunk/drd/tests/pth_barrier3.vgtest trunk/drd/tests/trylock.c Modified: trunk/drd/tests/pth_barrier2.vgtest =================================================================== --- trunk/drd/tests/pth_barrier2.vgtest 2009-01-20 14:29:52 UTC (rev 9001) +++ trunk/drd/tests/pth_barrier2.vgtest 2009-01-20 22:54:50 UTC (rev 9002) @@ -1,4 +1,4 @@ -prereq: ./supported_libpthread +prereq: test -e pth_barrier && ./supported_libpthread prog: pth_barrier args: 2 32 1 stderr_filter: filter_error_summary Modified: trunk/drd/tests/pth_barrier3.vgtest =================================================================== --- trunk/drd/tests/pth_barrier3.vgtest 2009-01-20 14:29:52 UTC (rev 9001) +++ trunk/drd/tests/pth_barrier3.vgtest 2009-01-20 22:54:50 UTC (rev 9002) @@ -1,4 +1,4 @@ -prereq: ./supported_libpthread +prereq: test -e pth_barrier && ./supported_libpthread prog: pth_barrier args: 32 1 1 stderr_filter: filter_error_summary Modified: trunk/drd/tests/trylock.c =================================================================== --- trunk/drd/tests/trylock.c 2009-01-20 14:29:52 UTC (rev 9001) +++ trunk/drd/tests/trylock.c 2009-01-20 22:54:50 UTC (rev 9002) @@ -68,8 +68,10 @@ r = pthread_mutex_lock(&mutex); assert(r == 0); r = pthread_mutex_unlock(&mutex); assert(r == 0); fprintf(stderr, "Locking mutex via pthread_mutex_timedlock().\n"); +#ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK r = pthread_mutex_timedlock(&mutex, &abs_timeout); assert(r == 0); r = pthread_mutex_unlock(&mutex); assert(r == 0); +#endif r = pthread_mutex_destroy(&mutex); assert(r == 0); return 0; |
|
From: Nicholas N. <n.n...@gm...> - 2009-01-20 22:30:31
|
On Wed, Jan 21, 2009 at 12:08 AM, Florian Krohm <br...@ac...> wrote:
> On Monday 19 January 2009 23:16:09 sv...@va... wrote:
>> - VG_(printf)("%d %d\n", *thin_size, sizeof(struct MACH_HEADER));
>> + VG_(printf)("%d %lu\n", *thin_size, sizeof(struct MACH_HEADER));
>
>
> C99 has %zu for arguments of type size_t. It's possible, though, that some
> older versions of gcc -Wformat don't handle this. What is the minimum GCC
> version that you assume for compilation ?
We still have a --workaround-gcc296-bugs flag...
Nick
|
|
From: <sv...@va...> - 2009-01-20 14:29:59
|
Author: bart Date: 2009-01-20 14:29:52 +0000 (Tue, 20 Jan 2009) New Revision: 9001 Log: Added yet another output variant. Added: trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-1 trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-2 Removed: trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins Modified: trunk/drd/tests/Makefile.am Modified: trunk/drd/tests/Makefile.am =================================================================== --- trunk/drd/tests/Makefile.am 2009-01-20 14:25:22 UTC (rev 9000) +++ trunk/drd/tests/Makefile.am 2009-01-20 14:29:52 UTC (rev 9001) @@ -17,7 +17,8 @@ EXTRA_DIST = \ $(noinst_SCRIPTS) \ - atomic_var.stderr.exp-with-atomic-builtins \ + atomic_var.stderr.exp-with-atomic-builtins-1 \ + atomic_var.stderr.exp-with-atomic-builtins-2 \ atomic_var.stderr.exp-without-atomic-builtins \ atomic_var.vgtest \ bar_bad.stderr.exp \ Deleted: trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins =================================================================== --- trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins 2009-01-20 14:25:22 UTC (rev 9000) +++ trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins 2009-01-20 14:29:52 UTC (rev 9001) @@ -1,14 +0,0 @@ - -Start of test. -Thread 2: -Conflicting load by thread 2/3 at 0x........ size 4 - at 0x........: thread_func_2 (atomic_var.c:?) - by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?) - by 0x........: (within libpthread-?.?.so) - by 0x........: clone (in /...libc...) -Location 0x........ is 0 bytes inside local var "s_y" -declared at atomic_var.c:39, in frame #? of thread 2 -y = 1 -Test finished. - -ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Copied: trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-1 (from rev 8994, trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins) =================================================================== --- trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-1 (rev 0) +++ trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-1 2009-01-20 14:29:52 UTC (rev 9001) @@ -0,0 +1,14 @@ + +Start of test. +Thread 2: +Conflicting load by thread 2/3 at 0x........ size 4 + at 0x........: thread_func_2 (atomic_var.c:?) + by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?) + by 0x........: (within libpthread-?.?.so) + by 0x........: clone (in /...libc...) +Location 0x........ is 0 bytes inside local var "s_y" +declared at atomic_var.c:39, in frame #? of thread 2 +y = 1 +Test finished. + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Added: trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-2 =================================================================== --- trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-2 (rev 0) +++ trunk/drd/tests/atomic_var.stderr.exp-with-atomic-builtins-2 2009-01-20 14:29:52 UTC (rev 9001) @@ -0,0 +1,14 @@ + +Start of test. +Thread 3: +Conflicting load by thread 3/3 at 0x........ size 4 + at 0x........: thread_func_2 (atomic_var.c:?) + by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?) + by 0x........: (within libpthread-?.?.so) + by 0x........: clone (in /...libc...) +Location 0x........ is 0 bytes inside local var "s_y" +declared at atomic_var.c:39, in frame #? of thread 3 +y = 1 +Test finished. + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) |
|
From: <sv...@va...> - 2009-01-20 14:25:31
|
Author: bart Date: 2009-01-20 14:25:22 +0000 (Tue, 20 Jan 2009) New Revision: 9000 Log: Added yet another output variant. Added: trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 Removed: trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp Modified: trunk/drd/tests/Makefile.am Modified: trunk/drd/tests/Makefile.am =================================================================== --- trunk/drd/tests/Makefile.am 2009-01-20 14:18:29 UTC (rev 8999) +++ trunk/drd/tests/Makefile.am 2009-01-20 14:25:22 UTC (rev 9000) @@ -108,7 +108,8 @@ pth_detached_sem.stderr.exp \ pth_detached_sem.stdout.exp \ pth_detached_sem.vgtest \ - pth_inconsistent_cond_wait.stderr.exp \ + pth_inconsistent_cond_wait.stderr.exp1 \ + pth_inconsistent_cond_wait.stderr.exp2 \ pth_inconsistent_cond_wait.vgtest \ pth_spinlock.stderr.exp \ pth_spinlock.vgtest \ Deleted: trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp =================================================================== --- trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp 2009-01-20 14:18:29 UTC (rev 8999) +++ trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp 2009-01-20 14:25:22 UTC (rev 9000) @@ -1,40 +0,0 @@ - -Thread 3: -Inconsistent association of condition variable and mutex: condition variable 0x........, mutexes 0x........ and 0x........ - at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?) - by 0x........: thread2 (pth_inconsistent_cond_wait.c:?) - by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?) - by 0x........: (within libpthread-?.?.so) - by 0x........: clone (in /...libc...) -cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) - by 0x........: main (pth_inconsistent_cond_wait.c:?) -mutex 0x........ was first observed at: - at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) - by 0x........: main (pth_inconsistent_cond_wait.c:?) -mutex 0x........ was first observed at: - at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) - by 0x........: main (pth_inconsistent_cond_wait.c:?) - -Thread 1: -Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread. - at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?) - by 0x........: main (pth_inconsistent_cond_wait.c:?) -cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) - by 0x........: main (pth_inconsistent_cond_wait.c:?) -mutex 0x........ was first observed at: - at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) - by 0x........: main (pth_inconsistent_cond_wait.c:?) - -Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread. - at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?) - by 0x........: main (pth_inconsistent_cond_wait.c:?) -cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) - by 0x........: main (pth_inconsistent_cond_wait.c:?) -mutex 0x........ was first observed at: - at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) - by 0x........: main (pth_inconsistent_cond_wait.c:?) - -ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) Copied: trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 (from rev 8994, trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp) =================================================================== --- trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 (rev 0) +++ trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 2009-01-20 14:25:22 UTC (rev 9000) @@ -0,0 +1,40 @@ + +Thread 3: +Inconsistent association of condition variable and mutex: condition variable 0x........, mutexes 0x........ and 0x........ + at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?) + by 0x........: thread2 (pth_inconsistent_cond_wait.c:?) + by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?) + by 0x........: (within libpthread-?.?.so) + by 0x........: clone (in /...libc...) +cond 0x........ was first observed at: + at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +mutex 0x........ was first observed at: + at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +mutex 0x........ was first observed at: + at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) + +Thread 1: +Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread. + at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +cond 0x........ was first observed at: + at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +mutex 0x........ was first observed at: + at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) + +Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread. + at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +cond 0x........ was first observed at: + at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +mutex 0x........ was first observed at: + at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) + +ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) Added: trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 =================================================================== --- trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 (rev 0) +++ trunk/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 2009-01-20 14:25:22 UTC (rev 9000) @@ -0,0 +1,40 @@ + +Thread 2: +Inconsistent association of condition variable and mutex: condition variable 0x........, mutexes 0x........ and 0x........ + at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?) + by 0x........: thread1 (pth_inconsistent_cond_wait.c:?) + by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?) + by 0x........: (within libpthread-?.?.so) + by 0x........: clone (in /...libc...) +cond 0x........ was first observed at: + at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +mutex 0x........ was first observed at: + at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +mutex 0x........ was first observed at: + at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) + +Thread 1: +Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread. + at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +cond 0x........ was first observed at: + at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +mutex 0x........ was first observed at: + at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) + +Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread. + at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +cond 0x........ was first observed at: + at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) +mutex 0x........ was first observed at: + at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) + by 0x........: main (pth_inconsistent_cond_wait.c:?) + +ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) |
|
From: <sv...@va...> - 2009-01-20 14:18:40
|
Author: bart Date: 2009-01-20 14:18:29 +0000 (Tue, 20 Jan 2009) New Revision: 8999 Log: Elaborated prereq clauses. Modified: trunk/drd/tests/bar_bad.vgtest trunk/drd/tests/bar_trivial.vgtest trunk/drd/tests/matinv.vgtest trunk/drd/tests/pth_barrier.vgtest trunk/drd/tests/pth_barrier_reinit.vgtest trunk/drd/tests/pth_spinlock.vgtest trunk/drd/tests/tc20_verifywrap.vgtest Modified: trunk/drd/tests/bar_bad.vgtest =================================================================== --- trunk/drd/tests/bar_bad.vgtest 2009-01-20 14:02:22 UTC (rev 8998) +++ trunk/drd/tests/bar_bad.vgtest 2009-01-20 14:18:29 UTC (rev 8999) @@ -1,3 +1,3 @@ -prereq: ./supported_libpthread +prereq: test -e bar_bad && ./supported_libpthread prog: bar_bad vgopts: -q Modified: trunk/drd/tests/bar_trivial.vgtest =================================================================== --- trunk/drd/tests/bar_trivial.vgtest 2009-01-20 14:02:22 UTC (rev 8998) +++ trunk/drd/tests/bar_trivial.vgtest 2009-01-20 14:18:29 UTC (rev 8999) @@ -1,3 +1,3 @@ -prereq: ./supported_libpthread +prereq: test -e bar_trivial && ./supported_libpthread prog: bar_trivial vgopts: -q Modified: trunk/drd/tests/matinv.vgtest =================================================================== --- trunk/drd/tests/matinv.vgtest 2009-01-20 14:02:22 UTC (rev 8998) +++ trunk/drd/tests/matinv.vgtest 2009-01-20 14:18:29 UTC (rev 8999) @@ -1,3 +1,3 @@ -prereq: ./supported_libpthread +prereq: test -e matinv && ./supported_libpthread prog: matinv args: 30 -t 15 -q Modified: trunk/drd/tests/pth_barrier.vgtest =================================================================== --- trunk/drd/tests/pth_barrier.vgtest 2009-01-20 14:02:22 UTC (rev 8998) +++ trunk/drd/tests/pth_barrier.vgtest 2009-01-20 14:18:29 UTC (rev 8999) @@ -1,4 +1,4 @@ -prereq: ./supported_libpthread +prereq: test -e pth_barrier && ./supported_libpthread prog: pth_barrier args: 2 1 1 stderr_filter: filter_error_summary Modified: trunk/drd/tests/pth_barrier_reinit.vgtest =================================================================== --- trunk/drd/tests/pth_barrier_reinit.vgtest 2009-01-20 14:02:22 UTC (rev 8998) +++ trunk/drd/tests/pth_barrier_reinit.vgtest 2009-01-20 14:18:29 UTC (rev 8999) @@ -1,2 +1,2 @@ -prereq: ./supported_libpthread +prereq: test -e pth_barrier_reinit && ./supported_libpthread prog: pth_barrier_reinit Modified: trunk/drd/tests/pth_spinlock.vgtest =================================================================== --- trunk/drd/tests/pth_spinlock.vgtest 2009-01-20 14:02:22 UTC (rev 8998) +++ trunk/drd/tests/pth_spinlock.vgtest 2009-01-20 14:18:29 UTC (rev 8999) @@ -1,3 +1,3 @@ -prereq: ./supported_libpthread +prereq: test -e pth_spinlock && ./supported_libpthread vgopts: --var-info=yes --check-stack-var=yes prog: pth_spinlock Modified: trunk/drd/tests/tc20_verifywrap.vgtest =================================================================== --- trunk/drd/tests/tc20_verifywrap.vgtest 2009-01-20 14:02:22 UTC (rev 8998) +++ trunk/drd/tests/tc20_verifywrap.vgtest 2009-01-20 14:18:29 UTC (rev 8999) @@ -1,3 +1,3 @@ -prereq: ./supported_libpthread +prereq: test -e tc20_verifywrap && ./supported_libpthread vgopts: --var-info=yes --check-stack-var=yes prog: tc20_verifywrap |
|
From: <sv...@va...> - 2009-01-20 14:02:29
|
Author: bart Date: 2009-01-20 14:02:22 +0000 (Tue, 20 Jan 2009) New Revision: 8998 Log: Made compilation of multiple tests conditional. Modified: trunk/drd/tests/Makefile.am Modified: trunk/drd/tests/Makefile.am =================================================================== --- trunk/drd/tests/Makefile.am 2009-01-20 14:01:16 UTC (rev 8997) +++ trunk/drd/tests/Makefile.am 2009-01-20 14:02:22 UTC (rev 8998) @@ -204,8 +204,6 @@ check_PROGRAMS = \ atomic_var \ - bar_bad \ - bar_trivial \ circular_buffer \ drd_bitmap_test \ fp_race \ @@ -217,12 +215,9 @@ hg06_readshared \ hold_lock \ linuxthreads_det \ - matinv \ memory_allocation \ monitor_example \ new_delete \ - pth_barrier \ - pth_barrier_reinit \ pth_broadcast \ pth_cancel_locked \ pth_cond_race \ @@ -230,7 +225,6 @@ pth_detached \ pth_detached_sem \ pth_inconsistent_cond_wait \ - pth_spinlock \ recursive_mutex \ rwlock_race \ rwlock_test \ @@ -254,7 +248,6 @@ tc17_sembar \ tc18_semabuse \ tc19_shadowmem \ - tc20_verifywrap \ tc21_pthonce \ tc22_exit_w_lock \ tc23_bogus_condwait \ @@ -269,6 +262,18 @@ check_PROGRAMS += omp_matinv omp_prime omp_printf endif +if HAVE_PTHREAD_BARRIER +check_PROGRAMS += bar_bad bar_trivial matinv pth_barrier pth_barrier_reinit +endif + +if HAVE_PTHREAD_MUTEX_TIMEDLOCK +check_PROGRAMS += tc20_verifywrap +endif + +if HAVE_PTHREAD_SPINLOCK +check_PROGRAMS += pth_spinlock +endif + if HAVE_QTCORE check_PROGRAMS += qt4_mutex qt4_rwlock qt4_semaphore endif @@ -277,12 +282,6 @@ atomic_var_SOURCES = atomic_var.c atomic_var_LDADD = -lpthread -bar_bad_SOURCES = ../../helgrind/tests/bar_bad.c -bar_bad_LDADD = -lpthread - -bar_trivial_SOURCES = ../../helgrind/tests/bar_trivial.c -bar_trivial_LDADD = -lpthread - circular_buffer_SOURCES = circular_buffer.c circular_buffer_LDADD = -lpthread @@ -318,9 +317,6 @@ linuxthreads_det_SOURCES = linuxthreads_det.c linuxthreads_det_LDADD = -lpthread -matinv_SOURCES = matinv.c -matinv_LDADD = -lpthread -lm - memory_allocation_SOURCES = memory_allocation.c monitor_example_SOURCES = monitor_example.cpp @@ -328,12 +324,6 @@ new_delete_SOURCES = new_delete.cpp -pth_barrier_SOURCES = pth_barrier.c -pth_barrier_LDADD = -lpthread - -pth_barrier_reinit_SOURCES = pth_barrier_reinit.c -pth_barrier_reinit_LDADD = -lpthread - pth_broadcast_SOURCES = pth_broadcast.c pth_broadcast_LDADD = -lpthread @@ -355,9 +345,6 @@ pth_inconsistent_cond_wait_SOURCES = pth_inconsistent_cond_wait.c pth_inconsistent_cond_wait_LDADD = -lpthread -pth_spinlock_SOURCES = pth_spinlock.c -pth_spinlock_LDADD = -lpthread - recursive_mutex_SOURCES = recursive_mutex.c recursive_mutex_LDADD = -lpthread @@ -427,9 +414,6 @@ tc19_shadowmem_SOURCES = ../../helgrind/tests/tc19_shadowmem.c tc19_shadowmem_LDADD = -lpthread -tc20_verifywrap_SOURCES = ../../helgrind/tests/tc20_verifywrap.c -tc20_verifywrap_LDADD = -lpthread - tc21_pthonce_SOURCES = ../../helgrind/tests/tc21_pthonce.c tc21_pthonce_LDADD = -lpthread @@ -468,6 +452,33 @@ omp_printf_LDADD = -lm endif +if HAVE_PTHREAD_BARRIER +bar_bad_SOURCES = ../../helgrind/tests/bar_bad.c +bar_bad_LDADD = -lpthread + +bar_trivial_SOURCES = ../../helgrind/tests/bar_trivial.c +bar_trivial_LDADD = -lpthread + +matinv_SOURCES = matinv.c +matinv_LDADD = -lpthread -lm + +pth_barrier_SOURCES = pth_barrier.c +pth_barrier_LDADD = -lpthread + +pth_barrier_reinit_SOURCES = pth_barrier_reinit.c +pth_barrier_reinit_LDADD = -lpthread +endif + +if HAVE_PTHREAD_MUTEX_TIMEDLOCK +tc20_verifywrap_SOURCES = ../../helgrind/tests/tc20_verifywrap.c +tc20_verifywrap_LDADD = -lpthread +endif + +if HAVE_PTHREAD_SPINLOCK +pth_spinlock_SOURCES = pth_spinlock.c +pth_spinlock_LDADD = -lpthread +endif + if HAVE_QTCORE qt4_mutex_SOURCES = qt4_mutex.cpp qt4_mutex_CXXFLAGS = $(AM_CXXFLAGS) $(QTCORE_CFLAGS) |
|
From: <sv...@va...> - 2009-01-20 14:01:22
|
Author: bart
Date: 2009-01-20 14:01:16 +0000 (Tue, 20 Jan 2009)
New Revision: 8997
Log:
Added automake conditional HAVE_PTHREAD_MUTEX_TIMEDLOCK.
Modified:
trunk/configure.in
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-01-20 13:57:50 UTC (rev 8996)
+++ trunk/configure.in 2009-01-20 14:01:16 UTC (rev 8997)
@@ -1352,6 +1352,8 @@
AM_CONDITIONAL([HAVE_PTHREAD_BARRIER],
[test x$ac_cv_func_pthread_barrier_init = xyes])
+AM_CONDITIONAL([HAVE_PTHREAD_MUTEX_TIMEDLOCK],
+ [test x$ac_cv_func_pthread_mutex_timedlock = xyes])
AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
[test x$ac_cv_func_pthread_spin_lock = xyes])
|
|
From: <sv...@va...> - 2009-01-20 13:58:00
|
Author: bart Date: 2009-01-20 13:57:50 +0000 (Tue, 20 Jan 2009) New Revision: 8996 Log: Only call pthread_rwlock_timedwrlock() or pthread_rwlock_timedrdlock() if supported. Modified: trunk/drd/tests/trylock.c Modified: trunk/drd/tests/trylock.c =================================================================== --- trunk/drd/tests/trylock.c 2009-01-20 13:45:38 UTC (rev 8995) +++ trunk/drd/tests/trylock.c 2009-01-20 13:57:50 UTC (rev 8996) @@ -10,6 +10,7 @@ #define _GNU_SOURCE 1 +#include "../../config.h" #include <stdio.h> #include <assert.h> #include <pthread.h> @@ -24,7 +25,6 @@ time(&abs_timeout.tv_sec); abs_timeout.tv_nsec = 0; - abs_timeout.tv_sec += 10; r = pthread_rwlock_init(&rwlock, NULL); assert(r == 0); @@ -35,8 +35,10 @@ r = pthread_rwlock_trywrlock(&rwlock); assert(r == 0); r = pthread_rwlock_unlock(&rwlock); assert(r == 0); fprintf(stderr, "Locking rwlock via pthread_rwlock_timedwrlock().\n"); +#ifdef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK r = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout); assert(r == 0); r = pthread_rwlock_unlock(&rwlock); assert(r == 0); +#endif fprintf(stderr, "Locking rwlock via pthread_rwlock_rdlock().\n"); r = pthread_rwlock_rdlock(&rwlock); assert(r == 0); r = pthread_rwlock_rdlock(&rwlock); assert(r == 0); @@ -48,8 +50,10 @@ r = pthread_rwlock_tryrdlock(&rwlock); assert(r == 0); r = pthread_rwlock_unlock(&rwlock); assert(r == 0); fprintf(stderr, "Locking rwlock via pthread_rwlock_timedrdlock().\n"); +#ifdef HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK r = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout); assert(r == 0); r = pthread_rwlock_unlock(&rwlock); assert(r == 0); +#endif fprintf(stderr, "Attempt to lock for writing recursively (not allowed).\n"); r = pthread_rwlock_wrlock(&rwlock); assert(r == 0); r = pthread_rwlock_wrlock(&rwlock); assert(r != 0); |
|
From: <sv...@va...> - 2009-01-20 13:45:50
|
Author: bart
Date: 2009-01-20 13:45:38 +0000 (Tue, 20 Jan 2009)
New Revision: 8995
Log:
Added configure tests for optional POSIX threads functionality.
Modified:
trunk/configure.in
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-01-20 06:56:26 UTC (rev 8994)
+++ trunk/configure.in 2009-01-20 13:45:38 UTC (rev 8995)
@@ -1327,7 +1327,12 @@
memset \
mkdir \
ppoll \
- pthread_condattr_setclock \
+ pthread_barrier_init \
+ pthread_condattr_setclock \
+ pthread_mutex_timedlock \
+ pthread_rwlock_timedrdlock \
+ pthread_rwlock_timedwrlock \
+ pthread_spin_lock \
semtimedop \
signalfd \
syscall \
@@ -1345,6 +1350,11 @@
# want for e.g. vgpreload_core-x86-linux.so
LIBS=""
+AM_CONDITIONAL([HAVE_PTHREAD_BARRIER],
+ [test x$ac_cv_func_pthread_barrier_init = xyes])
+AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
+ [test x$ac_cv_func_pthread_spin_lock = xyes])
+
# Do we have a useable MPI setup on the primary and/or secondary targets?
# On Linux, by default, assumes mpicc and -m32/-m64
# On AIX, by default, assumes mpxlc and -q32/-q64
|
|
From: Konstantin S. <kon...@gm...> - 2009-01-20 13:29:21
|
Hello, I am experiencing a problem with valgrind: the memcheck process becomes zombie at the very end of the program execution. This happens with the fresh valgrind trunk. I run valgrind -v --trace-syscalls=yes my_program and it hangs one out of 5-10 runs. 'top' shows: 7806 me 18 0 0 0 0 Z 0 0.0 0:16.27 memcheck <defunct> The last lines printed by valgrind before it hangs are: SYSCALL[7806,4]( 9) sys_mmap ( 0x0, 69632, 7, 98, -1, 0 ) --> [pre-success] Success(0xbb6b000) SYSCALL[7806,4]( 10) sys_mprotect ( 0xbb6b000, 4096, 0 )[sync] --> Success(0x0) SYSCALL[7806,4]( 56) sys_clone ( 3d0f00, 0xbb7a1d0, 0xbb7b9f0, 0xbb7b9f0, 0xbb7b960 ) --> [pre-success] Success(0x1f93) SYSCALL[7806,4]( 96) sys_gettimeofday ( 0xb75bd70, 0x0 )[sync] --> Success(0x0) SYSCALL[7806,4]( 96) sys_gettimeofday ( 0xb75bac0, 0x0 )[sync] --> Success(0x0) SYSCALL[7806,4]( 96) sys_gettimeofday ( 0xb75bd70, 0x0 )[sync] --> Success(0x0) SYSCALL[7806,4]( 96) sys_gettimeofday ( 0xb75bac0, 0x0 )[sync] --> Success(0x0) SYSCALL[7806,4](202) sys_futex ( 0x8427820, 0, 0, 0xb75bb20, 0x8427820 ) --> [async] ... SYSCALL[7806,4](202) ... [async] --> Failure(0x6e) SYSCALL[7806,4]( 96) sys_gettimeofday ( 0xb75bac0, 0x0 )[sync] --> Success(0x0) SYSCALL[7806,4]( 96) sys_gettimeofday ( 0xb75bd70, 0x0 )[sync] --> Success(0x0) SYSCALL[7806,4]( 96) sys_gettimeofday ( 0xb75bac0, 0x0 )[sync] --> Success(0x0) SYSCALL[7806,4](202) sys_futex ( 0x8427820, 0, 0, 0xb75bb20, 0x8427820 ) --> [async] ... SYSCALL[7806,1]( 11) sys_munmap ( 0x8437000, 8192 )[sync] --> Success(0x0) SYSCALL[7806,1](231) exit_group( 0 ) --> [pre-success] Success(0x0) SYSCALL[7806,5](186) sys_gettid ()[sync] --> Success(0x1f93) SYSCALL[7806,5](202) sys_futex ( 0x8427f20, 0, 0, 0x0, 0x8427f20 ) --> [async] ... SYSCALL[7806,4](202) ... [async] --> Failure(0x6e) If valgrind passes, it does not print lines containing "Failure(0x6e)" Any idea how to attack this problem further? Thanks, --kcc |
|
From: Florian K. <br...@ac...> - 2009-01-20 13:09:07
|
On Monday 19 January 2009 23:16:09 sv...@va... wrote:
> - VG_(printf)("%d %d\n", *thin_size, sizeof(struct MACH_HEADER));
> + VG_(printf)("%d %lu\n", *thin_size, sizeof(struct MACH_HEADER));
C99 has %zu for arguments of type size_t. It's possible, though, that some
older versions of gcc -Wformat don't handle this. What is the minimum GCC
version that you assume for compilation ?
Florian
|
|
From: Bart V. A. <bar...@gm...> - 2009-01-20 08:37:00
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) started at 2009-01-20 02:00:01 EST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 406 tests, 44 stderr failures, 12 stdout failures, 2 post failures == 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/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) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) massif/tests/long-names (post) massif/tests/overloaded-new (post) memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/pointer-trace (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/x86-linux/scalar (stderr) memcheck/tests/x86-linux/scalar_exit_group (stderr) memcheck/tests/x86-linux/scalar_fork (stderr) memcheck/tests/x86-linux/scalar_supp (stderr) memcheck/tests/x86-linux/scalar_vfork (stderr) memcheck/tests/zeropage (stdout) none/tests/async-sigs (stdout) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) 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) |
|
From: <sv...@va...> - 2009-01-20 06:56:32
|
Author: njn
Date: 2009-01-20 06:56:26 +0000 (Tue, 20 Jan 2009)
New Revision: 8994
Log:
Generate default.supp at compile-time, not configure-time.
Modified:
trunk/Makefile.am
trunk/configure.in
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2009-01-20 06:32:24 UTC (rev 8993)
+++ trunk/Makefile.am 2009-01-20 06:56:26 UTC (rev 8994)
@@ -28,6 +28,7 @@
glibc-2.2-LinuxThreads-helgrind.supp \
glibc-2.X-drd.supp \
exp-ptrcheck.supp
+DEFAULT_SUPP_FILES = @DEFAULT_SUPP@
dist_val_DATA = $(SUPP_FILES) default.supp
@@ -66,7 +67,10 @@
# Ditto
endif
-default.supp: $(SUPP_FILES)
+default.supp: $(DEFAULT_SUPP_FILES)
+ echo "# This is a generated file, composed of the following suppression rules:" > default.supp
+ echo "# " $(DEFAULT_SUPP_FILES) >> default.supp
+ cat $(DEFAULT_SUPP_FILES) >> default.supp
## Preprend @PERL@ because tests/vg_regtest isn't executable
regtest: check
@@ -94,7 +98,7 @@
install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(valdir)
-all-local:
+all-local: default.supp
mkdir -p $(inplacedir)
rm -f $(addprefix $(inplacedir)/,default.supp $(SUPP_FILES))
ln -s ../default.supp $(inplacedir)
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-01-20 06:32:24 UTC (rev 8993)
+++ trunk/configure.in 2009-01-20 06:56:26 UTC (rev 8994)
@@ -209,6 +209,10 @@
fi
+# This variable will collect the individual suppression files
+# depending on the results of autoconf
+DEFAULT_SUPP=""
+AC_SUBST(DEFAULT_SUPP)
AC_MSG_CHECKING([for a supported OS])
AC_SUBST(VG_OS)
@@ -458,10 +462,6 @@
fi
-# This variable will collect the individual suppression files
-# depending on the results of autoconf
-DEFAULT_SUPP=""
-AC_SUBST(DEFAULT_SUPP)
GLIBC_VERSION=""
@@ -1687,15 +1687,3 @@
Default supp files: ${DEFAULT_SUPP}
EOF
-
-cat<<EOF > default.supp
-# This is a generated file, composed of the following suppression rules:
-#
-# ${DEFAULT_SUPP}
-#
-
-EOF
-
-for file in ${DEFAULT_SUPP} ; do
- cat ${srcdir}/$file >> default.supp
-done
|
|
From: <sv...@va...> - 2009-01-20 06:32:30
|
Author: njn
Date: 2009-01-20 06:32:24 +0000 (Tue, 20 Jan 2009)
New Revision: 8993
Log:
Load addresses are platform-specific. Merged from r8992 on the trunk.
Modified:
branches/DARWIN/configure.in
Modified: branches/DARWIN/configure.in
===================================================================
--- branches/DARWIN/configure.in 2009-01-20 06:06:52 UTC (rev 8992)
+++ branches/DARWIN/configure.in 2009-01-20 06:32:24 UTC (rev 8993)
@@ -345,6 +345,8 @@
x86-linux)
VG_PLATFORM_PRI="X86_LINUX"
VG_PLATFORM_SEC=""
+ valt_load_address_normal="0x38000000"
+ valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
amd64-linux)
@@ -359,11 +361,15 @@
VG_PLATFORM_PRI="AMD64_LINUX"
VG_PLATFORM_SEC="X86_LINUX"
fi
+ valt_load_address_normal="0x38000000"
+ valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc32-linux)
VG_PLATFORM_PRI="PPC32_LINUX"
VG_PLATFORM_SEC=""
+ valt_load_address_normal="0x38000000"
+ valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc64-aix5)
@@ -378,6 +384,8 @@
VG_PLATFORM_PRI="PPC64_AIX5"
VG_PLATFORM_SEC="PPC32_AIX5"
fi
+ valt_load_address_normal="0x38000000"
+ valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc64-linux)
@@ -392,11 +400,15 @@
VG_PLATFORM_PRI="PPC64_LINUX"
VG_PLATFORM_SEC="PPC32_LINUX"
fi
+ valt_load_address_normal="0x38000000"
+ valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
x86-darwin)
VG_PLATFORM_PRI="X86_DARWIN"
VG_PLATFORM_SEC=""
+ valt_load_address_normal="0x0"
+ valt_load_address_inner="0x0"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
amd64-darwin)
@@ -411,6 +423,8 @@
VG_PLATFORM_PRI="AMD64_DARWIN"
VG_PLATFORM_SEC="X86_DARWIN"
fi
+ valt_load_address_normal="0x0"
+ valt_load_address_inner="0x0"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
*)
@@ -499,16 +513,6 @@
# Check if this should be built as an inner Valgrind, to be run within
# another Valgrind. Choose the load address accordingly.
AC_SUBST(VALT_LOAD_ADDRESS)
-case "$VG_ARCH-$VG_OS" in
- *-linux|*-aix5)
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
- ;;
- *)
- valt_load_address_normal="0"
- valt_load_address_inner="0"
- ;;
-esac
AC_CACHE_CHECK([for use as an inner Valgrind], vg_cv_inner,
[AC_ARG_ENABLE(inner,
[ --enable-inner enables self-hosting],
|
|
From: <sv...@va...> - 2009-01-20 06:07:01
|
Author: njn
Date: 2009-01-20 06:06:52 +0000 (Tue, 20 Jan 2009)
New Revision: 8992
Log:
The load addresses depend on the platform, not the architecture.
Modified:
trunk/configure.in
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-01-20 06:06:20 UTC (rev 8991)
+++ trunk/configure.in 2009-01-20 06:06:52 UTC (rev 8992)
@@ -146,29 +146,21 @@
AC_SUBST(VG_ARCH_ALL)
VG_ARCH_ALL="amd64 ppc32 ppc64 x86"
-AC_SUBST(VALT_LOAD_ADDRESS)
-
case "${host_cpu}" in
i?86)
AC_MSG_RESULT([ok (${host_cpu})])
VG_ARCH_MAX="x86"
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
;;
x86_64)
AC_MSG_RESULT([ok (${host_cpu})])
VG_ARCH_MAX="amd64"
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
;;
powerpc64)
# This value can only happen on Linux, not on AIX
AC_MSG_RESULT([ok (${host_cpu})])
VG_ARCH_MAX="ppc64"
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
;;
powerpc)
@@ -183,8 +175,6 @@
VG_ARCH_MAX="ppc32"
;;
esac
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
;;
*)
@@ -193,20 +183,6 @@
;;
esac
-# Check if this should be built as an inner Valgrind, to be run within
-# another Valgrind. Choose the load address accordingly.
-AC_CACHE_CHECK([for use as an inner Valgrind], vg_cv_inner,
- [AC_ARG_ENABLE(inner,
- [ --enable-inner enables self-hosting],
- [vg_cv_inner=$enableval],
- [vg_cv_inner=no])])
-if test "$vg_cv_inner" = yes; then
- AC_DEFINE([ENABLE_INNER], 1, [configured to run as an inner Valgrind])
- VALT_LOAD_ADDRESS=$valt_load_address_inner
-else
- VALT_LOAD_ADDRESS=$valt_load_address_normal
-fi
-
# Sometimes it's convenient to subvert the bi-arch build system and
# just have a single build even though the underlying platform is
# capable of both. Hence handle --enable-only64bit and
@@ -344,6 +320,8 @@
x86-linux)
VG_PLATFORM_PRI="X86_LINUX"
VG_PLATFORM_SEC=""
+ valt_load_address_normal="0x38000000"
+ valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
amd64-linux)
@@ -358,11 +336,15 @@
VG_PLATFORM_PRI="AMD64_LINUX"
VG_PLATFORM_SEC="X86_LINUX"
fi
+ valt_load_address_normal="0x38000000"
+ valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc32-linux)
VG_PLATFORM_PRI="PPC32_LINUX"
VG_PLATFORM_SEC=""
+ valt_load_address_normal="0x38000000"
+ valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc64-aix5)
@@ -377,6 +359,8 @@
VG_PLATFORM_PRI="PPC64_AIX5"
VG_PLATFORM_SEC="PPC32_AIX5"
fi
+ valt_load_address_normal="0x38000000"
+ valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc64-linux)
@@ -391,6 +375,8 @@
VG_PLATFORM_PRI="PPC64_LINUX"
VG_PLATFORM_SEC="PPC32_LINUX"
fi
+ valt_load_address_normal="0x38000000"
+ valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
*)
@@ -456,6 +442,22 @@
test x$VG_PLATFORM_SEC != x)
+# Check if this should be built as an inner Valgrind, to be run within
+# another Valgrind. Choose the load address accordingly.
+AC_SUBST(VALT_LOAD_ADDRESS)
+AC_CACHE_CHECK([for use as an inner Valgrind], vg_cv_inner,
+ [AC_ARG_ENABLE(inner,
+ [ --enable-inner enables self-hosting],
+ [vg_cv_inner=$enableval],
+ [vg_cv_inner=no])])
+if test "$vg_cv_inner" = yes; then
+ AC_DEFINE([ENABLE_INNER], 1, [configured to run as an inner Valgrind])
+ VALT_LOAD_ADDRESS=$valt_load_address_inner
+else
+ VALT_LOAD_ADDRESS=$valt_load_address_normal
+fi
+
+
# This variable will collect the individual suppression files
# depending on the results of autoconf
DEFAULT_SUPP=""
|
|
From: <sv...@va...> - 2009-01-20 06:06:28
|
Author: njn Date: 2009-01-20 06:06:20 +0000 (Tue, 20 Jan 2009) New Revision: 8991 Log: VG_ARCH doesn't exist any more, use VG_ARCH_PRI in valgrind.pc.in. Modified: trunk/valgrind.pc.in Modified: trunk/valgrind.pc.in =================================================================== --- trunk/valgrind.pc.in 2009-01-20 04:16:06 UTC (rev 8990) +++ trunk/valgrind.pc.in 2009-01-20 06:06:20 UTC (rev 8991) @@ -2,7 +2,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@/valgrind -arch=@VG_ARCH@ +arch=@VG_ARCH_PRI@ os=@VG_OS@ platform=@VG_PLATFORM_PRI@ valt_load_address=@VALT_LOAD_ADDRESS@ |
Author: njn
Date: 2009-01-20 04:16:06 +0000 (Tue, 20 Jan 2009)
New Revision: 8990
Log:
Fix most of the compile warnings on Darwin.
Modified:
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/DARWIN/coregrind/m_debuginfo/readmacho.c
branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c
branches/DARWIN/coregrind/m_scheduler/scheduler.c
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
branches/DARWIN/coregrind/m_translate.c
branches/DARWIN/coregrind/m_ume_macho.c
branches/DARWIN/coregrind/pub_core_aspacemgr.h
branches/DARWIN/coregrind/vg_preloaded.c
branches/DARWIN/massif/ms_main.c
branches/DARWIN/memcheck/mc_leakcheck.c
Modified: branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -3467,8 +3467,6 @@
}
-// DDD: this is used in other modules -- should have a prototype in a .h
-// file.
void VG_(sync_mappings)(const HChar *when, const HChar *where, Int num)
{
sync_mapping_when = when ?: "?";
Modified: branches/DARWIN/coregrind/m_debuginfo/readmacho.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/readmacho.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/m_debuginfo/readmacho.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -320,7 +320,7 @@
if (*thin_size < sizeof(struct MACH_HEADER)) {
ML_(symerr)(NULL, False, "Invalid Mach-O file (3 too small).");
- VG_(printf)("%d %d\n", *thin_size, sizeof(struct MACH_HEADER));
+ VG_(printf)("%d %lu\n", *thin_size, sizeof(struct MACH_HEADER));
return 0;
}
@@ -518,7 +518,8 @@
if (debug_info_img) {
if (VG_(clo_verbosity) > 1)
- VG_(message)(Vg_DebugMsg, "Reading DWARF debuginfo for %s (%p) from %s"
+ VG_(message)(Vg_DebugMsg,
+ "Reading DWARF debuginfo for %s (%#lx) from %s"
" (%d %d %d %d %d %d)",
di->filename, di->text_avma, dsymfile,
debug_info_sz, debug_abbv_sz, debug_line_sz,
@@ -594,7 +595,7 @@
strs = (UChar *)(ob_oimage + symcmd->stroff);
if (VG_(clo_verbosity) > 1)
- VG_(message)(Vg_DebugMsg, "Reading nlist symbols and STABS debuginfo for %s (%p) (%d %d)",
+ VG_(message)(Vg_DebugMsg, "Reading nlist symbols and STABS debuginfo for %s (%#lx) (%d %d)",
di->filename, di->text_avma,
dysymcmd->nextdefsym, dysymcmd->nlocalsym );
// extern symbols
Modified: branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c
===================================================================
--- branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -780,6 +780,7 @@
NULL, // batch_free
NULL, // fixme introspect
2, // version (fixme 3?)
+ // DDD: on my machine this last field doesn't exist in malloc_zone_t.
(void*)VG_REPLACE_FUNCTION_ZU(m_libc_soname, malloc_zone_memalign)
};
Modified: branches/DARWIN/coregrind/m_scheduler/scheduler.c
===================================================================
--- branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -328,16 +328,19 @@
vg_assert(!VG_(is_running_thread)(tid));
if (VG_(threads)[tid].status == VgTs_WaitSys) {
- if (VG_(clo_trace_signals))
+ if (VG_(clo_trace_signals)) {
VG_(message)(Vg_DebugMsg,
"get_thread_out_of_syscall zaps tid %d lwp %d",
tid, VG_(threads)[tid].os_state.lwpid);
+ }
#if VGO_darwin
- // GrP fixme use mach primitives on darwin?
- // GrP fixme thread_abort_safely?
- // GrP fixme race for thread with WaitSys set but not in syscall yet?
- extern kern_return_t thread_abort(mach_port_t);
- thread_abort(VG_(threads)[tid].os_state.lwpid);
+ {
+ // GrP fixme use mach primitives on darwin?
+ // GrP fixme thread_abort_safely?
+ // GrP fixme race for thread with WaitSys set but not in syscall yet?
+ extern kern_return_t thread_abort(mach_port_t);
+ thread_abort(VG_(threads)[tid].os_state.lwpid);
+ }
#else
VG_(tkill)(VG_(threads)[tid].os_state.lwpid, VG_SIGVGKILL);
#endif
@@ -408,8 +411,6 @@
static
void mostly_clear_thread_record ( ThreadId tid )
{
- vki_sigset_t savedmask;
-
vg_assert(tid >= 0 && tid < VG_N_THREADS);
VG_(cleanup_thread)(&VG_(threads)[tid].arch);
VG_(threads)[tid].tid = tid;
@@ -431,7 +432,10 @@
#if defined(VGO_darwin)
# warning GrP fixme signals
#else
- VG_(clear_out_queued_signals)(tid, &savedmask);
+ {
+ vki_sigset_t savedmask;
+ VG_(clear_out_queued_signals)(tid, &savedmask);
+ }
#endif
VG_(threads)[tid].sched_jmpbuf_valid = False;
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -183,7 +183,7 @@
tid, seg->start, VG_PGROUNDUP(sp));
} else {
VG_(printf)("couldn't find user stack\n");
- VG_(message)(Vg_UserMsg, "!? New thread %d starts with SP(%p) unmapped\n",
+ VG_(message)(Vg_UserMsg, "!? New thread %d starts with SP(%#lx) unmapped\n",
tid, sp);
tst->client_stack_szB = 0;
}
@@ -340,6 +340,7 @@
static Int allocated_port_count = 0;
+__attribute__((unused))
static Bool port_exists(mach_port_t port)
{
OpenPort *i;
@@ -410,7 +411,7 @@
i = i->next;
}
- VG_(sprintf)(buf, "NONPORT-%p", port);
+ VG_(sprintf)(buf, "NONPORT-%#x", port);
return buf;
}
@@ -461,7 +462,7 @@
i = i->next;
}
- VG_(printf)("UNKNOWN Mach port modified (port %p delta %d)\n", port, delta);
+ VG_(printf)("UNKNOWN Mach port modified (port %#x delta %d)\n", port, delta);
}
static
@@ -1021,13 +1022,13 @@
case VKI_F_FREEZE_FS:
case VKI_F_THAW_FS:
case VKI_F_GLOBAL_NOCACHE:
- PRINT("sys_fcntl ( %d, %s )", ARG1, name_for_fcntl(ARG1));
+ PRINT("sys_fcntl ( %ld, %s )", ARG1, name_for_fcntl(ARG1));
PRE_REG_READ2(long, "fcntl", unsigned int, fd, unsigned int, cmd);
break;
// struct fstore
case VKI_F_PREALLOCATE:
- PRINT("sys_fcntl ( %d, %s, %p )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("sys_fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct fstore *, fstore);
@@ -1048,7 +1049,7 @@
// off_t
case VKI_F_SETSIZE:
- PRINT("sys_fcntl ( %d, %s, %p )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("sys_fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
vki_off_t *, offset);
@@ -1056,7 +1057,7 @@
// struct radvisory
case VKI_F_RDADVISE:
- PRINT("sys_fcntl ( %d, %s, %p )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("sys_fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct vki_radvisory *, radvisory);
@@ -1072,7 +1073,7 @@
// struct fbootstraptransfer
case VKI_F_READBOOTSTRAP:
case VKI_F_WRITEBOOTSTRAP:
- PRINT("sys_fcntl ( %d, %s, %p )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("sys_fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct fbootstraptransfer *, bootstrap);
@@ -1082,7 +1083,7 @@
// struct log2phys (out)
case VKI_F_LOG2PHYS:
- PRINT("sys_fcntl ( %d, %s, %p )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("sys_fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct log2phys *, l2p);
@@ -1092,7 +1093,7 @@
// char[maxpathlen] (out)
case VKI_F_GETPATH:
- PRINT("sys_fcntl ( %d, %s, %p )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("sys_fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
char *, pathbuf);
@@ -1102,8 +1103,8 @@
// char[maxpathlen] (in)
case VKI_F_PATHPKG_CHECK:
- PRINT("sys_fcntl ( %d, %s, %p '%s')", ARG1, name_for_fcntl(ARG2), ARG3,
- ARG3);
+ PRINT("sys_fcntl ( %ld, %s, %#lx '%s')", ARG1, name_for_fcntl(ARG2), ARG3,
+ (char *)ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
char *, pathbuf);
@@ -1111,9 +1112,9 @@
break;
default:
- PRINT("sys_fcntl ( %d, %d [??] )", ARG1, ARG2);
+ PRINT("sys_fcntl ( %ld, %ld [??] )", ARG1, ARG2);
if (VG_(clo_trace_unknown_syscalls)) {
- VG_(printf)("UNKNOWN fcntl %d!", ARG2);
+ VG_(printf)("UNKNOWN fcntl %ld!", ARG2);
}
break;
}
@@ -1157,7 +1158,7 @@
case VKI_F_GETPATH:
POST_MEM_WRITE( ARG3, 1+VG_(strlen)((char *)ARG3) );
- PRINT("\"%s\"", ARG3);
+ PRINT("\"%s\"", (char*)ARG3);
break;
default:
@@ -1192,7 +1193,7 @@
case VKI_F_GETLK:
case VKI_F_SETLK:
case VKI_F_SETLKW:
- PRINT("sys_fcntl64[ARG3=='lock'] ( %ld, %ld, %lp )", ARG1,ARG2,ARG3);
+ PRINT("sys_fcntl64[ARG3=='lock'] ( %ld, %ld, %#lx )", ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "fcntl64",
unsigned int, fd, unsigned int, cmd,
struct flock64 *, lock);
@@ -1243,14 +1244,14 @@
PRE(sys_semget)
{
- PRINT("sys_semget ( %d, %d, %d )",ARG1,ARG2,ARG3);
+ PRINT("sys_semget ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "semget", vki_key_t, key, int, nsems, int, semflg);
}
PRE(sys_semop)
{
*flags |= SfMayBlock;
- PRINT("sys_semop ( %d, %p, %u )",ARG1,ARG2,ARG3);
+ PRINT("sys_semop ( %ld, %#lx, %lu )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "semop",
int, semid, struct sembuf *, sops, vki_size_t, nsoops);
ML_(generic_PRE_sys_semop)(tid, ARG1,ARG2,ARG3);
@@ -1261,23 +1262,23 @@
switch (ARG3) {
case VKI_IPC_STAT:
case VKI_IPC_SET:
- PRINT("sys_semctl ( %d, %d, %d, %p )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_semctl ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
PRE_REG_READ4(long, "semctl",
int, semid, int, semnum, int, cmd, struct semid_ds *, arg);
break;
case VKI_GETALL:
case VKI_SETALL:
- PRINT("sys_semctl ( %d, %d, %d, %p )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_semctl ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
PRE_REG_READ4(long, "semctl",
int, semid, int, semnum, int, cmd, unsigned short *, arg);
break;
case VKI_SETVAL:
- PRINT("sys_semctl ( %d, %d, %d, %p )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_semctl ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
PRE_REG_READ4(long, "semctl",
int, semid, int, semnum, int, cmd, int, arg);
break;
default:
- PRINT("sys_semctl ( %d, %d, %d )",ARG1,ARG2,ARG3);
+ PRINT("sys_semctl ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "semctl",
int, semid, int, semnum, int, cmd);
break;
@@ -1309,7 +1310,7 @@
PRE(sys_kevent)
{
- PRINT("kevent( %d, %p, %d, %p, %d, %p )",
+ PRINT("kevent( %ld, %#lx, %ld, %#lx, %ld, %#lx )",
ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(int,"kevent", int,kq,
const struct vki_kevent *,changelist, int,nchanges,
@@ -1328,7 +1329,7 @@
POST(sys_kevent)
{
- PRINT("kevent ret %d dst %p (%zu)", RES, ARG4, sizeof(struct vki_kevent));
+ PRINT("kevent ret %ld dst %#lx (%zu)", RES, ARG4, sizeof(struct vki_kevent));
if (RES > 0) POST_MEM_WRITE(ARG4, RES * sizeof(struct vki_kevent));
}
@@ -1339,7 +1340,7 @@
PRE(sys_bsdthread_register)
{
- PRINT("bsdthread_register( %p, %p, %lu )", ARG1, ARG2, ARG3);
+ PRINT("bsdthread_register( %#lx, %#lx, %lu )", ARG1, ARG2, ARG3);
PRE_REG_READ3(int,"__bsdthread_register", void *,"threadstart",
void *,"wqthread", size_t,"pthsize");
@@ -1372,7 +1373,8 @@
PRE(sys_workq_ops)
{
- PRINT("workq_ops( %d(%s), %p, %d )", ARG1, workqop_name(ARG1), ARG2, ARG3);
+ PRINT("workq_ops( %ld(%s), %#lx, %ld )", ARG1, workqop_name(ARG1), ARG2,
+ ARG3);
PRE_REG_READ3(int,"workq_ops", int,"options", void *,"item",
int,"priority");
@@ -1401,7 +1403,7 @@
}
default:
- VG_(printf)("UNKNOWN workq_ops option %d\n", ARG1);
+ VG_(printf)("UNKNOWN workq_ops option %ld\n", ARG1);
break;
}
}
@@ -1416,7 +1418,7 @@
PRE(sys___mac_syscall)
{
- PRINT("__mac_syscall( %p, %d, %p )", ARG1, ARG2, ARG3);
+ PRINT("__mac_syscall( %#lx, %ld, %#lx )", ARG1, ARG2, ARG3);
PRE_REG_READ3(int,"__mac_syscall", char *,"policy",
int,"call", void *,"arg");
@@ -1432,7 +1434,7 @@
ThreadId t;
ThreadState* tst;
- PRINT("darwin exit( %d )", ARG1);
+ PRINT("darwin exit( %ld )", ARG1);
PRE_REG_READ1(void, "exit", int, exit_code);
tst = VG_(get_ThreadState)(tid);
@@ -1499,7 +1501,7 @@
PRE(sys_kdebug_trace)
{
- PRINT("kdebug_trace(%d, %d, %d, %d, %d, %d)",
+ PRINT("kdebug_trace(%ld, %ld, %ld, %ld, %ld, %ld)",
ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(long, "kdebug_trace",
int,"code", int,"arg1", int,"arg2",
@@ -1510,20 +1512,20 @@
PRE(sys_seteuid)
{
- PRINT("seteuid(%d)", ARG1);
+ PRINT("seteuid(%ld)", ARG1);
PRE_REG_READ1(long, "seteuid", vki_uid_t, "uid");
}
PRE(sys_setegid)
{
- PRINT("setegid(%d)", ARG1);
+ PRINT("setegid(%ld)", ARG1);
PRE_REG_READ1(long, "setegid", vki_uid_t, "uid");
}
PRE(sys_settid)
{
- PRINT("settid(%d, %d)", ARG1, ARG2);
+ PRINT("settid(%ld, %ld)", ARG1, ARG2);
PRE_REG_READ2(long, "settid", vki_uid_t, "uid", vki_gid_t, "gid");
}
@@ -1532,7 +1534,7 @@
*/
PRE(sys_watchevent)
{
- PRINT("watchevent(%p, %#x)", ARG1, ARG2);
+ PRINT("watchevent(%#lx, %#lx)", ARG1, ARG2);
PRE_REG_READ2(long, "watchevent",
vki_eventreq *, "event", unsigned int, "eventmask");
@@ -1544,7 +1546,7 @@
#define WAITEVENT_FAST_POLL ((Addr)(struct timeval *)-1)
PRE(sys_waitevent)
{
- PRINT("waitevent(%p, %p)", ARG1, ARG2);
+ PRINT("waitevent(%#lx, %#lx)", ARG1, ARG2);
PRE_REG_READ2(long, "waitevent",
vki_eventreq *, "event", struct timeval *, "timeout");
PRE_MEM_WRITE("waitevent(event)", ARG1, sizeof(vki_eventreq));
@@ -1564,7 +1566,7 @@
PRE(sys_modwatch)
{
- PRINT("modwatch(%p, %#x)", ARG1, ARG2);
+ PRINT("modwatch(%#lx, %#lx)", ARG1, ARG2);
PRE_REG_READ2(long, "modwatch",
vki_eventreq *, "event", unsigned int, "eventmask");
@@ -1574,7 +1576,7 @@
PRE(sys_getxattr)
{
- PRINT("getxattr(%p(%s), %p(%s), %p, %u, %u, %d)",
+ PRINT("getxattr(%#lx(%s), %#lx(%s), %#lx, %lu, %lu, %ld)",
ARG1, (char *)ARG1, ARG2, (char *)ARG2, ARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(vki_ssize_t, "getxattr",
@@ -1593,7 +1595,7 @@
PRE(sys_fgetxattr)
{
- PRINT("fgetxattr(%d, %p(%s), %p, %u, %u, %d)",
+ PRINT("fgetxattr(%ld, %#lx(%s), %#lx, %lu, %lu, %ld)",
ARG1, ARG2, (char *)ARG2, ARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(vki_ssize_t, "fgetxattr",
@@ -1611,7 +1613,7 @@
PRE(sys_setxattr)
{
- PRINT("setxattr ( %p(%s), %p(%s), %p, %u, %u, %d )",
+ PRINT("setxattr ( %#lx(%s), %#lx(%s), %#lx, %lu, %lu, %ld )",
ARG1, (char *)ARG1, ARG2, (char*)ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(int, "setxattr",
const char *,"path", char *,"name", void *,"value",
@@ -1625,7 +1627,7 @@
PRE(sys_fsetxattr)
{
- PRINT( "fsetxattr ( %d, %p(%s), %p, %u, %u, %d )",
+ PRINT( "fsetxattr ( %ld, %#lx(%s), %#lx, %lu, %lu, %ld )",
ARG1, ARG2, (char*)ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(int, "fsetxattr",
int,"fd", char *,"name", void *,"value",
@@ -1638,7 +1640,7 @@
PRE(sys_listxattr)
{
- PRINT( "listxattr ( %p(%s), %p, %u, %d )",
+ PRINT( "listxattr ( %#lx(%s), %#lx, %lu, %ld )",
ARG1, (char *)ARG1, ARG2, ARG3, ARG4 );
PRE_REG_READ4 (long, "listxattr",
const char *,"path", char *,"namebuf",
@@ -1659,7 +1661,7 @@
PRE(sys_shm_open)
{
- PRINT("shm_open(%p(%s), %d, %d)", ARG1, (char *)ARG1, ARG2, ARG3);
+ PRINT("shm_open(%#lx(%s), %ld, %ld)", ARG1, (char *)ARG1, ARG2, ARG3);
PRE_REG_READ3(long, "shm_open",
const char *,"name", int,"flags", vki_mode_t,"mode");
@@ -1683,7 +1685,8 @@
PRE(sys_statx)
{
- PRINT("statx( %p(%s), %p, %p, %p )", ARG1, ARG1, ARG2, ARG3, ARG4);
+ PRINT("statx( %#lx(%s), %#lx, %#lx, %#lx )",
+ ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "statx", char *, file_name, struct stat *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_RASCIIZ( "statx(file_name)", ARG1 );
@@ -1713,7 +1716,7 @@
PRE(sys_chflags)
{
- PRINT("sys_chflags ( %p(%s), %u )", ARG1, ARG1, ARG2);
+ PRINT("sys_chflags ( %#lx(%s), %lu )", ARG1, (char *)ARG1, ARG2);
PRE_REG_READ2(int, "chflags", const char *,path, unsigned int,flags);
PRE_MEM_RASCIIZ("chflags(path)", ARG1);
@@ -1722,7 +1725,7 @@
PRE(sys_fchflags)
{
- PRINT("sys_fchflags ( %d, %u )", ARG1, ARG2);
+ PRINT("sys_fchflags ( %ld, %lu )", ARG1, ARG2);
PRE_REG_READ2(int, "fchflags", int,fd, unsigned int,flags);
// fixme sanity-check flags value?
@@ -1735,7 +1738,7 @@
PRE(sys_stat64)
{
- PRINT("sys_stat64 ( %p(%s), %p )", ARG1, ARG1, ARG2);
+ PRINT("sys_stat64 ( %#lx(%s), %#lx )", ARG1, (char *)ARG1, ARG2);
PRE_REG_READ2(long, "stat", const char *,path, struct stat64 *,buf);
PRE_MEM_RASCIIZ("stat64(path)", ARG1);
PRE_MEM_WRITE( "stat64(buf)", ARG2, sizeof(struct vki_stat64) );
@@ -1749,7 +1752,7 @@
PRE(sys_lstat64)
{
- PRINT("sys_lstat64 ( %p(%s), %p )", ARG1, ARG1, ARG2);
+ PRINT("sys_lstat64 ( %#lx(%s), %#lx )", ARG1, (char *)ARG1, ARG2);
PRE_REG_READ2(long, "stat", const char *,path, struct stat64 *,buf);
PRE_MEM_RASCIIZ("lstat64(path)", ARG1);
PRE_MEM_WRITE( "lstat64(buf)", ARG2, sizeof(struct vki_stat64) );
@@ -1763,7 +1766,7 @@
PRE(sys_fstat64)
{
- PRINT("sys_fstat64 ( %d, %p )", ARG1,ARG2);
+ PRINT("sys_fstat64 ( %ld, %#lx )", ARG1,ARG2);
PRE_REG_READ2(long, "fstat", unsigned int, fd, struct stat64 *, buf);
PRE_MEM_WRITE( "fstat64(buf)", ARG2, sizeof(struct vki_stat64) );
}
@@ -1771,7 +1774,7 @@
PRE(sys_getfsstat)
{
- PRINT("getfsstat(%p, %d, %d)", ARG1, ARG2, ARG3);
+ PRINT("getfsstat(%#lx, %ld, %ld)", ARG1, ARG2, ARG3);
PRE_REG_READ3(int, "getfsstat", struct vki_statfs *, buf,
int, bufsize, int, flags);
if (ARG1) {
@@ -1944,8 +1947,8 @@
PRE(sys_getattrlist)
{
- PRINT("getattrlist(%p(%s), %p, %p, %u, %u)",
- ARG1, ARG1, ARG2, ARG3, ARG4, ARG5);
+ PRINT("getattrlist(%#lx(%s), %#lx, %#lx, %lu, %lu)",
+ ARG1, (char *)ARG1, ARG2, ARG3, ARG4, ARG5);
PRE_REG_READ5(int, "getattrlist",
const char *,path, struct vki_attrlist *,attrList,
void *,attrBuf, vki_size_t,attrBufSize, unsigned int,options);
@@ -1967,8 +1970,8 @@
PRE(sys_setattrlist)
{
- PRINT("setattrlist(%p(%s), %p, %p, %u, %u)",
- ARG1, ARG1, ARG2, ARG3, ARG4, ARG5);
+ PRINT("setattrlist(%#lx(%s), %#lx, %#lx, %lu, %lu)",
+ ARG1, (char *)ARG1, ARG2, ARG3, ARG4, ARG5);
PRE_REG_READ5(int, "setattrlist",
const char *,path, struct vki_attrlist *,attrList,
void *,attrBuf, vki_size_t,attrBufSize, unsigned int,options);
@@ -1980,7 +1983,7 @@
PRE(sys_getdirentriesattr)
{
- PRINT("getdirentriesattr(%d, %p, %p, %d, %p, %p, %p, %d)",
+ PRINT("getdirentriesattr(%ld, %#lx, %#lx, %ld, %#lx, %#lx, %#lx, %ld)",
ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8);
PRE_REG_READ8(int, "getdirentriesattr",
int,fd, struct vki_attrlist *,attrList,
@@ -2017,13 +2020,14 @@
POST_MEM_WRITE(ARG3, p - (char *)ARG3);
- PRINT("got %d records, %lu/%lu bytes\n", count, p-(char *)ARG3, ARG4);
+ PRINT("got %d records, %d/%lu bytes\n", count, p-(char *)ARG3, ARG4);
}
PRE(sys_fsctl)
{
- PRINT("fsctl ( %p(%s), %d, %p, %d )", ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ PRINT("fsctl ( %#lx(%s), %ld, %#lx, %ld )",
+ ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4( long, "fsctl",
char *,"path", unsigned int,"request",
void *,"data", unsigned int,"options");
@@ -2081,7 +2085,7 @@
PRE(sys_initgroups)
{
- PRINT("sys_initgroups(%s, %p, %u)", ARG1, ARG2, ARG3);
+ PRINT("sys_initgroups(%s, %#lx, %lu)", (char *)ARG1, ARG2, ARG3);
PRE_REG_READ3(long, "initgroups",
int, setlen, vki_gid_t *, gidset, vki_uid_t, gmuid);
PRE_MEM_READ("gidset", ARG2, ARG1 * sizeof(vki_gid_t));
@@ -2089,7 +2093,7 @@
PRE(sys_socket)
{
- PRINT("sys_socket ( %d, %d, %d )",ARG1,ARG2,ARG3);
+ PRINT("sys_socket ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "socket", int, domain, int, type, int, protocol);
}
@@ -2104,7 +2108,8 @@
PRE(sys_setsockopt)
{
- PRINT("sys_setsockopt ( %d, %d, %d, %p, %d )",ARG1,ARG2,ARG3,ARG4,ARG5);
+ PRINT("sys_setsockopt ( %ld, %ld, %ld, %#lx, %ld )",
+ ARG1,ARG2,ARG3,ARG4,ARG5);
PRE_REG_READ5(long, "setsockopt",
int, s, int, level, int, optname,
const void *, optval, int, optlen);
@@ -2114,7 +2119,8 @@
PRE(sys_getsockopt)
{
- PRINT("sys_getsockopt ( %d, %d, %d, %p, %p )",ARG1,ARG2,ARG3,ARG4,ARG5);
+ PRINT("sys_getsockopt ( %ld, %ld, %ld, %#lx, %#lx )",
+ ARG1,ARG2,ARG3,ARG4,ARG5);
PRE_REG_READ5(long, "getsockopt",
int, s, int, level, int, optname,
void *, optval, int, *optlen);
@@ -2132,7 +2138,7 @@
PRE(sys_connect)
{
*flags |= SfMayBlock;
- PRINT("sys_connect ( %d, %p, %d )",ARG1,ARG2,ARG3);
+ PRINT("sys_connect ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "connect",
int, sockfd, struct sockaddr *, serv_addr, int, addrlen);
ML_(generic_PRE_sys_connect)(tid, ARG1,ARG2,ARG3);
@@ -2142,7 +2148,7 @@
PRE(sys_accept)
{
*flags |= SfMayBlock;
- PRINT("sys_accept ( %d, %p, %d )",ARG1,ARG2,ARG3);
+ PRINT("sys_accept ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "accept",
int, s, struct sockaddr *, addr, int, *addrlen);
ML_(generic_PRE_sys_accept)(tid, ARG1,ARG2,ARG3);
@@ -2161,7 +2167,8 @@
PRE(sys_sendto)
{
*flags |= SfMayBlock;
- PRINT("sys_sendto ( %d, %s, %d, %u, %p, %d )",ARG1,ARG2,ARG3,ARG4,ARG5,ARG6);
+ PRINT("sys_sendto ( %ld, %s, %ld, %lu, %#lx, %ld )",
+ ARG1,(char *)ARG2,ARG3,ARG4,ARG5,ARG6);
PRE_REG_READ6(long, "sendto",
int, s, const void *, msg, int, len,
unsigned int, flags,
@@ -2172,7 +2179,7 @@
PRE(sys_sendfile)
{
#if VG_WORDSIZE == 4
- PRINT("sys_sendfile(%d, %d, %d, %p, %p, %d)",
+ PRINT("sys_sendfile(%ld, %ld, %llu, %#lx, %#lx, %ld)",
ARG1, ARG2, LOHI64(ARG3, ARG4), ARG5, ARG6, ARG7);
PRE_REG_READ7(long, "sendfile",
@@ -2182,7 +2189,7 @@
PRE_MEM_WRITE("sendfile(nwritten)", ARG5, sizeof(vki_uint64_t));
if (ARG6) PRE_MEM_WRITE("sendfile(sf_header)", ARG6, sizeof(struct sf_hdtr));
#else
- PRINT("sys_sendfile(%d, %d, %d, %p, %p, %d)",
+ PRINT("sys_sendfile(%ld, %ld, %ld, %#lx, %#lx, %ld)",
ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(long, "sendfile",
@@ -2210,7 +2217,8 @@
PRE(sys_recvfrom)
{
*flags |= SfMayBlock;
- PRINT("sys_recvfrom ( %d, %p, %d, %u, %p, %p )",ARG1,ARG2,ARG3,ARG4,ARG5,ARG6);
+ PRINT("sys_recvfrom ( %ld, %#lx, %ld, %lu, %#lx, %#lx )",
+ ARG1,ARG2,ARG3,ARG4,ARG5,ARG6);
PRE_REG_READ6(long, "recvfrom",
int, s, void *, buf, int, len, unsigned int, flags,
struct sockaddr *, from, int *, fromlen);
@@ -2228,7 +2236,7 @@
PRE(sys_sendmsg)
{
*flags |= SfMayBlock;
- PRINT("sys_sendmsg ( %d, %p, %d )",ARG1,ARG2,ARG3);
+ PRINT("sys_sendmsg ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "sendmsg",
int, s, const struct msghdr *, msg, int, flags);
ML_(generic_PRE_sys_sendmsg)(tid, ARG1,ARG2);
@@ -2238,7 +2246,7 @@
PRE(sys_recvmsg)
{
*flags |= SfMayBlock;
- PRINT("sys_recvmsg ( %d, %p, %d )",ARG1,ARG2,ARG3);
+ PRINT("sys_recvmsg ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "recvmsg", int, s, struct msghdr *, msg, int, flags);
ML_(generic_PRE_sys_recvmsg)(tid, ARG1,ARG2);
}
@@ -2252,14 +2260,14 @@
PRE(sys_shutdown)
{
*flags |= SfMayBlock;
- PRINT("sys_shutdown ( %d, %d )",ARG1,ARG2);
+ PRINT("sys_shutdown ( %ld, %ld )",ARG1,ARG2);
PRE_REG_READ2(int, "shutdown", int, s, int, how);
}
PRE(sys_bind)
{
- PRINT("sys_bind ( %d, %p, %d )",ARG1,ARG2,ARG3);
+ PRINT("sys_bind ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "bind",
int, sockfd, struct sockaddr *, my_addr, int, addrlen);
ML_(generic_PRE_sys_bind)(tid, ARG1,ARG2,ARG3);
@@ -2268,14 +2276,14 @@
PRE(sys_listen)
{
- PRINT("sys_listen ( %d, %d )",ARG1,ARG2);
+ PRINT("sys_listen ( %ld, %ld )",ARG1,ARG2);
PRE_REG_READ2(long, "listen", int, s, int, backlog);
}
PRE(sys_getsockname)
{
- PRINT("sys_getsockname ( %d, %p, %p )",ARG1,ARG2,ARG3);
+ PRINT("sys_getsockname ( %ld, %#lx, %#lx )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "getsockname",
int, s, struct sockaddr *, name, int *, namelen);
ML_(generic_PRE_sys_getsockname)(tid, ARG1,ARG2,ARG3);
@@ -2291,7 +2299,7 @@
PRE(sys_getpeername)
{
- PRINT("sys_getpeername ( %d, %p, %p )",ARG1,ARG2,ARG3);
+ PRINT("sys_getpeername ( %ld, %#lx, %#lx )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "getpeername",
int, s, struct sockaddr *, name, int *, namelen);
ML_(generic_PRE_sys_getpeername)(tid, ARG1,ARG2,ARG3);
@@ -2307,7 +2315,7 @@
PRE(sys_socketpair)
{
- PRINT("sys_socketpair ( %d, %d, %d, %p )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_socketpair ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
PRE_REG_READ4(long, "socketpair",
int, d, int, type, int, protocol, int *, sv);
ML_(generic_PRE_sys_socketpair)(tid, ARG1,ARG2,ARG3,ARG4);
@@ -2323,7 +2331,7 @@
PRE(sys_gethostuuid)
{
- PRINT("sys_gethostuuid ( %p, %p )", ARG1, ARG2);
+ PRINT("sys_gethostuuid ( %#lx, %#lx )", ARG1, ARG2);
PRE_REG_READ2(int,"gethostuuid",
char *,"uuid_buf",
const struct vki_timespec *,"timeout");
@@ -2371,7 +2379,7 @@
PRE(sys_getlogin)
{
- PRINT("getlogin ( %p, %d )", ARG1, ARG2);
+ PRINT("getlogin ( %#lx, %ld )", ARG1, ARG2);
PRE_REG_READ2(long, "getlogin",
char *,"namebuf", unsigned int,"namelen");
@@ -2386,7 +2394,7 @@
PRE(sys_ptrace)
{
- PRINT("ptrace ( %d, %d, %p, %d )", ARG1, ARG2, ARG3, ARG4);
+ PRINT("ptrace ( %ld, %ld, %#lx, %ld )", ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(long, "ptrace",
int,"request", vki_pid_t,"pid",
vki_caddr_t,"addr", int,"data");
@@ -2418,7 +2426,7 @@
PRE(sys_lseek)
{
- PRINT("lseek ( %d, %lld, %d )", ARG1,ARG2,ARG3);
+ PRINT("lseek ( %ld, %ld, %ld )", ARG1,ARG2,ARG3);
PRE_REG_READ4(vki_off_t, "lseek",
unsigned int,fd, int,offset_hi, int,offset_lo,
unsigned int,whence);
@@ -2427,7 +2435,7 @@
PRE(sys_pathconf)
{
- PRINT("pathconf(%p(%s), %d)", ARG1,(char *)ARG1,ARG2);
+ PRINT("pathconf(%#lx(%s), %ld)", ARG1,(char *)ARG1,ARG2);
PRE_REG_READ2(long,"pathconf", const char *,"path", int,"name");
PRE_MEM_RASCIIZ("pathconf(path)", ARG1);
@@ -2438,7 +2446,7 @@
PRE(sys_fpathconf)
{
- PRINT("fpathconf(%d, %d)", ARG1,ARG2);
+ PRINT("fpathconf(%ld, %ld)", ARG1,ARG2);
PRE_REG_READ2(long,"fpathconf", int,"fd", int,"name");
if (!ML_(fd_allowed)(ARG1, "fpathconf", tid, False))
@@ -2448,7 +2456,7 @@
PRE(sys_getdirentries)
{
- PRINT("getdirentries(%d, %p, %d, %p)", ARG1, ARG2, ARG3, ARG4);
+ PRINT("getdirentries(%ld, %#lx, %ld, %#lx)", ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "getdirentries",
int, fd, char *, buf, int, nbytes, long *, basep);
PRE_MEM_WRITE("getdirentries(basep)", ARG4, sizeof(long));
@@ -2465,7 +2473,7 @@
PRE(sys_getdirentries64)
{
- PRINT("getdirentries64(%d, %p, %u, %p)", ARG1, ARG2, ARG3, ARG4);
+ PRINT("getdirentries64(%ld, %#lx, %lu, %#lx)", ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(vki_ssize_t, "getdirentries",
int,fd, char *,buf, vki_size_t,nbytes, vki_off_t *,basep);
PRE_MEM_WRITE("getdirentries(position)", ARG4, sizeof(vki_off_t));
@@ -2482,7 +2490,7 @@
PRE(sys_statfs64)
{
- PRINT("sys_statfs64 ( %p(%s), %p )",ARG1,ARG1,ARG2);
+ PRINT("sys_statfs64 ( %#lx(%s), %#lx )",ARG1,(char *)ARG1,ARG2);
PRE_REG_READ2(long, "statfs64", const char *, path, struct statfs64 *, buf);
PRE_MEM_RASCIIZ( "statfs64(path)", ARG1 );
PRE_MEM_WRITE( "statfs64(buf)", ARG2, sizeof(struct vki_statfs64) );
@@ -2496,7 +2504,7 @@
PRE(sys_fstatfs64)
{
- PRINT("sys_fstatfs64 ( %d, %p )",ARG1,ARG2);
+ PRINT("sys_fstatfs64 ( %ld, %#lx )",ARG1,ARG2);
PRE_REG_READ2(long, "fstatfs64",
unsigned int, fd, struct statfs *, buf);
PRE_MEM_WRITE( "fstatfs64(buf)", ARG2, sizeof(struct vki_statfs64) );
@@ -2510,7 +2518,7 @@
PRE(sys_auditon)
{
- PRINT("sys_auditon ( %d, %p, %d )", ARG1, ARG2, ARG3);
+ PRINT("sys_auditon ( %ld, %#lx, %ld )", ARG1, ARG2, ARG3);
PRE_REG_READ3(int,"auditon",
int,"cmd", void*,"data", unsigned int,"length");
@@ -2559,7 +2567,7 @@
break;
default:
- VG_(message)(Vg_UserMsg, "UNKNOWN auditon cmd %d", ARG1);
+ VG_(message)(Vg_UserMsg, "UNKNOWN auditon cmd %ld", ARG1);
break;
}
}
@@ -2619,7 +2627,7 @@
// SysRes r;
#if VG_WORDSIZE == 4
- PRINT("sys_mmap ( %p, %u, %d, %d, %d, %lld )",
+ PRINT("sys_mmap ( %#lx, %lu, %ld, %ld, %ld, %lld )",
ARG1, ARG2, ARG3, ARG4, ARG5, LOHI64(ARG6, ARG7) );
PRE_REG_READ7(Addr, "mmap",
Addr,start, vki_size_t,length, int,prot, int,flags, int,fd,
@@ -2629,7 +2637,7 @@
// r = ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, ARG5,
// (Off64T)LOHI64(ARG6, ARG7) );
#else
- PRINT("sys_mmap ( %p, %u, %d, %d, %d, %d )",
+ PRINT("sys_mmap ( %#lx, %lu, %ld, %ld, %ld, %ld )",
ARG1, ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(long, "mmap",
Addr,start, vki_size_t,length, int,prot, int,flags, int,fd,
@@ -2654,7 +2662,7 @@
PRE(sys_sysctl)
{
- PRINT( "sysctl ( %p, %d, %p, %p, %p, %d )",
+ PRINT( "sysctl ( %#lx, %ld, %#lx, %#lx, %#lx, %ld )",
ARG1, ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(int, "sysctl", int*, name, unsigned int, namelen,
@@ -2749,7 +2757,7 @@
PRE(sys_sigpending)
{
- PRINT( "sys_sigpending ( %p )", ARG1 );
+ PRINT( "sys_sigpending ( %#lx )", ARG1 );
PRE_REG_READ1(long, "sigpending", vki_sigset_t *, set);
PRE_MEM_WRITE( "sigpending(set)", ARG1, sizeof(vki_sigset_t));
}
@@ -2764,7 +2772,7 @@
vki_sigset_t* set;
vki_sigset_t* oldset;
- PRINT("sys_sigprocmask ( %d, %p, %p )",ARG1,ARG2,ARG3);
+ PRINT("sys_sigprocmask ( %ld, %#lx, %#lx )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "sigprocmask",
int, how, vki_sigset_t *, set, vki_sigset_t *, oldset);
if (ARG2 != 0)
@@ -2797,7 +2805,7 @@
PRE(sys_sigaltstack)
{
- PRINT("sigaltstack ( %p, %p )",ARG1,ARG2);
+ PRINT("sigaltstack ( %#lx, %#lx )",ARG1,ARG2);
PRE_REG_READ2(int, "sigaltstack",
const vki_stack_t *, ss, vki_stack_t *, oss);
if (ARG1 != 0) {
@@ -2881,7 +2889,7 @@
Addr start = VG_PGROUNDDN((Addr)desc->out_of_line.address);
Addr end = VG_PGROUNDUP((Addr)desc->out_of_line.address +
(Addr)desc->out_of_line.size);
- PRINT("got ool mem %p..%p; ", desc->out_of_line.address,
+ PRINT("got ool mem %p..%#lx; ", desc->out_of_line.address,
(Addr)desc->out_of_line.address+desc->out_of_line.size);
ML_(notify_aspacem_and_tool_of_mmap)
@@ -2894,7 +2902,7 @@
case MACH_MSG_OOL_PORTS_DESCRIPTOR:
// out-of-line array of ports - map it
// GrP fixme see fixmes above
- PRINT("got %d ool ports %p..%p", desc->ool_ports.count, desc->ool_ports.address, (Addr)desc->ool_ports.address+desc->ool_ports.count*sizeof(mach_port_t));
+ PRINT("got %d ool ports %p..%#lx", desc->ool_ports.count, desc->ool_ports.address, (Addr)desc->ool_ports.address+desc->ool_ports.count*sizeof(mach_port_t));
if (desc->ool_ports.count > 0) {
Addr start = VG_PGROUNDDN((Addr)desc->ool_ports.address);
@@ -2916,7 +2924,7 @@
break;
default:
- VG_(printf)("UNKNOWN Mach descriptor type %d!\n", desc->type);
+ VG_(printf)("UNKNOWN Mach descriptor type %u!\n", desc->type.type);
break;
}
}
@@ -3033,7 +3041,7 @@
vm_size_t size = desc->out_of_line.size;
Addr start = VG_PGROUNDDN((Addr)desc->out_of_line.address);
Addr end = VG_PGROUNDUP((Addr)desc->out_of_line.address + size);
- PRINT("kill ool mem %p..%p; ", desc->out_of_line.address,
+ PRINT("kill ool mem %p..%#lx; ", desc->out_of_line.address,
(Addr)desc->out_of_line.address + size);
ML_(notify_aspacem_and_tool_of_munmap)(start, end - start);
}
@@ -3049,13 +3057,13 @@
vm_size_t size = desc->ool_ports.count * sizeof(mach_port_t);
Addr start = VG_PGROUNDDN((Addr)desc->ool_ports.address);
Addr end = VG_PGROUNDUP((Addr)desc->ool_ports.address + size);
- PRINT("kill ool port array %p..%p; ", desc->ool_ports.address,
+ PRINT("kill ool port array %p..%#lx; ", desc->ool_ports.address,
(Addr)desc->ool_ports.address + size);
ML_(notify_aspacem_and_tool_of_munmap)(start, end - start);
}
break;
default:
- VG_(printf)("UNKNOWN Mach descriptor type %d!\n", desc->type);
+ VG_(printf)("UNKNOWN Mach descriptor type %u!\n", desc->type.type);
break;
}
}
@@ -3119,7 +3127,7 @@
Reply *reply = (Reply *)ARG1;
if (!reply->RetCode) {
- PRINT("page size %p", reply->out_page_size);
+ PRINT("page size %u", reply->out_page_size);
} else {
PRINT("mig return %d", reply->RetCode);
}
@@ -3801,7 +3809,7 @@
Reply *reply = (Reply *)ARG1;
- PRINT("got port %p ", reply->special_port.name);
+ PRINT("got port %#x ", reply->special_port.name);
switch (MACH_ARG(task_get_special_port.which_port)) {
case TASK_BOOTSTRAP_PORT:
@@ -4035,7 +4043,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_allocate (%s, at %p, size %d, flags 0x%x)",
+ PRINT("vm_allocate (%s, at %#x, size %d, flags %#x)",
name_for_port(MACH_REMOTE),
req->address, req->size, req->flags);
@@ -4061,7 +4069,7 @@
if (!reply->RetCode) {
if (MACH_REMOTE == vg_task_port) {
- PRINT("allocated at %p", reply->address);
+ PRINT("allocated at %#x", reply->address);
// requesting 0 bytes returns address 0 with no error
if (MACH_ARG(vm_allocate.size)) {
ML_(notify_aspacem_and_tool_of_mmap)
@@ -4069,7 +4077,7 @@
VKI_PROT_READ|VKI_PROT_WRITE, VKI_MAP_ANON, -1, 0);
}
} else {
- PRINT("allocated at %p in remote task %s", reply->address,
+ PRINT("allocated at %#x in remote task %s", reply->address,
name_for_port(MACH_REMOTE));
}
} else {
@@ -4091,7 +4099,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_deallocate(%s, at %p, size %d)",
+ PRINT("vm_deallocate(%s, at %#x, size %d)",
name_for_port(MACH_REMOTE),
req->address, req->size);
@@ -4149,7 +4157,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_protect(%s, at %p, size %d, set_max %d, prot %d)",
+ PRINT("vm_protect(%s, at %#x, size %d, set_max %d, prot %d)",
name_for_port(MACH_REMOTE), req->address, req->size,
req->set_maximum, req->new_protection);
@@ -4208,7 +4216,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_inherit(%s, at %p, size %d, value %d)",
+ PRINT("vm_inherit(%s, at %#x, size %d, value %d)",
name_for_port(MACH_REMOTE),
req->address, req->size,
req->new_inheritance);
@@ -4252,7 +4260,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_read(from %s at %p size %u)",
+ PRINT("vm_read(from %s at %#x size %u)",
name_for_port(MACH_REMOTE), req->address, req->size);
MACH_ARG(vm_read.addr) = req->address;
@@ -4344,7 +4352,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_read_overwrite(from %s at %p size %u to %p)",
+ PRINT("vm_read_overwrite(from %s at %#x size %u to %#x)",
name_for_port(MACH_REMOTE), req->address, req->size, req->data);
MACH_ARG(vm_read_overwrite.addr) = req->address;
@@ -4399,7 +4407,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_copy(%s, %p, %d, %p)",
+ PRINT("vm_copy(%s, %#x, %d, %#x)",
name_for_port(MACH_REMOTE),
req->source_address, req->size, req->dest_address);
@@ -4459,7 +4467,7 @@
Request *req = (Request *)ARG1;
// GrP fixme check these
- PRINT("vm_map(in %s, at %p, size %d, from %s ...)",
+ PRINT("vm_map(in %s, at %#x, size %d, from %s ...)",
name_for_port(MACH_REMOTE),
req->address, req->size,
name_for_port(req->object.name));
@@ -4487,7 +4495,7 @@
if (!reply->RetCode) {
// GrP fixme check src and dest tasks
- PRINT("mapped at %p", reply->address);
+ PRINT("mapped at %#x", reply->address);
// GrP fixme max prot
ML_(notify_aspacem_and_tool_of_mmap)
(reply->address, VG_PGROUNDUP(MACH_ARG(vm_map.size)),
@@ -4527,11 +4535,11 @@
mach_port_name_t source_task = req->src_task.name;
if (source_task == mach_task_self()) {
PRINT("vm_remap(mach_task_self(), "
- "to %p size %d, from mach_task_self() at %p, ...)",
+ "to %#x size %d, from mach_task_self() at %#x, ...)",
req->target_address, req->size, req->src_address);
} else {
PRINT("vm_remap(mach_task_self(), "
- "to %p size %d, from task %p at %p, ...)",
+ "to %#x size %d, from task %u at %#x, ...)",
req->target_address, req->size,
source_task, req->src_address);
}
@@ -4565,7 +4573,7 @@
// GrP fixme check src and dest tasks
UInt prot = reply->cur_protection & reply->max_protection;
// GrP fixme max prot
- PRINT("mapped at %p", reply->target_address);
+ PRINT("mapped at %#x", reply->target_address);
ML_(notify_aspacem_and_tool_of_mmap)
(reply->target_address, VG_PGROUNDUP(MACH_ARG(vm_remap.size)),
prot, VKI_MAP_SHARED, -1, 0);
@@ -4595,9 +4603,9 @@
Request *req = (Request *)ARG1;
- PRINT("mach_make_memory_entry_64(%s, %d, %d, %d, ..., %d)",
+ PRINT("mach_make_memory_entry_64(%s, %llu, %llu, %d, ..., %u)",
name_for_port(MACH_REMOTE),
- req->size, req->offset, req->permission, req->parent_entry);
+ req->size, req->offset, req->permission, req->parent_entry.type);
AFTER = POST_FN(mach_make_memory_entry_64);
}
@@ -4637,7 +4645,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_purgable_control(%s, %p, %d, %d)",
+ PRINT("vm_purgable_control(%s, %#x, %d, %d)",
name_for_port(MACH_REMOTE),
req->address, req->control, req->state);
@@ -5201,7 +5209,7 @@
{
ThreadState *tst;
- PRINT("bsdthread_create( %p, %p, %p, %p, %x )",
+ PRINT("bsdthread_create( %#lx, %#lx, %#lx, %#lx, %#lx )",
ARG1, ARG2, ARG3, ARG4, ARG5);
PRE_REG_READ5(pthread_t,"bsdthread_create",
void *,"func", void *,"func_arg", void *,"stack",
@@ -5242,7 +5250,7 @@
{
ThreadState *tst;
- PRINT("bsdthread_terminate( %p, %lx, %s, %s )",
+ PRINT("bsdthread_terminate( %#lx, %lx, %s, %s )",
ARG1, ARG2, name_for_port(ARG3), name_for_port(ARG4));
PRE_REG_READ4(int,"bsdthread_terminate",
void *,"freeaddr", size_t,"freesize",
@@ -5932,7 +5940,7 @@
POST(mach_thread_self)
{
record_named_port(tid, RES, MACH_PORT_RIGHT_SEND, "thread-%p");
- PRINT("thread 0x%x", RES);
+ PRINT("thread %#lx", RES);
}
@@ -5945,7 +5953,7 @@
{
vg_host_port = RES;
record_named_port(tid, RES, MACH_PORT_RIGHT_SEND, "mach_host_self()");
- PRINT("host 0x%x", RES);
+ PRINT("host %#lx", RES);
}
@@ -5958,13 +5966,14 @@
{
vg_task_port = RES;
record_named_port(tid, RES, MACH_PORT_RIGHT_SEND, "mach_task_self()");
- PRINT("task 0x%x", RES);
+ PRINT("task %#lx", RES);
}
PRE(syscall_thread_switch)
{
- PRINT("syscall_thread_switch(%s, %d, %d)", name_for_port(ARG1), ARG2, ARG3);
+ PRINT("syscall_thread_switch(%s, %ld, %ld)",
+ name_for_port(ARG1), ARG2, ARG3);
PRE_REG_READ3(long, "syscall_thread_switch",
mach_port_t,"thread", int,"option", natural_t,"timeout");
@@ -6045,7 +6054,7 @@
PRE(sys___semwait_signal)
{
- PRINT("sys___semwait_signal(wait %s, signal %s, %d, %d, %g seconds)",
+ PRINT("sys___semwait_signal(wait %s, signal %s, %ld, %ld, %g seconds)",
name_for_port(ARG1), name_for_port(ARG2), ARG3, ARG4, ARG5+ARG6/1000000000.0);
PRE_REG_READ6(long, "sys___semwait_signal",
int,"cond_sem", int,"mutex_sem",
@@ -6058,7 +6067,7 @@
PRE(task_for_pid)
{
- PRINT("task_for_pid(%s, %d, %p)", name_for_port(ARG1), ARG2, ARG3);
+ PRINT("task_for_pid(%s, %ld, %#lx)", name_for_port(ARG1), ARG2, ARG3);
PRE_REG_READ3(long, "task_for_pid",
mach_port_t,"target",
vki_pid_t, "pid", mach_port_t *,"task");
@@ -6079,7 +6088,7 @@
PRE(pid_for_task)
{
- PRINT("pid_for_task(%s, %p)", name_for_port(ARG1), ARG2);
+ PRINT("pid_for_task(%s, %#lx)", name_for_port(ARG1), ARG2);
PRE_REG_READ2(long, "task_for_pid", mach_port_t,"task", vki_pid_t *,"pid");
PRE_MEM_WRITE("task_for_pid(pid)", ARG2, sizeof(vki_pid_t));
}
@@ -6097,7 +6106,7 @@
PRE(mach_timebase_info)
{
- PRINT("mach_timebase_info(%p)", ARG1);
+ PRINT("mach_timebase_info(%#lx)", ARG1);
PRE_REG_READ1(long, "mach_timebase_info", void *,"info");
PRE_MEM_WRITE("mach_timebase_info(info)", ARG1, sizeof(struct vki_mach_timebase_info));
}
@@ -6168,7 +6177,7 @@
PRE(mk_timer_cancel)
{
- PRINT("mk_timer_cancel(%s, %p)", name_for_port(ARG1), ARG2);
+ PRINT("mk_timer_cancel(%s, %#lx)", name_for_port(ARG1), ARG2);
PRE_REG_READ2(long, "mk_timer_cancel",
mach_port_t,"name", Addr,"result_time");
if (ARG2) {
@@ -6186,7 +6195,7 @@
PRE(iokit_user_client_trap)
{
- PRINT("iokit_user_client_trap(%s, %d, %llx, %llx, %llx, %llx, %llx, %llx)",
+ PRINT("iokit_user_client_trap(%s, %ld, %lx, %lx, %lx, %lx, %lx, %lx)",
name_for_port(ARG1), ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8);
PRE_REG_READ8(kern_return_t, "iokit_user_client_trap",
mach_port_t,connect, unsigned int,index,
@@ -6247,7 +6256,7 @@
PRE(swtch_pri)
{
- PRINT("swtch ( %d )", ARG1);
+ PRINT("swtch ( %ld )", ARG1);
PRE_REG_READ1(long, "swtch", int,"pri");
*flags |= SfMayBlock;
@@ -6268,7 +6277,7 @@
PRE(pthread_set_self)
{
- PRINT("pthread_set_self ( 0x%x )", ARG1);
+ PRINT("pthread_set_self ( %#lx )", ARG1);
PRE_REG_READ1(void, "pthread_set_self", struct pthread_t *, self);
#if defined(VGA_x86)
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -740,6 +740,7 @@
VG_(message)(Vg_UserMsg, "");
}
+#if !defined(VGO_darwin)
/* If /proc/self/fd doesn't exist for some weird reason (like you've
got a kernel that doesn't have /proc support compiled in), then we
need to find out what file descriptors we inherited from our parent
@@ -765,6 +766,7 @@
if(VG_(fcntl)(i, VKI_F_GETFL, 0) != -1)
ML_(record_fd_open_nameless)(-1, i);
}
+#endif
/* Initialize the list of open file descriptors with the file descriptors
we inherited from out parent process. */
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -501,7 +501,7 @@
canonical->arg7 = stack[8];
canonical->arg8 = stack[9];
- PRINT("SYSCALL[%d,?](%5lld) syscall(#%d, ...); please stand by...\n",
+ PRINT("SYSCALL[%d,?](%5lld) syscall(#%ld, ...); please stand by...\n",
VG_(getpid)(), /*tid,*/ (Long)0, canonical->sysno);
}
@@ -1854,7 +1854,7 @@
if (p[0] != 0xcd || (p[1] != 0x80 && p[1] != 0x81))
VG_(message)(Vg_DebugMsg,
- "?! restarting over syscall at %p %02x %02x\n",
+ "?! restarting over syscall at %#x %02x %02x\n",
arch->vex.guest_EIP, p[0], p[1]);
vg_assert(p[0] == 0xcd && (p[1] == 0x80 || p[1] == 0x81));
Modified: branches/DARWIN/coregrind/m_translate.c
===================================================================
--- branches/DARWIN/coregrind/m_translate.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/m_translate.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -1364,7 +1364,7 @@
#warning GrP fixme synth signals
{
VG_(message)(Vg_UserMsg, "ERROR\n");
- VG_(message)(Vg_UserMsg, "Thread %d jumped to bad address %p",
+ VG_(message)(Vg_UserMsg, "Thread %d jumped to bad address %#llx",
tid, addr);
VG_(get_and_pp_StackTrace) ( tid, 30 );
Modified: branches/DARWIN/coregrind/m_ume_macho.c
===================================================================
--- branches/DARWIN/coregrind/m_ume_macho.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/m_ume_macho.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -74,11 +74,6 @@
VG_(printf)("%s", str);
}
-static void printhex(unsigned int u)
-{
- VG_(printf)("0x%x", u);
-}
-
static void check_mmap(SysRes res, Addr base, SizeT len)
{
if (res.isError) {
@@ -723,7 +718,7 @@
}
-Bool VG_(match_macho)(const char *hdr, Int len)
+Bool VG_(match_macho)(char *hdr, Int len)
{
vki_uint32_t *magic = (vki_uint32_t *)hdr;
Modified: branches/DARWIN/coregrind/pub_core_aspacemgr.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_aspacemgr.h 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/pub_core_aspacemgr.h 2009-01-20 04:16:06 UTC (rev 8990)
@@ -120,6 +120,10 @@
extern Bool VG_(am_do_sync_check) ( const HChar* fn,
const HChar* file, Int line );
+#if defined(VGO_darwin)
+// DDD: ugh.
+void VG_(sync_mappings)(const HChar *when, const HChar *where, Int num);
+#endif
//--------------------------------------------------------------
// Functions pertaining to the central query-notify mechanism
Modified: branches/DARWIN/coregrind/vg_preloaded.c
===================================================================
--- branches/DARWIN/coregrind/vg_preloaded.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/coregrind/vg_preloaded.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -113,7 +113,7 @@
static void vg_cleanup_env(void) __attribute__((constructor));
static void vg_cleanup_env(void)
{
- char **envp = *_NSGetEnviron();
+ Char **envp = (Char**)*_NSGetEnviron();
env_unsetenv(envp, "VALGRIND_LAUNCHER");
env_unsetenv(envp, "DYLD_SHARED_REGION");
// GrP fixme should be more like mash_colon_env()
Modified: branches/DARWIN/massif/ms_main.c
===================================================================
--- branches/DARWIN/massif/ms_main.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/massif/ms_main.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -1260,8 +1260,10 @@
// Take a snapshot, and only that -- decisions on whether to take a
// snapshot, or what kind of snapshot, are made elsewhere.
+// Nb: we call the arg "my_time" because "time" shadows a global declaration
+// in /usr/include/time.h on Darwin.
static void
-take_snapshot(Snapshot* snapshot, SnapshotKind kind, Time time,
+take_snapshot(Snapshot* snapshot, SnapshotKind kind, Time my_time,
Bool is_detailed, Char* what)
{
tl_assert(!is_snapshot_in_use(snapshot));
@@ -1286,7 +1288,7 @@
// Rest of snapshot.
snapshot->kind = kind;
- snapshot->time = time;
+ snapshot->time = my_time;
sanity_check_snapshot(snapshot);
// Update stats.
@@ -1313,12 +1315,14 @@
Snapshot* snapshot;
Bool is_detailed;
- Time time = get_time();
+ // Nb: we call this variable "my_time" because "time" shadows a global
+ // declaration in /usr/include/time.h on Darwin.
+ Time my_time = get_time();
switch (kind) {
case Normal:
// Only do a snapshot if it's time.
- if (time < earliest_possible_time_of_next_snapshot) {
+ if (my_time < earliest_possible_time_of_next_snapshot) {
n_skipped_snapshots++;
n_skipped_snapshots_since_last_snapshot++;
return;
@@ -1348,7 +1352,7 @@
// Take the snapshot.
snapshot = & snapshots[next_snapshot_i];
- take_snapshot(snapshot, kind, time, is_detailed, what);
+ take_snapshot(snapshot, kind, my_time, is_detailed, what);
// Record if it was detailed.
if (is_detailed) {
@@ -1394,7 +1398,7 @@
}
// Work out the earliest time when the next snapshot can happen.
- earliest_possible_time_of_next_snapshot = time + min_time_interval;
+ earliest_possible_time_of_next_snapshot = my_time + min_time_interval;
}
Modified: branches/DARWIN/memcheck/mc_leakcheck.c
===================================================================
--- branches/DARWIN/memcheck/mc_leakcheck.c 2009-01-20 00:01:59 UTC (rev 8989)
+++ branches/DARWIN/memcheck/mc_leakcheck.c 2009-01-20 04:16:06 UTC (rev 8990)
@@ -57,20 +57,6 @@
/*--- detector. ---*/
/*------------------------------------------------------------*/
-static
-jmp_buf memscan_jmpbuf;
-
-
-static
-void scan_all_valid_memory_catcher ( Int sigNo, Addr addr )
-{
- if (0)
- VG_(printf)("OUCH! sig=%d addr=%#lx\n", sigNo, addr);
- if (sigNo == VKI_SIGSEGV || sigNo == VKI_SIGBUS)
- __builtin_longjmp(memscan_jmpbuf, 1);
-}
-
-
/* TODO: GIVE THIS A PROPER HOME
TODO: MERGE THIS WITH DUPLICATE IN m_main.c and coredump-elf.c.
Extract from aspacem a vector of the current segment start
@@ -325,8 +311,8 @@
#if defined(VGO_darwin)
static void lc_scan_memory_WRK(Addr start, SizeT len, Int clique)
{
- Addr ptr = VG_ROUNDUP(start, sizeof(Addr));
- Addr end = VG_ROUNDDN(start+len, sizeof(Addr));
+ Addr ptr = VG_ROUNDUP(start, sizeof(Addr));
+ Addr end = VG_ROUNDDN(start+len, sizeof(Addr));
if (!VG_(am_is_valid_for_client)(ptr, sizeof(Addr), VKI_PROT_READ))
ptr = VG_PGROUNDUP(ptr+1); /* first page bad */
@@ -353,12 +339,23 @@
addr = *(Addr *)ptr;
lc_markstack_push_WRK(addr, clique);
} else if (0 && VG_DEBUG_LEAKCHECK)
- VG_(printf)("%p not valid\n", ptr);
+ VG_(printf)("%#lx not valid\n", ptr);
ptr += sizeof(Addr);
}
}
}
#else
+static jmp_buf memscan_jmpbuf;
+
+static
+void scan_all_valid_memory_catcher ( Int sigNo, Addr addr )
+{
+ if (0)
+ VG_(printf)("OUCH! sig=%d addr=%#lx\n", sigNo, addr);
+ if (sigNo == VKI_SIGSEGV || sigNo == VKI_SIGBUS)
+ __builtin_longjmp(memscan_jmpbuf, 1);
+}
+
static void lc_scan_memory_WRK(Addr start, SizeT len, Int clique)
{
Addr ptr = VG_ROUNDUP(start, sizeof(Addr));
|
|
From: Tom H. <th...@cy...> - 2009-01-20 03:48:19
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) started at 2009-01-20 03:20:06 GMT 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 == 481 tests, 3 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/preen_invars (stderr) memcheck/tests/x86-linux/scalar (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 == 481 tests, 4 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/preen_invars (stderr) helgrind/tests/hg05_race2 (stderr) memcheck/tests/x86-linux/scalar (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Jan 20 03:34:03 2009 --- new.short Tue Jan 20 03:48:12 2009 *************** *** 8,13 **** ! == 481 tests, 4 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/preen_invars (stderr) - helgrind/tests/hg05_race2 (stderr) memcheck/tests/x86-linux/scalar (stderr) --- 8,12 ---- ! == 481 tests, 3 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/preen_invars (stderr) memcheck/tests/x86-linux/scalar (stderr) |
|
From: Tom H. <th...@cy...> - 2009-01-20 03:43:56
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-01-20 03:05:10 GMT 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 == 472 tests, 7 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) helgrind/tests/tc20_verifywrap (stderr) memcheck/tests/x86-linux/scalar (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 == 472 tests, 7 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) helgrind/tests/tc20_verifywrap (stderr) memcheck/tests/x86/scalar (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Jan 20 03:24:29 2009 --- new.short Tue Jan 20 03:43:48 2009 *************** *** 15,17 **** helgrind/tests/tc20_verifywrap (stderr) ! memcheck/tests/x86/scalar (stderr) --- 15,17 ---- helgrind/tests/tc20_verifywrap (stderr) ! memcheck/tests/x86-linux/scalar (stderr) |
|
From: Tom H. <th...@cy...> - 2009-01-20 03:32:29
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-01-20 03:10:06 GMT 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 == 478 tests, 6 stderr failures, 2 stdout failures, 0 post failures == drd/tests/atomic_var (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) memcheck/tests/linux/timerfd-syscall (stdout) memcheck/tests/x86-linux/scalar (stderr) none/tests/mremap2 (stdout) ================================================= == 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 == 478 tests, 5 stderr failures, 2 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) memcheck/tests/linux-timerfd-syscall (stdout) memcheck/tests/x86/scalar (stderr) none/tests/mremap2 (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Jan 20 03:21:21 2009 --- new.short Tue Jan 20 03:32:17 2009 *************** *** 8,10 **** ! == 478 tests, 5 stderr failures, 2 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) --- 8,11 ---- ! == 478 tests, 6 stderr failures, 2 stdout failures, 0 post failures == ! drd/tests/atomic_var (stderr) exp-ptrcheck/tests/ccc (stderr) *************** *** 13,16 **** exp-ptrcheck/tests/pth_specific (stderr) ! memcheck/tests/linux-timerfd-syscall (stdout) ! memcheck/tests/x86/scalar (stderr) none/tests/mremap2 (stdout) --- 14,17 ---- exp-ptrcheck/tests/pth_specific (stderr) ! memcheck/tests/linux/timerfd-syscall (stdout) ! memcheck/tests/x86-linux/scalar (stderr) none/tests/mremap2 (stdout) |
|
From: <sv...@va...> - 2009-01-20 00:02:05
|
Author: njn
Date: 2009-01-20 00:01:59 +0000 (Tue, 20 Jan 2009)
New Revision: 8989
Log:
Get rid of the all the warnings in Memcheck (on Linux, at least). Includes
the merging of r8987.
Modified:
branches/DARWIN/memcheck/mc_errors.c
branches/DARWIN/memcheck/mc_main.c
Modified: branches/DARWIN/memcheck/mc_errors.c
===================================================================
--- branches/DARWIN/memcheck/mc_errors.c 2009-01-19 23:43:26 UTC (rev 8988)
+++ branches/DARWIN/memcheck/mc_errors.c 2009-01-20 00:01:59 UTC (rev 8989)
@@ -1363,7 +1363,8 @@
// GrP for debugging
-void mc_describe_address(Addr addr)
+__attribute__((unused))
+static void mc_describe_address(Addr addr)
{
AddrInfo ai = {0};
Modified: branches/DARWIN/memcheck/mc_main.c
===================================================================
--- branches/DARWIN/memcheck/mc_main.c 2009-01-19 23:43:26 UTC (rev 8988)
+++ branches/DARWIN/memcheck/mc_main.c 2009-01-20 00:01:59 UTC (rev 8989)
@@ -2357,23 +2357,25 @@
static INLINE void make_aligned_word32_undefined ( Addr a )
{
- UWord sm_off;
- SecMap* sm;
-
PROF_EVENT(300, "make_aligned_word32_undefined");
#ifndef PERF_FAST_STACK2
make_mem_undefined(a, 4);
#else
- if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
- PROF_EVENT(301, "make_aligned_word32_undefined-slow1");
- make_mem_undefined(a, 4);
- return;
+ {
+ UWord sm_off;
+ SecMap* sm;
+
+ if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
+ PROF_EVENT(301, "make_aligned_word32_undefined-slow1");
+ make_mem_undefined(a, 4);
+ return;
+ }
+
+ sm = get_secmap_for_writing_low(a);
+ sm_off = SM_OFF(a);
+ sm->vabits8[sm_off] = VA_BITS8_UNDEFINED;
}
-
- sm = get_secmap_for_writing_low(a);
- sm_off = SM_OFF(a);
- sm->vabits8[sm_off] = VA_BITS8_UNDEFINED;
#endif
}
@@ -2398,36 +2400,38 @@
static INLINE
void make_aligned_word32_noaccess ( Addr a )
{
- UWord sm_off;
- SecMap* sm;
-
PROF_EVENT(310, "make_aligned_word32_noaccess");
#ifndef PERF_FAST_STACK2
MC_(make_mem_noaccess)(a, 4);
#else
- if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
- PROF_EVENT(311, "make_aligned_word32_noaccess-slow1");
- MC_(make_mem_noaccess)(a, 4);
- return;
- }
+ {
+ UWord sm_off;
+ SecMap* sm;
- sm = get_secmap_for_writing_low(a);
- sm_off = SM_OFF(a);
- sm->vabits8[sm_off] = VA_BITS8_NOACCESS;
+ if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
+ PROF_EVENT(311, "make_aligned_word32_noaccess-slow1");
+ MC_(make_mem_noaccess)(a, 4);
+ return;
+ }
- //// BEGIN inlined, specialised version of MC_(helperc_b_store4)
- //// Set the origins for a+0 .. a+3.
- if (UNLIKELY( MC_(clo_mc_level) == 3 )) {
- OCacheLine* line;
- UWord lineoff = oc_line_offset(a);
- if (OC_ENABLE_ASSERTIONS) {
- tl_assert(lineoff >= 0 && lineoff < OC_W32S_PER_LINE);
+ sm = get_secmap_for_writing_low(a);
+ sm_off = SM_OFF(a);
+ sm->vabits8[sm_off] = VA_BITS8_NOACCESS;
+
+ //// BEGIN inlined, specialised version of MC_(helperc_b_store4)
+ //// Set the origins for a+0 .. a+3.
+ if (UNLIKELY( MC_(clo_mc_level) == 3 )) {
+ OCacheLine* line;
+ UWord lineoff = oc_line_offset(a);
+ if (OC_ENABLE_ASSERTIONS) {
+ tl_assert(lineoff >= 0 && lineoff < OC_W32S_PER_LINE);
+ }
+ line = find_OCacheLine( a );
+ line->descr[lineoff] = 0;
}
- line = find_OCacheLine( a );
- line->descr[lineoff] = 0;
+ //// END inlined, specialised version of MC_(helperc_b_store4)
}
- //// END inlined, specialised version of MC_(helperc_b_store4)
#endif
}
@@ -2437,23 +2441,25 @@
static INLINE void make_aligned_word64_undefined ( Addr a )
{
- UWord sm_off16;
- SecMap* sm;
-
PROF_EVENT(320, "make_aligned_word64_undefined");
#ifndef PERF_FAST_STACK2
make_mem_undefined(a, 8);
#else
- if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
- PROF_EVENT(321, "make_aligned_word64_undefined-slow1");
- make_mem_undefined(a, 8);
- return;
+ {
+ UWord sm_off16;
+ SecMap* sm;
+
+ if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
+ PROF_EVENT(321, "make_aligned_word64_undefined-slow1");
+ make_mem_undefined(a, 8);
+ return;
+ }
+
+ sm = get_secmap_for_writing_low(a);
+ sm_off16 = SM_OFF_16(a);
+ ((UShort*)(sm->vabits8))[sm_off16] = VA_BITS16_UNDEFINED;
}
-
- sm = get_secmap_for_writing_low(a);
- sm_off16 = SM_OFF_16(a);
- ((UShort*)(sm->vabits8))[sm_off16] = VA_BITS16_UNDEFINED;
#endif
}
@@ -2479,36 +2485,38 @@
static INLINE
void make_aligned_word64_noaccess ( Addr a )
{
- UWord sm_off16;
- SecMap* sm;
-
PROF_EVENT(330, "make_aligned_word64_noaccess");
#ifndef PERF_FAST_STACK2
MC_(make_mem_noaccess)(a, 8);
#else
- if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
- PROF_EVENT(331, "make_aligned_word64_noaccess-slow1");
- MC_(make_mem_noaccess)(a, 8);
- return;
- }
+ {
+ UWord sm_off16;
+ SecMap* sm;
- sm = get_secmap_for_writing_low(a);
- sm_off16 = SM_OFF_16(a);
- ((UShort*)(sm->vabits8))[sm_off16] = VA_BITS16_NOACCESS;
+ if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
+ PROF_EVENT(331, "make_aligned_word64_noaccess-slow1");
+ MC_(make_mem_noaccess)(a, 8);
+ return;
+ }
- //// BEGIN inlined, specialised version of MC_(helperc_b_store8)
- //// Clear the origins for a+0 .. a+7.
- if (UNLIKELY( MC_(clo_mc_level) == 3 )) {
- OCacheLine* line;
- UWord lineoff = oc_line_offset(a);
- tl_assert(lineoff >= 0
- && lineoff < OC_W32S_PER_LINE -1/*'cos 8-aligned*/);
- line = find_OCacheLine( a );
- line->descr[lineoff+0] = 0;
- line->descr[lineoff+1] = 0;
+ sm = get_secmap_for_writing_low(a);
+ sm_off16 = SM_OFF_16(a);
+ ((UShort*)(sm->vabits8))[sm_off16] = VA_BITS16_NOACCESS;
+
+ //// BEGIN inlined, specialised version of MC_(helperc_b_store8)
+ //// Clear the origins for a+0 .. a+7.
+ if (UNLIKELY( MC_(clo_mc_level) == 3 )) {
+ OCacheLine* line;
+ UWord lineoff = oc_line_offset(a);
+ tl_assert(lineoff >= 0
+ && lineoff < OC_W32S_PER_LINE -1/*'cos 8-aligned*/);
+ line = find_OCacheLine( a );
+ line->descr[lineoff+0] = 0;
+ line->descr[lineoff+1] = 0;
+ }
+ //// END inlined, specialised version of MC_(helperc_b_store8)
}
- //// END inlined, specialised version of MC_(helperc_b_store8)
#endif
}
@@ -2517,8 +2525,15 @@
/*--- Stack pointer adjustment ---*/
/*------------------------------------------------------------*/
+#ifdef PERF_FAST_STACK
+# define MAYBE_USED
+#else
+# define MAYBE_USED __attribute__((unused))
+#endif
+
/*--------------- adjustment by 4 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_4_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2530,6 +2545,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_4(Addr new_SP)
{
PROF_EVENT(110, "new_mem_stack_4");
@@ -2540,6 +2556,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_4(Addr new_SP)
{
PROF_EVENT(120, "die_mem_stack_4");
@@ -2552,6 +2569,7 @@
/*--------------- adjustment by 8 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_8_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2566,6 +2584,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_8(Addr new_SP)
{
PROF_EVENT(111, "new_mem_stack_8");
@@ -2579,6 +2598,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_8(Addr new_SP)
{
PROF_EVENT(121, "die_mem_stack_8");
@@ -2594,6 +2614,7 @@
/*--------------- adjustment by 12 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_12_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2612,6 +2633,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_12(Addr new_SP)
{
PROF_EVENT(112, "new_mem_stack_12");
@@ -2629,6 +2651,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_12(Addr new_SP)
{
PROF_EVENT(122, "die_mem_stack_12");
@@ -2651,6 +2674,7 @@
/*--------------- adjustment by 16 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_16_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2670,6 +2694,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_16(Addr new_SP)
{
PROF_EVENT(113, "new_mem_stack_16");
@@ -2688,6 +2713,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_16(Addr new_SP)
{
PROF_EVENT(123, "die_mem_stack_16");
@@ -2707,6 +2733,7 @@
/*--------------- adjustment by 32 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_32_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2730,6 +2757,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_32(Addr new_SP)
{
PROF_EVENT(114, "new_mem_stack_32");
@@ -2752,6 +2780,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_32(Addr new_SP)
{
PROF_EVENT(124, "die_mem_stack_32");
@@ -2776,6 +2805,7 @@
/*--------------- adjustment by 112 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_112_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2800,6 +2830,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_112(Addr new_SP)
{
PROF_EVENT(115, "new_mem_stack_112");
@@ -2823,6 +2854,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_112(Addr new_SP)
{
PROF_EVENT(125, "die_mem_stack_112");
@@ -2848,6 +2880,7 @@
/*--------------- adjustment by 128 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_128_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2874,6 +2907,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_128(Addr new_SP)
{
PROF_EVENT(116, "new_mem_stack_128");
@@ -2899,6 +2933,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_128(Addr new_SP)
{
PROF_EVENT(126, "die_mem_stack_128");
@@ -2926,6 +2961,7 @@
/*--------------- adjustment by 144 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_144_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2954,6 +2990,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_144(Addr new_SP)
{
PROF_EVENT(117, "new_mem_stack_144");
@@ -2981,6 +3018,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_144(Addr new_SP)
{
PROF_EVENT(127, "die_mem_stack_144");
@@ -3010,6 +3048,7 @@
/*--------------- adjustment by 160 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_160_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -3040,6 +3079,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_160(Addr new_SP)
{
PROF_EVENT(118, "new_mem_stack_160");
@@ -3069,6 +3109,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_160(Addr new_SP)
{
PROF_EVENT(128, "die_mem_stack_160");
@@ -3870,34 +3911,36 @@
static INLINE
ULong mc_LOADV64 ( Addr a, Bool isBigEndian )
{
- UWord sm_off16, vabits16;
- SecMap* sm;
-
PROF_EVENT(200, "mc_LOADV64");
#ifndef PERF_FAST_LOADV
return mc_LOADVn_slow( a, 64, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,64) )) {
- PROF_EVENT(201, "mc_LOADV64-slow1");
- return (ULong)mc_LOADVn_slow( a, 64, isBigEndian );
- }
+ {
+ UWord sm_off16, vabits16;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off16 = SM_OFF_16(a);
- vabits16 = ((UShort*)(sm->vabits8))[sm_off16];
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,64) )) {
+ PROF_EVENT(201, "mc_LOADV64-slow1");
+ return (ULong)mc_LOADVn_slow( a, 64, isBigEndian );
+ }
- // Handle common case quickly: a is suitably aligned, is mapped, and
- // addressible.
- // Convert V bits from compact memory form to expanded register form.
- if (LIKELY(vabits16 == VA_BITS16_DEFINED)) {
- return V_BITS64_DEFINED;
- } else if (LIKELY(vabits16 == VA_BITS16_UNDEFINED)) {
- return V_BITS64_UNDEFINED;
- } else {
- /* Slow case: the 8 bytes are not all-defined or all-undefined. */
- PROF_EVENT(202, "mc_LOADV64-slow2");
- return mc_LOADVn_slow( a, 64, isBigEndian );
+ sm = get_secmap_for_reading_low(a);
+ sm_off16 = SM_OFF_16(a);
+ vabits16 = ((UShort*)(sm->vabits8))[sm_off16];
+
+ // Handle common case quickly: a is suitably aligned, is mapped, and
+ // addressible.
+ // Convert V bits from compact memory form to expanded register form.
+ if (LIKELY(vabits16 == VA_BITS16_DEFINED)) {
+ return V_BITS64_DEFINED;
+ } else if (LIKELY(vabits16 == VA_BITS16_UNDEFINED)) {
+ return V_BITS64_UNDEFINED;
+ } else {
+ /* Slow case: the 8 bytes are not all-defined or all-undefined. */
+ PROF_EVENT(202, "mc_LOADV64-slow2");
+ return mc_LOADVn_slow( a, 64, isBigEndian );
+ }
}
#endif
}
@@ -3915,9 +3958,6 @@
static INLINE
void mc_STOREV64 ( Addr a, ULong vbits64, Bool isBigEndian )
{
- UWord sm_off16, vabits16;
- SecMap* sm;
-
PROF_EVENT(210, "mc_STOREV64");
#ifndef PERF_FAST_STOREV
@@ -3925,36 +3965,41 @@
// Investigate further.
mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,64) )) {
- PROF_EVENT(211, "mc_STOREV64-slow1");
- mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
- return;
- }
+ {
+ UWord sm_off16, vabits16;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off16 = SM_OFF_16(a);
- vabits16 = ((UShort*)(sm->vabits8))[sm_off16];
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,64) )) {
+ PROF_EVENT(211, "mc_STOREV64-slow1");
+ mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
+ return;
+ }
- if (LIKELY( !is_distinguished_sm(sm) &&
- (VA_BITS16_DEFINED == vabits16 ||
- VA_BITS16_UNDEFINED == vabits16) ))
- {
- /* Handle common case quickly: a is suitably aligned, */
- /* is mapped, and is addressible. */
- // Convert full V-bits in register to compact 2-bit form.
- if (V_BITS64_DEFINED == vbits64) {
- ((UShort*)(sm->vabits8))[sm_off16] = (UShort)VA_BITS16_DEFINED;
- } else if (V_BITS64_UNDEFINED == vbits64) {
- ((UShort*)(sm->vabits8))[sm_off16] = (UShort)VA_BITS16_UNDEFINED;
+ sm = get_secmap_for_reading_low(a);
+ sm_off16 = SM_OFF_16(a);
+ vabits16 = ((UShort*)(sm->vabits8))[sm_off16];
+
+ if (LIKELY( !is_distinguished_sm(sm) &&
+ (VA_BITS16_DEFINED == vabits16 ||
+ VA_BITS16_UNDEFINED == vabits16) ))
+ {
+ /* Handle common case quickly: a is suitably aligned, */
+ /* is mapped, and is addressible. */
+ // Convert full V-bits in register to compact 2-bit form.
+ if (V_BITS64_DEFINED == vbits64) {
+ ((UShort*)(sm->vabits8))[sm_off16] = (UShort)VA_BITS16_DEFINED;
+ } else if (V_BITS64_UNDEFINED == vbits64) {
+ ((UShort*)(sm->vabits8))[sm_off16] = (UShort)VA_BITS16_UNDEFINED;
+ } else {
+ /* Slow but general case -- writing partially defined bytes. */
+ PROF_EVENT(212, "mc_STOREV64-slow2");
+ mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
+ }
} else {
- /* Slow but general case -- writing partially defined bytes. */
- PROF_EVENT(212, "mc_STOREV64-slow2");
+ /* Slow but general case. */
+ PROF_EVENT(213, "mc_STOREV64-slow3");
mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
}
- } else {
- /* Slow but general case. */
- PROF_EVENT(213, "mc_STOREV64-slow3");
- mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
}
#endif
}
@@ -3974,36 +4019,38 @@
static INLINE
UWord mc_LOADV32 ( Addr a, Bool isBigEndian )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(220, "mc_LOADV32");
#ifndef PERF_FAST_LOADV
return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,32) )) {
- PROF_EVENT(221, "mc_LOADV32-slow1");
- return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,32) )) {
+ PROF_EVENT(221, "mc_LOADV32-slow1");
+ return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
+ }
- // Handle common case quickly: a is suitably aligned, is mapped, and the
- // entire word32 it lives in is addressible.
- // Convert V bits from compact memory form to expanded register form.
- // For 64-bit platforms, set the high 32 bits of retval to 1 (undefined).
- // Almost certainly not necessary, but be paranoid.
- if (LIKELY(vabits8 == VA_BITS8_DEFINED)) {
- return ((UWord)0xFFFFFFFF00000000ULL | (UWord)V_BITS32_DEFINED);
- } else if (LIKELY(vabits8 == VA_BITS8_UNDEFINED)) {
- return ((UWord)0xFFFFFFFF00000000ULL | (UWord)V_BITS32_UNDEFINED);
- } else {
- /* Slow case: the 4 bytes are not all-defined or all-undefined. */
- PROF_EVENT(222, "mc_LOADV32-slow2");
- return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+
+ // Handle common case quickly: a is suitably aligned, is mapped, and the
+ // entire word32 it lives in is addressible.
+ // Convert V bits from compact memory form to expanded register form.
+ // For 64-bit platforms, set the high 32 bits of retval to 1 (undefined).
+ // Almost certainly not necessary, but be paranoid.
+ if (LIKELY(vabits8 == VA_BITS8_DEFINED)) {
+ return ((UWord)0xFFFFFFFF00000000ULL | (UWord)V_BITS32_DEFINED);
+ } else if (LIKELY(vabits8 == VA_BITS8_UNDEFINED)) {
+ return ((UWord)0xFFFFFFFF00000000ULL | (UWord)V_BITS32_UNDEFINED);
+ } else {
+ /* Slow case: the 4 bytes are not all-defined or all-undefined. */
+ PROF_EVENT(222, "mc_LOADV32-slow2");
+ return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
+ }
}
#endif
}
@@ -4021,52 +4068,54 @@
static INLINE
void mc_STOREV32 ( Addr a, UWord vbits32, Bool isBigEndian )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(230, "mc_STOREV32");
#ifndef PERF_FAST_STOREV
mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,32) )) {
- PROF_EVENT(231, "mc_STOREV32-slow1");
- mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
- return;
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
-
- // Cleverness: sometimes we don't have to write the shadow memory at
- // all, if we can tell that what we want to write is the same as what is
- // already there. The 64/16/8 bit cases also have cleverness at this
- // point, but it works a little differently to the code below.
- if (V_BITS32_DEFINED == vbits32) {
- if (vabits8 == (UInt)VA_BITS8_DEFINED) {
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,32) )) {
+ PROF_EVENT(231, "mc_STOREV32-slow1");
+ mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
return;
- } else if (!is_distinguished_sm(sm) && VA_BITS8_UNDEFINED == vabits8) {
- sm->vabits8[sm_off] = (UInt)VA_BITS8_DEFINED;
- } else {
- // not defined/undefined, or distinguished and changing state
- PROF_EVENT(232, "mc_STOREV32-slow2");
- mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
}
- } else if (V_BITS32_UNDEFINED == vbits32) {
- if (vabits8 == (UInt)VA_BITS8_UNDEFINED) {
- return;
- } else if (!is_distinguished_sm(sm) && VA_BITS8_DEFINED == vabits8) {
- sm->vabits8[sm_off] = (UInt)VA_BITS8_UNDEFINED;
+
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+
+ // Cleverness: sometimes we don't have to write the shadow memory at
+ // all, if we can tell that what we want to write is the same as what is
+ // already there. The 64/16/8 bit cases also have cleverness at this
+ // point, but it works a little differently to the code below.
+ if (V_BITS32_DEFINED == vbits32) {
+ if (vabits8 == (UInt)VA_BITS8_DEFINED) {
+ return;
+ } else if (!is_distinguished_sm(sm) && VA_BITS8_UNDEFINED == vabits8) {
+ sm->vabits8[sm_off] = (UInt)VA_BITS8_DEFINED;
+ } else {
+ // not defined/undefined, or distinguished and changing state
+ PROF_EVENT(232, "mc_STOREV32-slow2");
+ mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
+ }
+ } else if (V_BITS32_UNDEFINED == vbits32) {
+ if (vabits8 == (UInt)VA_BITS8_UNDEFINED) {
+ return;
+ } else if (!is_distinguished_sm(sm) && VA_BITS8_DEFINED == vabits8) {
+ sm->vabits8[sm_off] = (UInt)VA_BITS8_UNDEFINED;
+ } else {
+ // not defined/undefined, or distinguished and changing state
+ PROF_EVENT(233, "mc_STOREV32-slow3");
+ mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
+ }
} else {
- // not defined/undefined, or distinguished and changing state
- PROF_EVENT(233, "mc_STOREV32-slow3");
+ // Partially defined word
+ PROF_EVENT(234, "mc_STOREV32-slow4");
mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
}
- } else {
- // Partially defined word
- PROF_EVENT(234, "mc_STOREV32-slow4");
- mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
}
#endif
}
@@ -4086,38 +4135,40 @@
static INLINE
UWord mc_LOADV16 ( Addr a, Bool isBigEndian )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(240, "mc_LOADV16");
#ifndef PERF_FAST_LOADV
return (UWord)mc_LOADVn_slow( a, 16, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,16) )) {
- PROF_EVENT(241, "mc_LOADV16-slow1");
- return (UWord)mc_LOADVn_slow( a, 16, isBigEndian );
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
- // Handle common case quickly: a is suitably aligned, is mapped, and is
- // addressible.
- // Convert V bits from compact memory form to expanded register form
- if (vabits8 == VA_BITS8_DEFINED ) { return V_BITS16_DEFINED; }
- else if (vabits8 == VA_BITS8_UNDEFINED) { return V_BITS16_UNDEFINED; }
- else {
- // The 4 (yes, 4) bytes are not all-defined or all-undefined, check
- // the two sub-bytes.
- UChar vabits4 = extract_vabits4_from_vabits8(a, vabits8);
- if (vabits4 == VA_BITS4_DEFINED ) { return V_BITS16_DEFINED; }
- else if (vabits4 == VA_BITS4_UNDEFINED) { return V_BITS16_UNDEFINED; }
- else {
- /* Slow case: the two bytes are not all-defined or all-undefined. */
- PROF_EVENT(242, "mc_LOADV16-slow2");
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,16) )) {
+ PROF_EVENT(241, "mc_LOADV16-slow1");
return (UWord)mc_LOADVn_slow( a, 16, isBigEndian );
}
+
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+ // Handle common case quickly: a is suitably aligned, is mapped, and is
+ // addressible.
+ // Convert V bits from compact memory form to expanded register form
+ if (vabits8 == VA_BITS8_DEFINED ) { return V_BITS16_DEFINED; }
+ else if (vabits8 == VA_BITS8_UNDEFINED) { return V_BITS16_UNDEFINED; }
+ else {
+ // The 4 (yes, 4) bytes are not all-defined or all-undefined, check
+ // the two sub-bytes.
+ UChar vabits4 = extract_vabits4_from_vabits8(a, vabits8);
+ if (vabits4 == VA_BITS4_DEFINED ) { return V_BITS16_DEFINED; }
+ else if (vabits4 == VA_BITS4_UNDEFINED) { return V_BITS16_UNDEFINED; }
+ else {
+ /* Slow case: the two bytes are not all-defined or all-undefined. */
+ PROF_EVENT(242, "mc_LOADV16-slow2");
+ return (UWord)mc_LOADVn_slow( a, 16, isBigEndian );
+ }
+ }
}
#endif
}
@@ -4135,45 +4186,47 @@
static INLINE
void mc_STOREV16 ( Addr a, UWord vbits16, Bool isBigEndian )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(250, "mc_STOREV16");
#ifndef PERF_FAST_STOREV
mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,16) )) {
- PROF_EVENT(251, "mc_STOREV16-slow1");
- mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
- return;
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
- if (LIKELY( !is_distinguished_sm(sm) &&
- (VA_BITS8_DEFINED == vabits8 ||
- VA_BITS8_UNDEFINED == vabits8) ))
- {
- /* Handle common case quickly: a is suitably aligned, */
- /* is mapped, and is addressible. */
- // Convert full V-bits in register to compact 2-bit form.
- if (V_BITS16_DEFINED == vbits16) {
- insert_vabits4_into_vabits8( a, VA_BITS4_DEFINED ,
- &(sm->vabits8[sm_off]) );
- } else if (V_BITS16_UNDEFINED == vbits16) {
- insert_vabits4_into_vabits8( a, VA_BITS4_UNDEFINED,
- &(sm->vabits8[sm_off]) );
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,16) )) {
+ PROF_EVENT(251, "mc_STOREV16-slow1");
+ mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
+ return;
+ }
+
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+ if (LIKELY( !is_distinguished_sm(sm) &&
+ (VA_BITS8_DEFINED == vabits8 ||
+ VA_BITS8_UNDEFINED == vabits8) ))
+ {
+ /* Handle common case quickly: a is suitably aligned, */
+ /* is mapped, and is addressible. */
+ // Convert full V-bits in register to compact 2-bit form.
+ if (V_BITS16_DEFINED == vbits16) {
+ insert_vabits4_into_vabits8( a, VA_BITS4_DEFINED ,
+ &(sm->vabits8[sm_off]) );
+ } else if (V_BITS16_UNDEFINED == vbits16) {
+ insert_vabits4_into_vabits8( a, VA_BITS4_UNDEFINED,
+ &(sm->vabits8[sm_off]) );
+ } else {
+ /* Slow but general case -- writing partially defined bytes. */
+ PROF_EVENT(252, "mc_STOREV16-slow2");
+ mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
+ }
} else {
- /* Slow but general case -- writing partially defined bytes. */
- PROF_EVENT(252, "mc_STOREV16-slow2");
+ /* Slow but general case. */
+ PROF_EVENT(253, "mc_STOREV16-slow3");
mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
}
- } else {
- /* Slow but general case. */
- PROF_EVENT(253, "mc_STOREV16-slow3");
- mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
}
#endif
}
@@ -4194,38 +4247,40 @@
VG_REGPARM(1)
UWord MC_(helperc_LOADV8) ( Addr a )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(260, "mc_LOADV8");
#ifndef PERF_FAST_LOADV
return (UWord)mc_LOADVn_slow( a, 8, False/*irrelevant*/ );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,8) )) {
- PROF_EVENT(261, "mc_LOADV8-slow1");
- return (UWord)mc_LOADVn_slow( a, 8, False/*irrelevant*/ );
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
- // Convert V bits from compact memory form to expanded register form
- // Handle common case quickly: a is mapped, and the entire
- // word32 it lives in is addressible.
- if (vabits8 == VA_BITS8_DEFINED ) { return V_BITS8_DEFINED; }
- else if (vabits8 == VA_BITS8_UNDEFINED) { return V_BITS8_UNDEFINED; }
- else {
- // The 4 (yes, 4) bytes are not all-defined or all-undefined, check
- // the single byte.
- UChar vabits2 = extract_vabits2_from_vabits8(a, vabits8);
- if (vabits2 == VA_BITS2_DEFINED ) { return V_BITS8_DEFINED; }
- else if (vabits2 == VA_BITS2_UNDEFINED) { return V_BITS8_UNDEFINED; }
- else {
- /* Slow case: the byte is not all-defined or all-undefined. */
- PROF_EVENT(262, "mc_LOADV8-slow2");
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,8) )) {
+ PROF_EVENT(261, "mc_LOADV8-slow1");
return (UWord)mc_LOADVn_slow( a, 8, False/*irrelevant*/ );
}
+
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+ // Convert V bits from compact memory form to expanded register form
+ // Handle common case quickly: a is mapped, and the entire
+ // word32 it lives in is addressible.
+ if (vabits8 == VA_BITS8_DEFINED ) { return V_BITS8_DEFINED; }
+ else if (vabits8 == VA_BITS8_UNDEFINED) { return V_BITS8_UNDEFINED; }
+ else {
+ // The 4 (yes, 4) bytes are not all-defined or all-undefined, check
+ // the single byte.
+ UChar vabits2 = extract_vabits2_from_vabits8(a, vabits8);
+ if (vabits2 == VA_BITS2_DEFINED ) { return V_BITS8_DEFINED; }
+ else if (vabits2 == VA_BITS2_UNDEFINED) { return V_BITS8_UNDEFINED; }
+ else {
+ /* Slow case: the byte is not all-defined or all-undefined. */
+ PROF_EVENT(262, "mc_LOADV8-slow2");
+ return (UWord)mc_LOADVn_slow( a, 8, False/*irrelevant*/ );
+ }
+ }
}
#endif
}
@@ -4234,49 +4289,51 @@
VG_REGPARM(2)
void MC_(helperc_STOREV8) ( Addr a, UWord vbits8 )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(270, "mc_STOREV8");
#ifndef PERF_FAST_STOREV
mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,8) )) {
- PROF_EVENT(271, "mc_STOREV8-slow1");
- mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
- return;
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
- if (LIKELY
- ( !is_distinguished_sm(sm) &&
- ( (VA_BITS8_DEFINED == vabits8 || VA_BITS8_UNDEFINED == vabits8)
- || (VA_BITS2_NOACCESS != extract_vabits2_from_vabits8(a, vabits8))
- )
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,8) )) {
+ PROF_EVENT(271, "mc_STOREV8-slow1");
+ mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
+ return;
+ }
+
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+ if (LIKELY
+ ( !is_distinguished_sm(sm) &&
+ ( (VA_BITS8_DEFINED == vabits8 || VA_BITS8_UNDEFINED == vabits8)
+ || (VA_BITS2_NOACCESS != extract_vabits2_from_vabits8(a, vabits8))
+ )
+ )
)
- )
- {
- /* Handle common case quickly: a is mapped, the entire word32 it
- lives in is addressible. */
- // Convert full V-bits in register to compact 2-bit form.
- if (V_BITS8_DEFINED == vbits8) {
- insert_vabits2_into_vabits8( a, VA_BITS2_DEFINED,
- &(sm->vabits8[sm_off]) );
- } else if (V_BITS8_UNDEFINED == vbits8) {
- insert_vabits2_into_vabits8( a, VA_BITS2_UNDEFINED,
- &(sm->vabits8[sm_off]) );
+ {
+ /* Handle common case quickly: a is mapped, the entire word32 it
+ lives in is addressible. */
+ // Convert full V-bits in register to compact 2-bit form.
+ if (V_BITS8_DEFINED == vbits8) {
+ insert_vabits2_into_vabits8( a, VA_BITS2_DEFINED,
+ &(sm->vabits8[sm_off]) );
+ } else if (V_BITS8_UNDEFINED == vbits8) {
+ insert_vabits2_into_vabits8( a, VA_BITS2_UNDEFINED,
+ &(sm->vabits8[sm_off]) );
+ } else {
+ /* Slow but general case -- writing partially defined bytes. */
+ PROF_EVENT(272, "mc_STOREV8-slow2");
+ mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
+ }
} else {
- /* Slow but general case -- writing partially defined bytes. */
- PROF_EVENT(272, "mc_STOREV8-slow2");
+ /* Slow but general case. */
+ PROF_EVENT(273, "mc_STOREV8-slow3");
mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
}
- } else {
- /* Slow but general case. */
- PROF_EVENT(273, "mc_STOREV8-slow3");
- mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
}
#endif
}
@@ -5874,7 +5931,7 @@
// GrP for debugging
-void mc_print_word(Addr a)
+static void mc_print_word(Addr a)
{
UChar abit[4] = {0,0,0,0};
UChar vbyte[4] = {0,0,0,0};
@@ -5889,7 +5946,9 @@
~vbyte[0], ~vbyte[1], ~vbyte[2], ~vbyte[3]);
}
-void mc_describe_memory(Addr addr, SizeT size)
+// GrP for debugging
+__attribute__((unused))
+static void mc_describe_memory(Addr addr, SizeT size)
{
Addr a;
for (a = addr; a < addr+size; a += 4) {
|