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
(26) |
2
(35) |
3
(18) |
4
(14) |
|
5
(12) |
6
(13) |
7
(11) |
8
(15) |
9
(8) |
10
(13) |
11
(25) |
|
12
(13) |
13
(24) |
14
(7) |
15
(6) |
16
(8) |
17
(6) |
18
(7) |
|
19
(8) |
20
(7) |
21
(5) |
22
(7) |
23
(6) |
24
(7) |
25
(6) |
|
26
(7) |
27
(7) |
28
(5) |
29
(5) |
30
(5) |
|
|
|
From: Tom H. <th...@cy...> - 2004-09-15 02:13:33
|
Nightly build on ginetta ( Red Hat 8.0 ) started at 2004-09-15 03:10:01 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow seg_override: valgrind ./seg_override sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 179 tests, 3 stderr failures, 0 stdout failures ================= helgrind/tests/race (stderr) helgrind/tests/race2 (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-09-15 02:08:44
|
Nightly build on alvis ( Red Hat 7.3 ) started at 2004-09-15 03:05:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow -- Finished tests in none/tests ---------------------------------------- == 179 tests, 14 stderr failures, 1 stdout failure ================= addrcheck/tests/toobig-allocs (stderr) helgrind/tests/deadlock (stderr) helgrind/tests/race (stderr) helgrind/tests/race2 (stderr) memcheck/tests/badjump (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/mismatches (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/writev (stderr) none/tests/coolo_sigaction (stderr) none/tests/gxx304 (stderr) make: *** [regtest] Error 1 |
|
From: Nicholas N. <nj...@ca...> - 2004-09-14 11:55:57
|
CVS commit by nethercote:
Remove unused macros.
M +0 -34 vg_kerneliface.h 1.25
--- valgrind/include/vg_kerneliface.h #1.24:1.25
@@ -462,38 +462,4 @@ typedef struct {
-/* Gawd ...
- Copied from /usr/src/linux-2.4.9-31/./include/asm-i386/posix_types.h
-*/
-#undef VKI_FD_SET
-#define VKI_FD_SET(fd,fdsetp) \
- __asm__ __volatile__("btsl %1,%0": \
- "=m" (*(vki_fd_set *) (fdsetp)):"r" ((int) (fd)))
-
-#undef VKI_FD_CLR
-#define VKI_FD_CLR(fd,fdsetp) \
- __asm__ __volatile__("btrl %1,%0": \
- "=m" (*(vki_fd_set *) (fdsetp)):"r" ((int) (fd)))
-
-#undef VKI_FD_ISSET
-#define VKI_FD_ISSET(fd,fdsetp) (__extension__ ({ \
- unsigned char __result; \
- __asm__ __volatile__("btl %1,%2 ; setb %0" \
- :"=q" (__result) :"r" ((int) (fd)), \
- "m" (*(vki_fd_set *) (fdsetp))); \
- __result; }))
-
-#undef VKI_FD_ZERO
-#define VKI_FD_ZERO(fdsetp) \
-do { \
- int __d0, __d1; \
- __asm__ __volatile__("cld ; rep ; stosl" \
- :"=m" (*(vki_fd_set *) (fdsetp)), \
- "=&c" (__d0), "=&D" (__d1) \
- :"a" (0), "1" (VKI_FDSET_LONGS), \
- "2" ((vki_fd_set *) (fdsetp)) : "memory"); \
-} while (0)
-
-
-
struct vki_pollfd {
Int fd;
|
|
From: Tom H. <th...@cy...> - 2004-09-14 03:15:06
|
Nightly build on standard ( Red Hat 7.2 ) started at 2004-09-14 02:00:03 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow int: valgrind ./int map_unmap: valgrind ./map_unmap mq: valgrind ./mq mremap: valgrind ./mremap munmap_exe: valgrind ./munmap_exe pth_blockedsig: valgrind ./pth_blockedsig pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert rcrl: valgrind ./rcrl readline1: valgrind ./readline1 resolv: valgrind ./resolv rlimit_nofile: valgrind ./rlimit_nofile seg_override: valgrind ./seg_override sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts Could not read `shorts.stderr.exp' make: *** [regtest] Error 2 |
|
From: <js...@ac...> - 2004-09-14 02:56:58
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2004-09-14 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 174 tests, 4 stderr failures, 0 stdout failures ================= corecheck/tests/as_mmap (stderr) corecheck/tests/fdleak_fcntl (stderr) memcheck/tests/writev (stderr) memcheck/tests/zeropage (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <to...@co...> - 2004-09-14 02:25:12
|
Nightly build on dunsmere ( Fedora Core 2 ) started at 2004-09-14 03:20:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 179 tests, 8 stderr failures, 1 stdout failure ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/writev (stderr) none/tests/exec-sigmask (stdout) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-09-14 02:19:43
|
Nightly build on audi ( Red Hat 9 ) started at 2004-09-14 03:15:03 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 179 tests, 8 stderr failures, 0 stdout failures ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-09-14 02:13:40
|
Nightly build on ginetta ( Red Hat 8.0 ) started at 2004-09-14 03:10:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow seg_override: valgrind ./seg_override sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 179 tests, 3 stderr failures, 0 stdout failures ================= helgrind/tests/race (stderr) helgrind/tests/race2 (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-09-14 02:08:20
|
Nightly build on alvis ( Red Hat 7.3 ) started at 2004-09-14 03:05:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow -- Finished tests in none/tests ---------------------------------------- == 179 tests, 14 stderr failures, 1 stdout failure ================= addrcheck/tests/toobig-allocs (stderr) helgrind/tests/deadlock (stderr) helgrind/tests/race (stderr) helgrind/tests/race2 (stderr) memcheck/tests/badjump (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/mismatches (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/writev (stderr) none/tests/coolo_sigaction (stderr) none/tests/gxx304 (stderr) make: *** [regtest] Error 1 |
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 20:54:34
|
CVS commit by nethercote:
All newlines are borked -- fix.
MERGED FROM HEAD
M +43 -1 deadlock.c 1.1.2.1
--- valgrind/helgrind/tests/deadlock.c #1.1:1.1.2.1
@@ -1 +1,43 @@
-/* Simple possible deadlock */
#include <pthread.h>
static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
static void *t1(void *v)
{
pthread_mutex_lock(&m1);
pthread_mutex_lock(&m2);
pthread_mutex_unlock(&m1);
pthread_mutex_unlock(&m2);
return 0;
}
static void *t2(void *v)
{
pthread_mutex_lock(&m2);
pthread_mutex_lock(&m1);
pthread_mutex_unlock(&m1);
pthread_mutex_unlock(&m2);
return 0;
}
int main()
{
pthread_t a, b;
/* prevent spurious messages from the dynamic linker */
pthread_mutex_lock(&m1);
pthread_mutex_unlock(&m1);
pthread_create(&a, NULL, t1, NULL);
pthread_create(&b, NULL, t2, NULL);
pthread_join(a, NULL);
pthread_join(b, NULL);
return 0;
}
\ No newline at end of file
+/* Simple possible deadlock */
+#include <pthread.h>
+
+static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
+
+static void *t1(void *v)
+{
+ pthread_mutex_lock(&m1);
+ pthread_mutex_lock(&m2);
+ pthread_mutex_unlock(&m1);
+ pthread_mutex_unlock(&m2);
+
+ return 0;
+}
+
+static void *t2(void *v)
+{
+ pthread_mutex_lock(&m2);
+ pthread_mutex_lock(&m1);
+ pthread_mutex_unlock(&m1);
+ pthread_mutex_unlock(&m2);
+
+ return 0;
+}
+
+int main()
+{
+ pthread_t a, b;
+
+ /* prevent spurious messages from the dynamic linker */
+ pthread_mutex_lock(&m1);
+ pthread_mutex_unlock(&m1);
+
+ pthread_create(&a, NULL, t1, NULL);
+ pthread_create(&b, NULL, t2, NULL);
+
+ pthread_join(a, NULL);
+ pthread_join(b, NULL);
+
+ return 0;
+}
+
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 20:51:17
|
CVS commit by nethercote:
All newlines are borked; fix.
M +43 -1 deadlock.c 1.2
--- valgrind/helgrind/tests/deadlock.c #1.1:1.2
@@ -1 +1,43 @@
-/* Simple possible deadlock */
#include <pthread.h>
static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
static void *t1(void *v)
{
pthread_mutex_lock(&m1);
pthread_mutex_lock(&m2);
pthread_mutex_unlock(&m1);
pthread_mutex_unlock(&m2);
return 0;
}
static void *t2(void *v)
{
pthread_mutex_lock(&m2);
pthread_mutex_lock(&m1);
pthread_mutex_unlock(&m1);
pthread_mutex_unlock(&m2);
return 0;
}
int main()
{
pthread_t a, b;
/* prevent spurious messages from the dynamic linker */
pthread_mutex_lock(&m1);
pthread_mutex_unlock(&m1);
pthread_create(&a, NULL, t1, NULL);
pthread_create(&b, NULL, t2, NULL);
pthread_join(a, NULL);
pthread_join(b, NULL);
return 0;
}
\ No newline at end of file
+/* Simple possible deadlock */
+#include <pthread.h>
+
+static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
+
+static void *t1(void *v)
+{
+ pthread_mutex_lock(&m1);
+ pthread_mutex_lock(&m2);
+ pthread_mutex_unlock(&m1);
+ pthread_mutex_unlock(&m2);
+
+ return 0;
+}
+
+static void *t2(void *v)
+{
+ pthread_mutex_lock(&m2);
+ pthread_mutex_lock(&m1);
+ pthread_mutex_unlock(&m1);
+ pthread_mutex_unlock(&m2);
+
+ return 0;
+}
+
+int main()
+{
+ pthread_t a, b;
+
+ /* prevent spurious messages from the dynamic linker */
+ pthread_mutex_lock(&m1);
+ pthread_mutex_unlock(&m1);
+
+ pthread_create(&a, NULL, t1, NULL);
+ pthread_create(&b, NULL, t2, NULL);
+
+ pthread_join(a, NULL);
+ pthread_join(b, NULL);
+
+ return 0;
+}
+
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 20:46:52
|
CVS commit by nethercote: Added FLAC. M +4 -0 users.html 1.75 --- devel-home/valgrind/users.html #1.74:1.75 @@ -319,4 +319,8 @@ <dt><a href="http://www.vcdimager.org/">VCDImager</a> <dd>A full-featured mastering suite for video CDs and super video CDs. + +<dt><a href="http://flac.sf.net/">FLAC</a> +<dd>A free lossless audio codec. + </dl> |
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 20:42:46
|
On Mon, 13 Sep 2004, Jeremy Fitzhardinge wrote: >> Arch-abstraction: >> - abstract out reg filling for core dumps > > Actually, I think we should probably carve out a larger chunk into arch- > specific, since different architectures put different notes in their > core dumps (and different OS's have completely different corefile > formats too, of course). > > I'll look into it. There'll be a lot of such moving around as more platforms are supported. The changes I'm putting in at the moment are sufficient factored to cope with x86 and PPC, but that won't be enough in general. N |
|
From: Jeremy F. <je...@go...> - 2004-09-13 16:59:49
|
On Mon, 2004-09-13 at 17:19 +0200, Nicholas Nethercote wrote: > CVS commit by nethercote: > > > Arch-abstraction: > - abstract out reg filling for core dumps Actually, I think we should probably carve out a larger chunk into arch- specific, since different architectures put different notes in their core dumps (and different OS's have completely different corefile formats too, of course). I'll look into it. J |
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 16:11:42
|
CVS commit by nethercote:
Arch-abstraction:
- abstract out all the SET_THREAD_REG macros
M +15 -15 core.h 1.30
M +6 -1 x86/core_arch.h 1.8
M +4 -0 x86/signal.c 1.2
M +5 -0 x86-linux/core_platform.h 1.2
--- valgrind/coregrind/core.h #1.29:1.30
@@ -927,27 +927,27 @@ extern void VG_(scheduler_handle_fatal_s
#define VG_AR_CLIENT_STACKBASE_REDZONE_SZB 16
-/* Write a value to a client's thread register, and shadow (if necessary) */
-#define SET_THREAD_REG( zztid, zzval, zzreg, zzREG, zzevent, zzargs... ) \
- do { VG_(threads)[zztid].arch.m_##zzreg = (zzval); \
- VG_TRACK( zzevent, zztid, R_##zzREG, ##zzargs ); \
+// Write a value to a client's thread register, and shadow (if necessary).
+// Note that there are some further similar macros in the arch- and
+// platform-specific parts; these ones are the totally generic ones.
+#define SET_THREAD_REG( zztid, zzval, zzGETREG, zzREG, zzevent, zzargs... ) \
+ do { zzGETREG(VG_(threads)[zztid].arch) = (zzval); \
+ VG_TRACK( zzevent, zztid, zzREG, ##zzargs ); \
} while (0)
-#define SET_SYSCALL_RETVAL(zztid, zzval) \
- SET_THREAD_REG(zztid, zzval, eax, EAX, post_reg_write_syscall_return)
-
-#define SET_SIGNAL_ESP(zztid, zzval) \
- SET_THREAD_REG(zztid, zzval, esp, ESP, post_reg_write_deliver_signal)
-
#define SET_CLREQ_RETVAL(zztid, zzval) \
- SET_THREAD_REG(zztid, zzval, edx, EDX, post_reg_write_clientreq_return)
+ SET_THREAD_REG(zztid, zzval, ARCH_CLREQ_RET, R_CLREQ_RET, \
+ post_reg_write_clientreq_return)
#define SET_CLCALL_RETVAL(zztid, zzval, f) \
- SET_THREAD_REG(zztid, zzval, edx, EDX, post_reg_write_clientcall_return, f)
+ SET_THREAD_REG(zztid, zzval, ARCH_CLREQ_RET, R_CLREQ_RET, \
+ post_reg_write_clientcall_return, f)
#define SET_PTHREQ_ESP(zztid, zzval) \
- SET_THREAD_REG(zztid, zzval, esp, ESP, post_reg_write_pthread_return)
+ SET_THREAD_REG(zztid, zzval, ARCH_STACK_PTR, R_STACK_PTR, \
+ post_reg_write_pthread_return)
#define SET_PTHREQ_RETVAL(zztid, zzval) \
- SET_THREAD_REG(zztid, zzval, edx, EDX, post_reg_write_pthread_return)
+ SET_THREAD_REG(zztid, zzval, ARCH_PTHREQ_RET, R_PTHREQ_RET, \
+ post_reg_write_pthread_return)
@@ -986,5 +986,5 @@ extern void VG_(do_pthread_sigmask_SCSS_
/* Modify the current thread's state once we have detected it is
returning from a signal handler. */
-extern Bool VG_(signal_returns) ( ThreadId );
+extern Bool VG_(signal_returns) ( ThreadId tid );
/* Handy utilities to block/restore all host signals. */
--- valgrind/coregrind/x86/core_arch.h #1.7:1.8
@@ -45,9 +45,14 @@
#define ARCH_CLREQ_ARGS(regs) ((regs).m_eax)
+#define ARCH_PTHREQ_RET(regs) ((regs).m_edx)
+#define ARCH_CLREQ_RET(regs) ((regs).m_edx)
-// Interesting register numbers
+// Accessors for the baseBlock
#define R_STACK_PTR R_ESP
#define R_FRAME_PTR R_EBP
+#define R_CLREQ_RET R_EDX
+#define R_PTHREQ_RET R_EDX
+
// Stack frame layout and linkage
#define FIRST_STACK_FRAME(ebp) (ebp)
--- valgrind/coregrind/x86/signal.c #1.1:1.2
@@ -161,4 +161,8 @@ static void synth_ucontext(ThreadId tid,
}
+#define SET_SIGNAL_ESP(zztid, zzval) \
+ SET_THREAD_REG(zztid, zzval, ARCH_STACK_PTR, R_STACK_PTR, \
+ post_reg_write_deliver_signal)
+
void VGA_(push_signal_frame)(ThreadId tid, Addr esp_top_of_frame,
const vki_ksiginfo_t *siginfo,
--- valgrind/coregrind/x86-linux/core_platform.h #1.1:1.2
@@ -57,4 +57,9 @@
#define R_SYSCALL_RET R_EAX
+// Setting thread regs and shadow regs from within the core
+#define SET_SYSCALL_RETVAL(zztid, zzval) \
+ SET_THREAD_REG(zztid, zzval, PLATFORM_SYSCALL_RET, R_SYSCALL_RET, \
+ post_reg_write_syscall_return)
+
#endif // __X86_LINUX_CORE_PLATFORM_H
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 16:10:36
|
CVS commit by nethercote: Arch-abstraction: - add file for x86-specific signal stuff. Should have gone in with the last commit, whoops. A signal.c 1.1 [GPL (v2+)] |
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 15:19:45
|
CVS commit by nethercote:
Arch-abstraction:
- abstract out reg filling for core dumps
M +18 -5 core.h 1.29
M +11 -70 vg_signals.c 1.88
--- valgrind/coregrind/core.h #1.28:1.29
@@ -1510,4 +1510,22 @@ extern UInt* VGA_(reg_addr_from_BB) ( I
extern UInt* VGA_(reg_addr_from_tst) ( Int reg, arch_thread_t* );
+// Pointercheck
+extern Bool VGA_(setup_pointercheck) ( void );
+
+// For attaching the debugger
+extern Int VGA_(ptrace_setregs_from_BB) ( Int pid );
+extern Int VGA_(ptrace_setregs_from_tst) ( Int pid, arch_thread_t* arch );
+
+// Making coredumps
+extern void VGA_(fill_elfregs_from_BB) ( struct user_regs_struct* regs );
+extern void VGA_(fill_elfregs_from_tst) ( struct user_regs_struct* regs,
+ const arch_thread_t* arch );
+extern void VGA_(fill_elffpregs_from_BB) ( elf_fpregset_t* fpu );
+extern void VGA_(fill_elffpregs_from_tst) ( elf_fpregset_t* fpu,
+ const arch_thread_t* arch );
+extern void VGA_(fill_elffpxregs_from_BB) ( elf_fpxregset_t* xfpu );
+extern void VGA_(fill_elffpxregs_from_tst) ( elf_fpxregset_t* xfpu,
+ const arch_thread_t* arch );
+
// Signal stuff
extern void VGA_(push_signal_frame) ( ThreadId tid, Addr esp_top_of_frame,
@@ -1517,10 +1535,5 @@ extern void VGA_(push_signal_frame) ( Th
extern Int VGA_(pop_signal_frame) ( ThreadId tid );
-// Pointercheck
-extern Bool VGA_(setup_pointercheck) ( void );
-// For attaching the debugger
-extern Int VGA_(ptrace_setregs_from_BB) ( Int pid );
-extern Int VGA_(ptrace_setregs_from_tst) ( Int pid, arch_thread_t* arch );
/* ---------------------------------------------------------------------
--- valgrind/coregrind/vg_signals.c #1.87:1.88
@@ -825,9 +825,6 @@ static void set_main_sigmask(void)
------------------------------------------------------------------ */
-
-
/* Set up a stack frame (VgSigContext) for the client's signal
- handler. This includes the signal number and a bogus return
- address. */
+ handler. */
static
void vg_push_signal_frame ( ThreadId tid, const vki_ksiginfo_t *siginfo )
@@ -1167,41 +1164,7 @@ static void fill_prstatus(const ThreadSt
if (VG_(is_running_thread)(tst->tid)) {
- regs->eflags = VG_(baseBlock)[VGOFF_(m_eflags)];
- regs->esp = VG_(baseBlock)[VGOFF_(m_esp)];
- regs->eip = VG_(baseBlock)[VGOFF_(m_eip)];
-
- regs->ebx = VG_(baseBlock)[VGOFF_(m_ebx)];
- regs->ecx = VG_(baseBlock)[VGOFF_(m_ecx)];
- regs->edx = VG_(baseBlock)[VGOFF_(m_edx)];
- regs->esi = VG_(baseBlock)[VGOFF_(m_esi)];
- regs->edi = VG_(baseBlock)[VGOFF_(m_edi)];
- regs->ebp = VG_(baseBlock)[VGOFF_(m_ebp)];
- regs->eax = VG_(baseBlock)[VGOFF_(m_eax)];
-
- regs->cs = VG_(baseBlock)[VGOFF_(m_cs)];
- regs->ds = VG_(baseBlock)[VGOFF_(m_ds)];
- regs->ss = VG_(baseBlock)[VGOFF_(m_ss)];
- regs->es = VG_(baseBlock)[VGOFF_(m_es)];
- regs->fs = VG_(baseBlock)[VGOFF_(m_fs)];
- regs->gs = VG_(baseBlock)[VGOFF_(m_gs)];
+ VGA_(fill_elfregs_from_BB)(regs);
} else {
- regs->eflags = tst->arch.m_eflags;
- regs->esp = tst->arch.m_esp;
- regs->eip = tst->arch.m_eip;
-
- regs->ebx = tst->arch.m_ebx;
- regs->ecx = tst->arch.m_ecx;
- regs->edx = tst->arch.m_edx;
- regs->esi = tst->arch.m_esi;
- regs->edi = tst->arch.m_edi;
- regs->ebp = tst->arch.m_ebp;
- regs->eax = tst->arch.m_eax;
-
- regs->cs = tst->arch.m_cs;
- regs->ds = tst->arch.m_ds;
- regs->ss = tst->arch.m_ss;
- regs->es = tst->arch.m_es;
- regs->fs = tst->arch.m_fs;
- regs->gs = tst->arch.m_gs;
+ VGA_(fill_elfregs_from_tst)(regs, &tst->arch);
}
}
@@ -1209,38 +1172,16 @@ static void fill_prstatus(const ThreadSt
static void fill_fpu(const ThreadState *tst, elf_fpregset_t *fpu)
{
- const Char *from;
-
- if (VG_(is_running_thread)(tst->tid)) {
- from = (const Char *)&VG_(baseBlock)[VGOFF_(m_ssestate)];
- } else {
- from = (const Char *)&tst->arch.m_sse;
- }
-
- if (VG_(have_ssestate)) {
- UShort *to;
- Int i;
-
- /* This is what the kernel does */
- VG_(memcpy)(fpu, from, 7*sizeof(long));
-
- to = (UShort *)&fpu->st_space[0];
- from += 18 * sizeof(UShort);
-
- for(i = 0; i < 8; i++, to += 5, from += 8)
- VG_(memcpy)(to, from, 5*sizeof(UShort));
- } else
- VG_(memcpy)(fpu, from, sizeof(*fpu));
+ if (VG_(is_running_thread)(tst->tid))
+ VGA_(fill_elffpregs_from_BB)(fpu);
+ else
+ VGA_(fill_elffpregs_from_tst)(fpu, &tst->arch);
}
static void fill_xfpu(const ThreadState *tst, elf_fpxregset_t *xfpu)
{
- UShort *from;
-
if (VG_(is_running_thread)(tst->tid))
- from = (UShort *)&VG_(baseBlock)[VGOFF_(m_ssestate)];
+ VGA_(fill_elffpxregs_from_BB)(xfpu);
else
- from = (UShort *)tst->arch.m_sse;
-
- VG_(memcpy)(xfpu, from, sizeof(*xfpu));
+ VGA_(fill_elffpxregs_from_tst)(xfpu, &tst->arch);
}
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 14:15:49
|
CVS commit by nethercote:
Arch-abstraction:
- abstract out signal frame pushing/popping
M +7 -0 core.h 1.28
M +6 -293 vg_signals.c 1.87
M +1 -0 x86/Makefile.am 1.11
--- valgrind/coregrind/core.h #1.27:1.28
@@ -1510,4 +1510,11 @@ extern UInt* VGA_(reg_addr_from_BB) ( I
extern UInt* VGA_(reg_addr_from_tst) ( Int reg, arch_thread_t* );
+// Signal stuff
+extern void VGA_(push_signal_frame) ( ThreadId tid, Addr esp_top_of_frame,
+ const vki_ksiginfo_t *siginfo,
+ void *handler, UInt flags,
+ const vki_ksigset_t *mask);
+extern Int VGA_(pop_signal_frame) ( ThreadId tid );
+
// Pointercheck
extern Bool VGA_(setup_pointercheck) ( void );
--- valgrind/coregrind/vg_signals.c #1.86:1.87
@@ -825,126 +825,5 @@ static void set_main_sigmask(void)
------------------------------------------------------------------ */
-/* A structure in which to save the application's registers
- during the execution of signal handlers. */
-
-typedef
- struct {
- /* There are two different stack frame formats, depending on
- whether the client set the SA_SIGINFO flag for the handler.
- This structure is put onto the client's stack as part of
- signal delivery, and therefore appears as the signal
- handler's arguments.
-
- The first two words are common for both frame formats -
- they're the return address and the signal number. */
-
- /* Sig handler's (bogus) return address */
- Addr retaddr;
- /* The arg to the sig handler. We need to inspect this after
- the handler returns, but it's unreasonable to assume that the
- handler won't change it. So we keep a second copy of it in
- sigNo_private. */
- Int sigNo;
-
- /* This is where the two frames start differing. */
- union {
- struct { /* set SA_SIGINFO */
- /* ptr to siginfo_t. */
- Addr psigInfo;
-
- /* ptr to ucontext */
- Addr puContext;
- } sigInfo;
- struct vki_sigcontext sigContext; /* did not set SA_SIGINFO */
- } handlerArgs;
-
- /* The rest are private fields which the handler is unaware of. */
-
- /* Sanity check word. */
- UInt magicPI;
- /* pointed to by psigInfo */
- vki_ksiginfo_t sigInfo;
- /* pointed to by puContext */
- struct vki_ucontext uContext;
-
- /* Safely-saved version of sigNo, as described above. */
- Int sigNo_private;
- /* Saved processor state. */
- UInt m_sse[VG_SIZE_OF_SSESTATE_W];
-
- UInt m_eax;
- UInt m_ecx;
- UInt m_edx;
- UInt m_ebx;
- UInt m_ebp;
- UInt m_esp;
- UInt m_esi;
- UInt m_edi;
- UInt m_eflags;
- Addr m_eip;
-
- UInt sh_eax;
- UInt sh_ebx;
- UInt sh_ecx;
- UInt sh_edx;
- UInt sh_esi;
- UInt sh_edi;
- UInt sh_ebp;
- UInt sh_esp;
- UInt sh_eflags;
-
- /* saved signal mask to be restored when handler returns */
- vki_ksigset_t mask;
-
- /* Scheduler-private stuff: what was the thread's status prior to
- delivering this signal? */
- ThreadStatus status;
- /* Sanity check word. Is the highest-addressed word; do not
- move!*/
- UInt magicE;
- }
- VgSigFrame;
-
-
-/* Make up a plausible-looking thread state from the thread's current state */
-static void synth_ucontext(ThreadId tid, const vki_ksiginfo_t *si,
- const vki_ksigset_t *set, struct vki_ucontext *uc)
-{
- ThreadState *tst = VG_(get_ThreadState)(tid);
- struct vki_sigcontext *sc = &uc->uc_mcontext;
-
- VG_(memset)(uc, 0, sizeof(*uc));
-
- uc->uc_flags = 0;
- uc->uc_link = 0;
- uc->uc_sigmask = *set;
- uc->uc_stack = tst->altstack;
-#define SC(reg) sc->reg = tst->arch.m_##reg
- SC(gs);
- SC(fs);
- SC(es);
- SC(ds);
-
- SC(edi);
- SC(esi);
- SC(ebp);
- SC(esp);
- SC(ebx);
- SC(edx);
- SC(ecx);
- SC(eax);
-
- SC(eip);
- SC(cs);
- SC(eflags);
- SC(ss);
- /* XXX esp_at_signal */
- /* XXX trapno */
- /* XXX err */
-#undef SC
-
- sc->cr2 = (UInt)si->_sifields._sigfault._addr;
-}
/* Set up a stack frame (VgSigContext) for the client's signal
@@ -954,7 +833,5 @@ static
void vg_push_signal_frame ( ThreadId tid, const vki_ksiginfo_t *siginfo )
{
- Int i;
- Addr esp, esp_top_of_frame;
- VgSigFrame* frame;
+ Addr esp_top_of_frame;
ThreadState* tst;
Int sigNo = siginfo->si_signo;
@@ -991,115 +868,8 @@ void vg_push_signal_frame ( ThreadId tid
VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/False );
}
-
- esp = esp_top_of_frame;
- esp -= sizeof(VgSigFrame);
- frame = (VgSigFrame*)esp;
-
- /* For tracking memory events, indicate the entire frame has been
- * allocated, but pretend that only the first four words are written */
- VG_TRACK( new_mem_stack_signal, (Addr)frame, sizeof(VgSigFrame) );
-
- /* Assert that the frame is placed correctly. */
- vg_assert( (sizeof(VgSigFrame) & 0x3) == 0 );
- vg_assert( ((Char*)(&frame->magicE)) + sizeof(UInt)
- == ((Char*)(esp_top_of_frame)) );
-
- /* retaddr, sigNo, psigInfo, puContext fields are to be written */
- VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal handler frame",
- (Addr)frame, offsetof(VgSigFrame, handlerArgs) );
- frame->retaddr = (UInt)VG_(client_trampoline_code)+VG_(tramp_sigreturn_offset);
- frame->sigNo = sigNo;
- frame->sigNo_private = sigNo;
- VG_TRACK( post_mem_write, (Addr)frame, offsetof(VgSigFrame, handlerArgs) );
-
- if (vg_scss.scss_per_sig[sigNo].scss_flags & VKI_SA_SIGINFO) {
- /* if the client asked for a siginfo delivery, then build the stack that way */
- VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal handler frame (siginfo)",
- (Addr)&frame->handlerArgs, sizeof(frame->handlerArgs.sigInfo) );
- frame->handlerArgs.sigInfo.psigInfo = (Addr)&frame->sigInfo;
- frame->handlerArgs.sigInfo.puContext = (Addr)&frame->uContext;
- VG_TRACK( post_mem_write, (Addr)&frame->handlerArgs, sizeof(frame->handlerArgs.sigInfo) );
-
- VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal handler frame (siginfo)",
- (Addr)&frame->sigInfo, sizeof(frame->sigInfo) );
- VG_(memcpy)(&frame->sigInfo, siginfo, sizeof(vki_ksiginfo_t));
- if (sigNo == VKI_SIGFPE) {
- frame->sigInfo._sifields._sigfault._addr = (void *)tst->arch.m_eip;
- }
- VG_TRACK( post_mem_write, (Addr)&frame->sigInfo, sizeof(frame->sigInfo) );
-
- VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal handler frame (siginfo)",
- (Addr)&frame->uContext, sizeof(frame->uContext) );
- synth_ucontext(tid, siginfo, &vg_scss.scss_per_sig[sigNo].scss_mask, &frame->uContext);
- VG_TRACK( post_mem_write, (Addr)&frame->uContext, sizeof(frame->uContext) );
- } else {
- struct vki_ucontext uc;
-
- /* otherwise just put the sigcontext there */
-
- synth_ucontext(tid, siginfo, &vg_scss.scss_per_sig[sigNo].scss_mask, &uc);
-
- VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal handler frame (sigcontext)",
- (Addr)&frame->handlerArgs, sizeof(frame->handlerArgs.sigContext) );
- VG_(memcpy)(&frame->handlerArgs.sigContext, &uc.uc_mcontext,
- sizeof(struct vki_sigcontext));
- VG_TRACK( post_mem_write, (Addr)&frame->handlerArgs,
- sizeof(frame->handlerArgs.sigContext) );
-
- frame->handlerArgs.sigContext.oldmask = tst->sig_mask.ws[0];
- }
-
- frame->magicPI = 0x31415927;
-
- for (i = 0; i < VG_SIZE_OF_SSESTATE_W; i++)
- frame->m_sse[i] = tst->arch.m_sse[i];
-
- frame->m_eax = tst->arch.m_eax;
- frame->m_ecx = tst->arch.m_ecx;
- frame->m_edx = tst->arch.m_edx;
- frame->m_ebx = tst->arch.m_ebx;
- frame->m_ebp = tst->arch.m_ebp;
- frame->m_esp = tst->arch.m_esp;
- frame->m_esi = tst->arch.m_esi;
- frame->m_edi = tst->arch.m_edi;
- frame->m_eflags = tst->arch.m_eflags;
- frame->m_eip = tst->arch.m_eip;
-
- if (VG_(needs).shadow_regs) {
- frame->sh_eax = tst->arch.sh_eax;
- frame->sh_ecx = tst->arch.sh_ecx;
- frame->sh_edx = tst->arch.sh_edx;
- frame->sh_ebx = tst->arch.sh_ebx;
- frame->sh_ebp = tst->arch.sh_ebp;
- frame->sh_esp = tst->arch.sh_esp;
- frame->sh_esi = tst->arch.sh_esi;
- frame->sh_edi = tst->arch.sh_edi;
- frame->sh_eflags = tst->arch.sh_eflags;
- }
-
- frame->mask = tst->sig_mask;
-
- /* If the thread is currently blocked in a syscall, we want it to
- resume as runnable. */
- if (tst->status == VgTs_WaitSys)
- frame->status = VgTs_Runnable;
- else
- frame->status = tst->status;
-
- frame->magicE = 0x27182818;
-
- /* Ensure 'tid' and 'tst' correspond */
- vg_assert(& VG_(threads)[tid] == tst);
- /* Set the thread so it will next run the handler. */
- /* tst->arch.m_esp = esp; */
- SET_SIGNAL_ESP(tid, esp);
-
- tst->arch.m_eip = (Addr)vg_scss.scss_per_sig[sigNo].scss_handler;
- /* This thread needs to be marked runnable, but we leave that the
- caller to do. */
-
- if (0)
- VG_(printf)("pushed signal frame; %%ESP now = %p, next %%EBP = %p, status=%d\n",
- esp, tst->arch.m_eip, tst->status);
+ VGA_(push_signal_frame)(tid, esp_top_of_frame, siginfo,
+ vg_scss.scss_per_sig[sigNo].scss_handler,
+ vg_scss.scss_per_sig[sigNo].scss_flags,
+ &vg_scss.scss_per_sig[sigNo].scss_mask);
}
@@ -1110,63 +880,6 @@ static
Int vg_pop_signal_frame ( ThreadId tid )
{
- Addr esp;
- Int sigNo, i;
- VgSigFrame* frame;
- ThreadState* tst;
-
- vg_assert(VG_(is_valid_tid)(tid));
- tst = & VG_(threads)[tid];
-
- /* Correctly reestablish the frame base address. */
- esp = tst->arch.m_esp;
- frame = (VgSigFrame*)
- (esp -4 /* because the handler's RET pops the RA */
- +20 /* because signalreturn_bogusRA pushes 5 words */);
-
- vg_assert(frame->magicPI == 0x31415927);
- vg_assert(frame->magicE == 0x27182818);
- if (VG_(clo_trace_signals))
- VG_(message)(Vg_DebugMsg,
- "vg_pop_signal_frame (thread %d): valid magic; EIP=%p", tid, frame->m_eip);
-
- /* Mark the frame structure as nonaccessible. */
- VG_TRACK( die_mem_stack_signal, (Addr)frame, sizeof(VgSigFrame) );
-
- /* restore machine state */
- for (i = 0; i < VG_SIZE_OF_SSESTATE_W; i++)
- tst->arch.m_sse[i] = frame->m_sse[i];
-
- tst->arch.m_eax = frame->m_eax;
- tst->arch.m_ecx = frame->m_ecx;
- tst->arch.m_edx = frame->m_edx;
- tst->arch.m_ebx = frame->m_ebx;
- tst->arch.m_ebp = frame->m_ebp;
- tst->arch.m_esp = frame->m_esp;
- tst->arch.m_esi = frame->m_esi;
- tst->arch.m_edi = frame->m_edi;
- tst->arch.m_eflags = frame->m_eflags;
- tst->arch.m_eip = frame->m_eip;
-
- if (VG_(needs).shadow_regs) {
- tst->arch.sh_eax = frame->sh_eax;
- tst->arch.sh_ecx = frame->sh_ecx;
- tst->arch.sh_edx = frame->sh_edx;
- tst->arch.sh_ebx = frame->sh_ebx;
- tst->arch.sh_ebp = frame->sh_ebp;
- tst->arch.sh_esp = frame->sh_esp;
- tst->arch.sh_esi = frame->sh_esi;
- tst->arch.sh_edi = frame->sh_edi;
- tst->arch.sh_eflags = frame->sh_eflags;
- }
-
- /* don't use the copy exposed to the handler; it might have changed
- it. */
- sigNo = frame->sigNo_private;
-
- /* And restore the thread's status to what it was before the signal
- was delivered. */
- tst->status = frame->status;
+ Int sigNo = VGA_(pop_signal_frame)(tid);
- tst->sig_mask = frame->mask;
VG_(proxy_setsigmask)(tid);
--- valgrind/coregrind/x86/Makefile.am #1.10:1.11
@@ -19,4 +19,5 @@
libarch_a_SOURCES = \
+ signal.c \
state.c
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 13:27:38
|
CVS commit by nethercote:
Don't inline large function
M +1 -1 ms_main.c 1.16
--- valgrind/massif/ms_main.c #1.15:1.16
@@ -664,5 +664,5 @@ void remove_HP_Chunk(HP_Chunk* hc, HP_Ch
static void hp_census(void);
-static __inline__
+static
void* new_block ( void* p, Int size, UInt align, Bool is_zeroed )
{
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 13:16:49
|
CVS commit by nethercote:
Arch-abstraction:
- in vg_scheduler.c, abstract out some stack manipulations.
M +3 -0 core.h 1.27
M +8 -27 vg_scheduler.c 1.185
M +34 -0 x86/state.c 1.9
--- valgrind/coregrind/core.h #1.26:1.27
@@ -1503,4 +1503,7 @@ extern void VGA_(cleanup_thread) ( arch_
extern void VGA_(setup_child) ( arch_thread_t*, arch_thread_t* );
+extern void VGA_(set_arg_and_bogus_ret) ( ThreadId tid, UWord arg, Addr ret );
+extern void VGA_(thread_initial_stack) ( ThreadId tid, UWord arg, Addr ret );
+
// Symtab stuff
extern UInt* VGA_(reg_addr_from_BB) ( Int reg );
--- valgrind/coregrind/vg_scheduler.c #1.184:1.185
@@ -1160,15 +1160,8 @@ void make_thread_jump_to_cancelhdlr ( Th
vg_assert(VG_(threads)[tid].cancel_pend != NULL);
- /* Push a suitable arg, and mark it as readable. */
- SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.m_esp - 4);
- * (UInt*)(VG_(threads)[tid].arch.m_esp) = (UInt)PTHREAD_CANCELED;
- VG_TRACK( post_mem_write, VG_(threads)[tid].arch.m_esp, sizeof(void*) );
-
- /* Push a bogus return address. It will not return, but we still
- need to have it so that the arg is at the correct stack offset.
- Don't mark as readable; any attempt to read this is and internal
- valgrind bug since thread_exit_wrapper should not return. */
- SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.m_esp - 4);
- * (UInt*)(VG_(threads)[tid].arch.m_esp) = 0xBEADDEEF;
+ /* Set an argument and bogus return address. The return address will not
+ be used, but we still need to have it so that the arg is at the
+ correct stack offset. */
+ VGA_(set_arg_and_bogus_ret)(tid, (UInt)PTHREAD_CANCELED, 0xBEADDEEF);
/* .cancel_pend will hold &thread_exit_wrapper */
@@ -1711,6 +1704,5 @@ void do__quit ( ThreadId tid )
-/* Should never be entered. If it is, will be on the simulated
- CPU. */
+/* Should never be entered. If it is, will be on the simulated CPU. */
static
void do__apply_in_new_thread_bogusRA ( void )
@@ -1805,20 +1797,9 @@ void do__apply_in_new_thread ( ThreadId
VG_(threads)[tid].stack_size
- VG_AR_CLIENT_STACKBASE_REDZONE_SZB);
- VG_TRACK ( ban_mem_stack, VG_(threads)[tid].arch.m_esp,
+ VG_TRACK ( ban_mem_stack, ARCH_STACK_PTR(VG_(threads)[tid].arch),
VG_AR_CLIENT_STACKBASE_REDZONE_SZB );
- /* push two args */
- SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.m_esp - 8);
-
- VG_TRACK ( new_mem_stack, (Addr)VG_(threads)[tid].arch.m_esp, 2 * 4 );
- VG_TRACK ( pre_mem_write, Vg_CorePThread, tid, "new thread: stack",
- (Addr)VG_(threads)[tid].arch.m_esp, 2 * 4 );
-
- /* push arg and (bogus) return address */
- * (UInt*)(VG_(threads)[tid].arch.m_esp+4) = (UInt)arg;
- * (UInt*)(VG_(threads)[tid].arch.m_esp)
- = (UInt)&do__apply_in_new_thread_bogusRA;
-
- VG_TRACK ( post_mem_write, VG_(threads)[tid].arch.m_esp, 2 * 4 );
+ VGA_(thread_initial_stack)(tid, (UWord)arg,
+ (Addr)&do__apply_in_new_thread_bogusRA);
/* this is where we start */
--- valgrind/coregrind/x86/state.c #1.8:1.9
@@ -491,4 +491,38 @@ void VGA_(setup_child) ( arch_thread_t *
}
+void VGA_(set_arg_and_bogus_ret)( ThreadId tid, UWord arg, Addr ret )
+{
+ /* Push the arg, and mark it as readable. */
+ SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.m_esp - sizeof(UWord));
+ * (UInt*)(VG_(threads)[tid].arch.m_esp) = arg;
+ VG_TRACK( post_mem_write, VG_(threads)[tid].arch.m_esp, sizeof(void*) );
+
+ /* Don't mark the pushed return address as readable; any attempt to read
+ this is an internal valgrind bug since thread_exit_wrapper() should not
+ return. */
+ SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.m_esp - sizeof(UWord));
+ * (UInt*)(VG_(threads)[tid].arch.m_esp) = ret;
+}
+
+void VGA_(thread_initial_stack)(ThreadId tid, UWord arg, Addr ret)
+{
+ Addr esp = (Addr)ARCH_STACK_PTR(VG_(threads)[tid].arch);
+
+ /* push two args */
+ esp -= 8;
+ SET_PTHREQ_ESP(tid, esp);
+
+ VG_TRACK ( new_mem_stack, esp, 2 * 4 );
+ VG_TRACK ( pre_mem_write, Vg_CorePThread, tid, "new thread: stack",
+ esp, 2 * 4 );
+
+ /* push arg and (bogus) return address */
+ *(UWord*)(esp+4) = arg;
+ *(UWord*)(esp) = ret;
+
+ VG_TRACK ( post_mem_write, esp, 2 * 4 );
+}
+
+
/*------------------------------------------------------------*/
/*--- Symtab stuff ---*/
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 12:16:15
|
CVS commit by nethercote:
Fix off-by-one error when counting the number of BBs executed.
M +2 -2 vg_scheduler.c 1.184
--- valgrind/coregrind/vg_scheduler.c #1.183:1.184
@@ -1005,6 +1005,6 @@ VgSchedReturnCode do_scheduler ( Int* ex
counters. */
- done_this_time = (Int)dispatch_ctr_SAVED - (Int)VG_(dispatch_ctr) - 1;
- vg_assert(done_this_time >= 0);
+ done_this_time = (Int)dispatch_ctr_SAVED - (Int)VG_(dispatch_ctr);
+ vg_assert(done_this_time > 0);
VG_(bbs_done) += (ULong)done_this_time;
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 11:19:35
|
CVS commit by nethercote:
Fix grammar
MERGED FROM HEAD
M +1 -1 mc_main.html 1.10.2.1
--- valgrind/memcheck/docs/mc_main.html #1.10:1.10.2.1
@@ -582,5 +582,5 @@
<p>
- <li>When the program does malloc/new, the A bits for the exactly the
+ <li>When the program does malloc/new, the A bits for exactly the
area allocated, and not a byte more, are marked as accessible.
Upon freeing the area the A bits are changed to indicate
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 11:19:13
|
CVS commit by nethercote:
Fix grammar
M +1 -1 mc_main.html 1.11
--- valgrind/memcheck/docs/mc_main.html #1.10:1.11
@@ -582,5 +582,5 @@
<p>
- <li>When the program does malloc/new, the A bits for the exactly the
+ <li>When the program does malloc/new, the A bits for exactly the
area allocated, and not a byte more, are marked as accessible.
Upon freeing the area the A bits are changed to indicate
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 11:05:23
|
CVS commit by nethercote: Remove suppression files that have never been used, and don't get included in "make dist". M +6 -1 coregrind/core.h 1.26 R linux22.supp 1.8 R linux24.supp 1.7 --- valgrind/coregrind/core.h #1.25:1.26 @@ -1489,11 +1489,13 @@ extern UInt VG_(baseBlock)[VG_BASEBLOCK_ // --------------------------------------------------------------------- -/* For setting up the baseBlock */ +// For setting up the baseBlock extern void VGA_(init_low_baseBlock) ( Addr client_eip, Addr esp_at_startup ); extern void VGA_(init_high_baseBlock) ( Addr client_eip, Addr esp_at_startup ); +// Register state moving extern void VGA_(load_state) ( arch_thread_t*, ThreadId tid ); extern void VGA_(save_state) ( arch_thread_t*, ThreadId tid ); +// Thread stuff extern void VGA_(clear_thread) ( arch_thread_t* ); extern void VGA_(init_thread) ( arch_thread_t* ); @@ -1501,9 +1503,12 @@ extern void VGA_(cleanup_thread) ( arch_ extern void VGA_(setup_child) ( arch_thread_t*, arch_thread_t* ); +// Symtab stuff extern UInt* VGA_(reg_addr_from_BB) ( Int reg ); extern UInt* VGA_(reg_addr_from_tst) ( Int reg, arch_thread_t* ); +// Pointercheck extern Bool VGA_(setup_pointercheck) ( void ); +// For attaching the debugger extern Int VGA_(ptrace_setregs_from_BB) ( Int pid ); extern Int VGA_(ptrace_setregs_from_tst) ( Int pid, arch_thread_t* arch ); |
|
From: Tom H. <th...@cy...> - 2004-09-13 10:20:45
|
CVS commit by thughes:
When augmenting the argument vector from the VALGRIND_OPTS environment
variable and/or the .valgrindrc files, make sure that enough space is
allocated for all the old arguments, not just those that are arguments
to valgrind itself.
CCMAIL: 886...@bu...
M +5 -3 vg_main.c 1.212
--- valgrind/coregrind/vg_main.c #1.211:1.212
@@ -552,5 +552,7 @@ static void augment_command_line(Int* vg
char **from;
char **to;
- int env_arg_count, f1_arg_count, f2_arg_count;
+ int orig_arg_count, env_arg_count, f1_arg_count, f2_arg_count;
+
+ for ( orig_arg_count = 0; vg_argv0[orig_arg_count]; orig_arg_count++ );
env_arg_count = count_args(env_clo);
@@ -564,5 +566,5 @@ static void augment_command_line(Int* vg
/* +2: +1 for null-termination, +1 for added '--' */
from = vg_argv0;
- vg_argv0 = malloc( (vg_argc0 + env_arg_count + f1_arg_count
+ vg_argv0 = malloc( (orig_arg_count + env_arg_count + f1_arg_count
+ f2_arg_count + 2) * sizeof(char **));
vg_assert(vg_argv0);
|