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
(4) |
2
(17) |
3
(9) |
4
(14) |
5
(10) |
6
(11) |
7
(8) |
|
8
(9) |
9
(11) |
10
(29) |
11
(27) |
12
(29) |
13
(36) |
14
(8) |
|
15
(18) |
16
(30) |
17
(25) |
18
(6) |
19
(16) |
20
(13) |
21
(10) |
|
22
(16) |
23
(7) |
24
(8) |
25
(13) |
26
(14) |
27
(14) |
28
(5) |
|
29
(6) |
30
(21) |
31
(14) |
|
|
|
|
|
From: <sv...@va...> - 2009-03-13 23:04:50
|
Author: sewardj
Date: 2009-03-13 23:04:19 +0000 (Fri, 13 Mar 2009)
New Revision: 9406
Log:
Restore VG_(system) to its original form, more or less, so that
VG_(system) works again on Darwin.
Modified:
branches/DARWIN/coregrind/m_libcproc.c
Modified: branches/DARWIN/coregrind/m_libcproc.c
===================================================================
--- branches/DARWIN/coregrind/m_libcproc.c 2009-03-13 22:42:46 UTC (rev 9405)
+++ branches/DARWIN/coregrind/m_libcproc.c 2009-03-13 23:04:19 UTC (rev 9406)
@@ -329,12 +329,6 @@
VG_(exit)(1);
} else {
/* parent */
-#if defined(VGO_darwin)
- Int zzz;
- I_die_here;
- /* GrP fixme signals */
- zzz = VG_(waitpid)(pid, NULL, 0);
-#else
/* We have to set SIGCHLD to its default behaviour in order that
VG_(waitpid) works (at least on AIX). According to the Linux
man page for waitpid:
@@ -348,8 +342,9 @@
behaviour of setting SIGCHLD to SIG_IGN unspecified.)
*/
Int ir, zzz;
- struct vki_sigaction sa, saved_sa;
- VG_(memset)( &sa, 0, sizeof(struct vki_sigaction) );
+ vki_sigaction_toK_t sa, sa2;
+ vki_sigaction_fromK_t saved_sa;
+ VG_(memset)( &sa, 0, sizeof(sa) );
VG_(sigemptyset)(&sa.sa_mask);
sa.ksa_handler = VKI_SIG_DFL;
sa.sa_flags = 0;
@@ -358,9 +353,9 @@
zzz = VG_(waitpid)(pid, NULL, 0);
- ir = VG_(sigaction)(VKI_SIGCHLD, &saved_sa, NULL);
+ VG_(convert_sigaction_fromK_to_toK)( &saved_sa, &sa2 );
+ ir = VG_(sigaction)(VKI_SIGCHLD, &sa2, NULL);
vg_assert(ir == 0);
-#endif
return zzz == -1 ? -1 : 0;
}
}
|
|
From: <sv...@va...> - 2009-03-13 22:42:58
|
Author: njn Date: 2009-03-13 22:42:46 +0000 (Fri, 13 Mar 2009) New Revision: 9405 Log: Mention Greg. Modified: branches/DARWIN/NEWS Modified: branches/DARWIN/NEWS =================================================================== --- branches/DARWIN/NEWS 2009-03-13 22:24:57 UTC (rev 9404) +++ branches/DARWIN/NEWS 2009-03-13 22:42:46 UTC (rev 9405) @@ -2,7 +2,8 @@ Release 3.5.0 (???) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * XXX: x86/Darwin (aka. Mac OS X support)... Possibly also amd64/Darwin - support... + support... Many thanks to Greg Parker for developing this port over + several years. * A new Memcheck client request VALGRIND_COUNT_LEAK_BLOCKS has been added. It is similar to VALGRIND_COUNT_LEAKS but counts blocks instead of bytes. |
|
From: <sv...@va...> - 2009-03-13 22:25:11
|
Author: njn
Date: 2009-03-13 22:24:57 +0000 (Fri, 13 Mar 2009)
New Revision: 9404
Log:
Merge r9388..r9400 (DRD tweaks) from the trunk.
Added:
branches/DARWIN/drd/tests/pth_process_shared_mutex.c
branches/DARWIN/drd/tests/pth_process_shared_mutex.stderr.exp
branches/DARWIN/drd/tests/pth_process_shared_mutex.vgtest
Modified:
branches/DARWIN/drd/drd_pthread_intercepts.c
branches/DARWIN/drd/tests/Makefile.am
branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5
branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc
branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8
branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3
branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b
branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5
branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc
branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8
Modified: branches/DARWIN/drd/drd_pthread_intercepts.c
===================================================================
--- branches/DARWIN/drd/drd_pthread_intercepts.c 2009-03-13 20:08:03 UTC (rev 9403)
+++ branches/DARWIN/drd/drd_pthread_intercepts.c 2009-03-13 22:24:57 UTC (rev 9404)
@@ -156,15 +156,18 @@
* which the mutex type is stored.
* @note The function mutex_type() has been declared inline in order
* to avoid that it shows up in call stacks (drd/tests/...exp* files).
+ * @note glibc stores the mutex type in the lowest two bits, and uses the
+ * higher bits for flags like PTHREAD_MUTEXATTR_FLAG_ROBUST and
+ * PTHREAD_MUTEXATTR_FLAG_PSHARED.
*/
static __inline__ MutexT DRD_(mutex_type)(pthread_mutex_t* mutex)
{
#if defined(HAVE_PTHREAD_MUTEX_T__M_KIND)
/* glibc + LinuxThreads. */
- const int kind = mutex->__m_kind;
+ const int kind = mutex->__m_kind & 3;
#elif defined(HAVE_PTHREAD_MUTEX_T__DATA__KIND)
/* glibc + NPTL. */
- const int kind = mutex->__data.__kind;
+ const int kind = mutex->__data.__kind & 3;
#else
/* Another POSIX threads implementation. Regression tests will fail. */
const int kind = PTHREAD_MUTEX_DEFAULT;
Modified: branches/DARWIN/drd/tests/Makefile.am
===================================================================
--- branches/DARWIN/drd/tests/Makefile.am 2009-03-13 20:08:03 UTC (rev 9403)
+++ branches/DARWIN/drd/tests/Makefile.am 2009-03-13 22:24:57 UTC (rev 9404)
@@ -109,6 +109,8 @@
pth_inconsistent_cond_wait.stderr.exp1 \
pth_inconsistent_cond_wait.stderr.exp2 \
pth_inconsistent_cond_wait.vgtest \
+ pth_process_shared_mutex.vgtest \
+ pth_process_shared_mutex.c \
pth_spinlock.stderr.exp \
pth_spinlock.vgtest \
qt4_mutex.stderr.exp \
@@ -210,6 +212,7 @@
pth_create_chain \
pth_detached \
pth_detached_sem \
+ pth_process_shared_mutex \
pth_inconsistent_cond_wait \
recursive_mutex \
rwlock_race \
Copied: branches/DARWIN/drd/tests/pth_process_shared_mutex.c (from rev 9400, trunk/drd/tests/pth_process_shared_mutex.c)
===================================================================
--- branches/DARWIN/drd/tests/pth_process_shared_mutex.c (rev 0)
+++ branches/DARWIN/drd/tests/pth_process_shared_mutex.c 2009-03-13 22:24:57 UTC (rev 9404)
@@ -0,0 +1,30 @@
+/*
+ * Test program that locks and unlocks a process-shared mutex.
+ * See also https://bugs.kde.org/show_bug.cgi?id=187048.
+ */
+
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <pthread.h>
+
+
+int main()
+{
+ pthread_mutex_t mutex;
+ pthread_mutexattr_t attr;
+
+ pthread_mutexattr_init(&attr);
+ pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+ pthread_mutex_init(&mutex, &attr);
+ pthread_mutexattr_destroy(&attr);
+
+ pthread_mutex_lock(&mutex);
+ pthread_mutex_unlock(&mutex);
+ pthread_mutex_destroy(&mutex);
+
+ fprintf(stderr, "Finished.\n");
+
+ return 0;
+}
Copied: branches/DARWIN/drd/tests/pth_process_shared_mutex.stderr.exp (from rev 9400, trunk/drd/tests/pth_process_shared_mutex.stderr.exp)
===================================================================
--- branches/DARWIN/drd/tests/pth_process_shared_mutex.stderr.exp (rev 0)
+++ branches/DARWIN/drd/tests/pth_process_shared_mutex.stderr.exp 2009-03-13 22:24:57 UTC (rev 9404)
@@ -0,0 +1,4 @@
+
+Finished.
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Copied: branches/DARWIN/drd/tests/pth_process_shared_mutex.vgtest (from rev 9400, trunk/drd/tests/pth_process_shared_mutex.vgtest)
===================================================================
--- branches/DARWIN/drd/tests/pth_process_shared_mutex.vgtest (rev 0)
+++ branches/DARWIN/drd/tests/pth_process_shared_mutex.vgtest 2009-03-13 22:24:57 UTC (rev 9404)
@@ -0,0 +1,3 @@
+prereq: ./supported_libpthread
+prog: pth_process_shared_mutex
+vgopts: --var-info=yes --check-stack-var=yes
Modified: branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5 2009-03-13 20:08:03 UTC (rev 9403)
+++ branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5 2009-03-13 22:24:57 UTC (rev 9404)
@@ -28,28 +28,7 @@
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
@@ -149,4 +128,4 @@
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:145)
-ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
Modified: branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc 2009-03-13 20:08:03 UTC (rev 9403)
+++ branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc 2009-03-13 22:24:57 UTC (rev 9404)
@@ -28,28 +28,7 @@
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
@@ -149,4 +128,4 @@
at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:216)
-ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
Modified: branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8 2009-03-13 20:08:03 UTC (rev 9403)
+++ branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8 2009-03-13 22:24:57 UTC (rev 9404)
@@ -28,28 +28,7 @@
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
Modified: branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3 2009-03-13 20:08:03 UTC (rev 9403)
+++ branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3 2009-03-13 22:24:57 UTC (rev 9404)
@@ -169,7 +169,7 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:145)
-[1/1] mutex_destroy invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_destroy mutex 0x........ rc 0 owner 0
[1/1] mutex_trylock recursive mutex 0x........ rc 0 owner 0
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 0
[1/1] mutex_unlock recursive mutex 0x........ rc 1
Modified: branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b 2009-03-13 20:08:03 UTC (rev 9403)
+++ branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b 2009-03-13 22:24:57 UTC (rev 9404)
@@ -169,7 +169,7 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:145)
-[1/1] mutex_destroy invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_destroy mutex 0x........ rc 0 owner 0
[1/1] mutex_trylock recursive mutex 0x........ rc 0 owner 0
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 0
[1/1] mutex_unlock recursive mutex 0x........ rc 1
Modified: branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5 2009-03-13 20:08:03 UTC (rev 9403)
+++ branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5 2009-03-13 22:24:57 UTC (rev 9404)
@@ -32,36 +32,15 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] pre_mutex_lock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_unlock mutex 0x........ rc 0
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_unlock invalid mutex 0x........ rc 0
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
@@ -178,7 +157,7 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:145)
-[1/1] mutex_destroy invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_destroy mutex 0x........ rc 0 owner 0
[1/1] mutex_trylock recursive mutex 0x........ rc 0 owner 0
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 0
[1/1] mutex_unlock recursive mutex 0x........ rc 1
@@ -228,4 +207,4 @@
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 1
[1/1] mutex_unlock recursive mutex 0x........ rc 1
-ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
Modified: branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc 2009-03-13 20:08:03 UTC (rev 9403)
+++ branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc 2009-03-13 22:24:57 UTC (rev 9404)
@@ -32,36 +32,15 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] pre_mutex_lock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_unlock mutex 0x........ rc 0
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_unlock invalid mutex 0x........ rc 0
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
@@ -228,4 +207,4 @@
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 1
[1/1] mutex_unlock recursive mutex 0x........ rc 1
-ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
Modified: branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8 2009-03-13 20:08:03 UTC (rev 9403)
+++ branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8 2009-03-13 22:24:57 UTC (rev 9404)
@@ -32,36 +32,15 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] pre_mutex_lock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_unlock mutex 0x........ rc 0
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_unlock invalid mutex 0x........ rc 0
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
|
|
From: Nuno L. <nun...@is...> - 2009-03-13 21:27:16
|
>>> On Friday 13 March 2009, Nicholas Nethercote wrote: >>>> There are two non-VEX complaints left. The first is a false positive >>>> because it can't tell that c->barf() in readdwarf3.c is a "noreturn" >>>> function, even though it's annotated as such. Must be because it's in >>>> a struct. >>> >>> Looks like a bug in the checker. A few days ago I put a bug report in >>> there >>> Bugzilla, and they were _very_ responsive: the bug was fixed in less >>> than >>> a day in SVN. >> >> This bug is well known. e.g.: http://llvm.org/bugs/show_bug.cgi?id=2461 >> It was not fixed yet because it requires some complex infrastructure :) > >Amusingly enough, the example in the original bug report is LibVEX_Init(). eh :) That's because me and a friend were developing a static analyzer on top of clang some time ago. And we actually tried running it on valgrind, but by the time there were many bugs in clang and we couldn't analyze valgrind. In the process we filled in a lot of bug reports and we fixed a few of them as well. So that's the story :) Valgrind is still one of the difficult targets for clang, and I use its code frequently to seek for regressions in clang :P Nuno |
|
From: Nicholas N. <n.n...@gm...> - 2009-03-13 20:44:06
|
On Sat, Mar 14, 2009 at 7:10 AM, Nicholas Nethercote <n.n...@gm...> wrote: > On Sat, Mar 14, 2009 at 1:40 AM, <sv...@va...> wrote: >> >> - If a thread is waiting in a syscall, and is interrupted by a >> signal, its state is not restored properly. (at all?) >> >> - Guest syscalls are run without setting the correct signal mask. >> (this point and previous requires on fixing syscall-x86-darwin.S) >> >> - the signal delivery frames are completely different from the >> real kernel ones. Consequently any client code that relies >> on the precise layout of these frames will fail (stack >> unwinders). >> >> - siginfo and ucontext parameters (2nd and 3rd params to signal >> handlers) are not implemented; NULL is passed for both. >> Handlers which inspect these will segfault. > > Is it worth documenting these points in a comment somewhere? ps: this is a great commit, I get 40 fewer test failures now (266 -> 226). N |
|
From: Nicholas N. <n.n...@gm...> - 2009-03-13 20:13:14
|
On Sat, Mar 14, 2009 at 5:19 AM, <sv...@va...> wrote: > Author: bart > Date: 2009-03-13 18:19:05 +0000 (Fri, 13 Mar 2009) > New Revision: 9400 > > Log: > Updated tc20_verifywrap expected output files. > > Modified: > trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5 > trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc > trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8 > trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3 > trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b > trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5 > trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc > trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8 That's a lot of .exp* files! Is there any way to do more aggressive filtering to reduce these to fewer or a single .exp file? Nick |
|
From: Nicholas N. <n.n...@gm...> - 2009-03-13 20:10:18
|
On Sat, Mar 14, 2009 at 1:40 AM, <sv...@va...> wrote: > > - If a thread is waiting in a syscall, and is interrupted by a > signal, its state is not restored properly. (at all?) > > - Guest syscalls are run without setting the correct signal mask. > (this point and previous requires on fixing syscall-x86-darwin.S) > > - the signal delivery frames are completely different from the > real kernel ones. Consequently any client code that relies > on the precise layout of these frames will fail (stack > unwinders). > > - siginfo and ucontext parameters (2nd and 3rd params to signal > handlers) are not implemented; NULL is passed for both. > Handlers which inspect these will segfault. Is it worth documenting these points in a comment somewhere? N |
|
From: <sv...@va...> - 2009-03-13 20:08:12
|
Author: njn Date: 2009-03-13 20:08:03 +0000 (Fri, 13 Mar 2009) New Revision: 9403 Log: Remove an unused, empty .exp file that was somehow still hanging around. Removed: trunk/massif/tests/long-names.post.exp2 Deleted: trunk/massif/tests/long-names.post.exp2 =================================================================== |
|
From: Nicholas N. <n.n...@gm...> - 2009-03-13 20:06:25
|
On Fri, Mar 13, 2009 at 9:56 PM, Nuno Lopes <nun...@is...> wrote: >> On Friday 13 March 2009, Nicholas Nethercote wrote: >>> There are two non-VEX complaints left. The first is a false positive >>> because it can't tell that c->barf() in readdwarf3.c is a "noreturn" >>> function, even though it's annotated as such. Must be because it's in >>> a struct. >> >> Looks like a bug in the checker. A few days ago I put a bug report in there >> Bugzilla, and they were _very_ responsive: the bug was fixed in less than >> a day in SVN. > > This bug is well known. e.g.: http://llvm.org/bugs/show_bug.cgi?id=2461 > It was not fixed yet because it requires some complex infrastructure :) Amusingly enough, the example in the original bug report is LibVEX_Init(). N |
|
From: <sv...@va...> - 2009-03-13 19:59:11
|
Author: njn Date: 2009-03-13 19:59:01 +0000 (Fri, 13 Mar 2009) New Revision: 9402 Log: Merge 3.4.1 release notes from the VALGRIND_3_4_BRANCH. Modified: branches/DARWIN/NEWS Modified: branches/DARWIN/NEWS =================================================================== --- branches/DARWIN/NEWS 2009-03-13 19:55:36 UTC (rev 9401) +++ branches/DARWIN/NEWS 2009-03-13 19:59:01 UTC (rev 9402) @@ -1,6 +1,9 @@ Release 3.5.0 (???) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* XXX: x86/Darwin (aka. Mac OS X support)... Possibly also amd64/Darwin + support... + * A new Memcheck client request VALGRIND_COUNT_LEAK_BLOCKS has been added. It is similar to VALGRIND_COUNT_LEAKS but counts blocks instead of bytes. [XXX: consider adding VALGRIND_COUNT_LEAK_BYTES as a synonym and @@ -34,6 +37,48 @@ +Release 3.4.1 (28 February 2009) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +3.4.1 is a bug-fix release that fixes some regressions and assertion +failures in debug info reading in 3.4.0, most notably incorrect stack +traces on amd64-linux on older (glibc-2.3 based) systems. Various +other debug info problems are also fixed. A number of bugs in the +exp-ptrcheck tool introduced in 3.4.0 have been fixed. + +In view of the fact that 3.4.0 contains user-visible regressions +relative to 3.3.x, upgrading to 3.4.1 is recommended. Packagers are +encouraged to ship 3.4.1 in preference to 3.4.0. + +The fixed bugs are as follows. Note that "n-i-bz" stands for "not in +bugzilla" -- that is, a bug that was reported to us but never got a +bugzilla entry. We encourage you to file bugs in bugzilla +(http://bugs.kde.org/enter_valgrind_bug.cgi) rather than mailing the +developers (or mailing lists) directly -- bugs that are not entered +into bugzilla tend to get forgotten about or ignored. + +n-i-bz Fix various bugs reading icc-11 generated debug info +n-i-bz Fix various bugs reading gcc-4.4 generated debug info +n-i-bz Preliminary support for glibc-2.10 / Fedora 11 +n-i-bz Cachegrind and Callgrind: handle non-power-of-two cache sizes, + so as to support (eg) 24k Atom D1 and Core2 with 3/6/12MB L2. +179618 exp-ptrcheck crashed / exit prematurely +179624 helgrind: false positive races with pthread_create and + recv/open/close/read +134207 pkg-config output contains @VG_PLATFORM@ +176926 floating point exception at valgrind startup with PPC 440EPX +181594 Bogus warning for empty text segment +173751 amd64->IR: 0x48 0xF 0x6F 0x45 (even more redundant rex prefixes) +181707 Dwarf3 doesn't require enumerations to have name +185038 exp-ptrcheck: "unhandled syscall: 285" (fallocate) on x86_64 +185050 exp-ptrcheck: sg_main.c:727 (add_block_to_GlobalTree): + Assertion '!already_present' failed. +185359 exp-ptrcheck unhandled syscall getresuid() + +(3.4.1.RC1: 24 Feb 2008, vex r1884, valgrind r9253). +(3.4.1: 28 Feb 2008, vex r1884, valgrind r9293). + + + Release 3.4.0 (2 January 2009) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3.4.0 is a feature release with many significant improvements and the |
|
From: <sv...@va...> - 2009-03-13 19:55:54
|
Author: njn Date: 2009-03-13 19:55:36 +0000 (Fri, 13 Mar 2009) New Revision: 9401 Log: Merge 3.4.1 release notes from the VALGRIND_3_4_BRANCH. Modified: trunk/NEWS Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2009-03-13 18:19:05 UTC (rev 9400) +++ trunk/NEWS 2009-03-13 19:55:36 UTC (rev 9401) @@ -34,6 +34,48 @@ +Release 3.4.1 (28 February 2009) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +3.4.1 is a bug-fix release that fixes some regressions and assertion +failures in debug info reading in 3.4.0, most notably incorrect stack +traces on amd64-linux on older (glibc-2.3 based) systems. Various +other debug info problems are also fixed. A number of bugs in the +exp-ptrcheck tool introduced in 3.4.0 have been fixed. + +In view of the fact that 3.4.0 contains user-visible regressions +relative to 3.3.x, upgrading to 3.4.1 is recommended. Packagers are +encouraged to ship 3.4.1 in preference to 3.4.0. + +The fixed bugs are as follows. Note that "n-i-bz" stands for "not in +bugzilla" -- that is, a bug that was reported to us but never got a +bugzilla entry. We encourage you to file bugs in bugzilla +(http://bugs.kde.org/enter_valgrind_bug.cgi) rather than mailing the +developers (or mailing lists) directly -- bugs that are not entered +into bugzilla tend to get forgotten about or ignored. + +n-i-bz Fix various bugs reading icc-11 generated debug info +n-i-bz Fix various bugs reading gcc-4.4 generated debug info +n-i-bz Preliminary support for glibc-2.10 / Fedora 11 +n-i-bz Cachegrind and Callgrind: handle non-power-of-two cache sizes, + so as to support (eg) 24k Atom D1 and Core2 with 3/6/12MB L2. +179618 exp-ptrcheck crashed / exit prematurely +179624 helgrind: false positive races with pthread_create and + recv/open/close/read +134207 pkg-config output contains @VG_PLATFORM@ +176926 floating point exception at valgrind startup with PPC 440EPX +181594 Bogus warning for empty text segment +173751 amd64->IR: 0x48 0xF 0x6F 0x45 (even more redundant rex prefixes) +181707 Dwarf3 doesn't require enumerations to have name +185038 exp-ptrcheck: "unhandled syscall: 285" (fallocate) on x86_64 +185050 exp-ptrcheck: sg_main.c:727 (add_block_to_GlobalTree): + Assertion '!already_present' failed. +185359 exp-ptrcheck unhandled syscall getresuid() + +(3.4.1.RC1: 24 Feb 2008, vex r1884, valgrind r9253). +(3.4.1: 28 Feb 2008, vex r1884, valgrind r9293). + + + Release 3.4.0 (2 January 2009) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3.4.0 is a feature release with many significant improvements and the |
|
From: Greg P. <gp...@ap...> - 2009-03-13 19:13:14
|
On Mar 13, 2009, at 7:30 AM, John Reiser wrote: > My pet compiler enhancement is a diagnostic message: > warning: omitted 'const' in declaration of 'foo' > Unfortunately, the internal representation of types in gcc makes it > difficult to implement such a warning. [I tried several years ago. > Gcc considers the internal representation of a type to be a constant > (may be freely copied, substituted, "impostored", etc.) but detecting > "omitted 'const'" requires that the type for each declared variable > must be a unique object which accumulates state.] Cute. You might try again with clang+llvm; its internal representation of just about everything is much different than gcc's. -- Greg Parker gp...@ap... Runtime Wrangler |
|
From: <sv...@va...> - 2009-03-13 18:19:27
|
Author: bart
Date: 2009-03-13 18:19:05 +0000 (Fri, 13 Mar 2009)
New Revision: 9400
Log:
Updated tc20_verifywrap expected output files.
Modified:
trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5
trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc
trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8
trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3
trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b
trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5
trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc
trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8
Modified: trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5
===================================================================
--- trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5 2009-03-13 17:32:52 UTC (rev 9399)
+++ trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5 2009-03-13 18:19:05 UTC (rev 9400)
@@ -28,28 +28,7 @@
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
@@ -149,4 +128,4 @@
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:145)
-ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc
===================================================================
--- trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc 2009-03-13 17:32:52 UTC (rev 9399)
+++ trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc 2009-03-13 18:19:05 UTC (rev 9400)
@@ -28,28 +28,7 @@
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
@@ -149,4 +128,4 @@
at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:216)
-ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8
===================================================================
--- trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8 2009-03-13 17:32:52 UTC (rev 9399)
+++ trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8 2009-03-13 18:19:05 UTC (rev 9400)
@@ -28,28 +28,7 @@
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
Modified: trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3
===================================================================
--- trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3 2009-03-13 17:32:52 UTC (rev 9399)
+++ trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3 2009-03-13 18:19:05 UTC (rev 9400)
@@ -169,7 +169,7 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:145)
-[1/1] mutex_destroy invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_destroy mutex 0x........ rc 0 owner 0
[1/1] mutex_trylock recursive mutex 0x........ rc 0 owner 0
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 0
[1/1] mutex_unlock recursive mutex 0x........ rc 1
Modified: trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b
===================================================================
--- trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b 2009-03-13 17:32:52 UTC (rev 9399)
+++ trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b 2009-03-13 18:19:05 UTC (rev 9400)
@@ -169,7 +169,7 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:145)
-[1/1] mutex_destroy invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_destroy mutex 0x........ rc 0 owner 0
[1/1] mutex_trylock recursive mutex 0x........ rc 0 owner 0
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 0
[1/1] mutex_unlock recursive mutex 0x........ rc 1
Modified: trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5
===================================================================
--- trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5 2009-03-13 17:32:52 UTC (rev 9399)
+++ trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5 2009-03-13 18:19:05 UTC (rev 9400)
@@ -32,36 +32,15 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] pre_mutex_lock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_unlock mutex 0x........ rc 0
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_unlock invalid mutex 0x........ rc 0
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
@@ -178,7 +157,7 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:145)
-[1/1] mutex_destroy invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_destroy mutex 0x........ rc 0 owner 0
[1/1] mutex_trylock recursive mutex 0x........ rc 0 owner 0
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 0
[1/1] mutex_unlock recursive mutex 0x........ rc 1
@@ -228,4 +207,4 @@
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 1
[1/1] mutex_unlock recursive mutex 0x........ rc 1
-ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc
===================================================================
--- trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc 2009-03-13 17:32:52 UTC (rev 9399)
+++ trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc 2009-03-13 18:19:05 UTC (rev 9400)
@@ -32,36 +32,15 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] pre_mutex_lock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_unlock mutex 0x........ rc 0
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_unlock invalid mutex 0x........ rc 0
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
@@ -228,4 +207,4 @@
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 1
[1/1] mutex_unlock recursive mutex 0x........ rc 1
-ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8
===================================================================
--- trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8 2009-03-13 17:32:52 UTC (rev 9399)
+++ trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8 2009-03-13 18:19:05 UTC (rev 9400)
@@ -32,36 +32,15 @@
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:100)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] pre_mutex_lock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_trylock mutex 0x........ rc 0 owner 0
+[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 (locking failed)
+[1/1] mutex_unlock mutex 0x........ rc 0
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:116)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_trylock invalid mutex 0x........ rc 0 owner 0
-
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:121)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: main (tc20_verifywrap.c:108)
-[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
-[1/1] mutex_unlock invalid mutex 0x........ rc 0
-
-The object at address 0x........ is not a mutex.
+Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
mutex 0x........ was first observed at:
|
|
From: <sv...@va...> - 2009-03-13 17:33:00
|
Author: bart
Date: 2009-03-13 17:32:52 +0000 (Fri, 13 Mar 2009)
New Revision: 9399
Log:
Made DRD_(mutex_type) ignore mutex attribute flags.
Modified:
trunk/drd/drd_pthread_intercepts.c
Modified: trunk/drd/drd_pthread_intercepts.c
===================================================================
--- trunk/drd/drd_pthread_intercepts.c 2009-03-13 17:32:07 UTC (rev 9398)
+++ trunk/drd/drd_pthread_intercepts.c 2009-03-13 17:32:52 UTC (rev 9399)
@@ -156,15 +156,18 @@
* which the mutex type is stored.
* @note The function mutex_type() has been declared inline in order
* to avoid that it shows up in call stacks (drd/tests/...exp* files).
+ * @note glibc stores the mutex type in the lowest two bits, and uses the
+ * higher bits for flags like PTHREAD_MUTEXATTR_FLAG_ROBUST and
+ * PTHREAD_MUTEXATTR_FLAG_PSHARED.
*/
static __inline__ MutexT DRD_(mutex_type)(pthread_mutex_t* mutex)
{
#if defined(HAVE_PTHREAD_MUTEX_T__M_KIND)
/* glibc + LinuxThreads. */
- const int kind = mutex->__m_kind;
+ const int kind = mutex->__m_kind & 3;
#elif defined(HAVE_PTHREAD_MUTEX_T__DATA__KIND)
/* glibc + NPTL. */
- const int kind = mutex->__data.__kind;
+ const int kind = mutex->__data.__kind & 3;
#else
/* Another POSIX threads implementation. Regression tests will fail. */
const int kind = PTHREAD_MUTEX_DEFAULT;
|
|
From: <sv...@va...> - 2009-03-13 17:32:20
|
Author: bart Date: 2009-03-13 17:32:07 +0000 (Fri, 13 Mar 2009) New Revision: 9398 Log: Added pth_process_shared_mutex regression test. Added: trunk/drd/tests/pth_process_shared_mutex.c trunk/drd/tests/pth_process_shared_mutex.stderr.exp trunk/drd/tests/pth_process_shared_mutex.vgtest Modified: trunk/drd/tests/Makefile.am Modified: trunk/drd/tests/Makefile.am =================================================================== --- trunk/drd/tests/Makefile.am 2009-03-13 14:40:43 UTC (rev 9397) +++ trunk/drd/tests/Makefile.am 2009-03-13 17:32:07 UTC (rev 9398) @@ -110,6 +110,8 @@ pth_inconsistent_cond_wait.stderr.exp1 \ pth_inconsistent_cond_wait.stderr.exp2 \ pth_inconsistent_cond_wait.vgtest \ + pth_process_shared_mutex.vgtest \ + pth_process_shared_mutex.c \ pth_spinlock.stderr.exp \ pth_spinlock.vgtest \ qt4_mutex.stderr.exp \ @@ -211,6 +213,7 @@ pth_create_chain \ pth_detached \ pth_detached_sem \ + pth_process_shared_mutex \ pth_inconsistent_cond_wait \ recursive_mutex \ rwlock_race \ Added: trunk/drd/tests/pth_process_shared_mutex.c =================================================================== --- trunk/drd/tests/pth_process_shared_mutex.c (rev 0) +++ trunk/drd/tests/pth_process_shared_mutex.c 2009-03-13 17:32:07 UTC (rev 9398) @@ -0,0 +1,30 @@ +/* + * Test program that locks and unlocks a process-shared mutex. + * See also https://bugs.kde.org/show_bug.cgi?id=187048. + */ + + +#define _GNU_SOURCE + +#include <stdio.h> +#include <pthread.h> + + +int main() +{ + pthread_mutex_t mutex; + pthread_mutexattr_t attr; + + pthread_mutexattr_init(&attr); + pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED); + pthread_mutex_init(&mutex, &attr); + pthread_mutexattr_destroy(&attr); + + pthread_mutex_lock(&mutex); + pthread_mutex_unlock(&mutex); + pthread_mutex_destroy(&mutex); + + fprintf(stderr, "Finished.\n"); + + return 0; +} Added: trunk/drd/tests/pth_process_shared_mutex.stderr.exp =================================================================== --- trunk/drd/tests/pth_process_shared_mutex.stderr.exp (rev 0) +++ trunk/drd/tests/pth_process_shared_mutex.stderr.exp 2009-03-13 17:32:07 UTC (rev 9398) @@ -0,0 +1,4 @@ + +Finished. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/drd/tests/pth_process_shared_mutex.vgtest =================================================================== --- trunk/drd/tests/pth_process_shared_mutex.vgtest (rev 0) +++ trunk/drd/tests/pth_process_shared_mutex.vgtest 2009-03-13 17:32:07 UTC (rev 9398) @@ -0,0 +1,3 @@ +prereq: ./supported_libpthread +prog: pth_process_shared_mutex +vgopts: --var-info=yes --check-stack-var=yes |
|
From: <sv...@va...> - 2009-03-13 14:40:58
|
Author: sewardj
Date: 2009-03-13 14:40:43 +0000 (Fri, 13 Mar 2009)
New Revision: 9397
Log:
Partial implementation of signal handling on Darwin:
- simple signal stuff on Darwin works
- If a thread is waiting in a syscall, and is interrupted by a
signal, its state is not restored properly. (at all?)
- Guest syscalls are run without setting the correct signal mask.
(this point and previous requires on fixing syscall-x86-darwin.S)
- the signal delivery frames are completely different from the
real kernel ones. Consequently any client code that relies
on the precise layout of these frames will fail (stack
unwinders).
- siginfo and ucontext parameters (2nd and 3rd params to signal
handlers) are not implemented; NULL is passed for both.
Handlers which inspect these will segfault.
- it won't compile on Linux now, although that should be easy to
sort out.
- memcheck/tests/ sigaltstack, signal2, sigprocmask work.
Various others too.
- memcheck/tests/ sigkill fails, I think because the various
bogus calls to sigaction are caught by Darwin's libc instead of
out handlers, hence they return with different error codes
(or something like that).
The changes to implement it are as follows, roughly:
* (major) split the type 'struct vki_sigaction' (used to
communicate signal actions to/from the kernel) into two
different types, vki_sigaction_toK_t and vki_sigaction_fromK_t
(and turn them into real types, not structs tags).
This is required because on Darwin these two types really are
different. On Linux and AIX they are the same and can be
typedefd to the same base type.
Propagate this split of types through m_libcsignal, m_signals
and anywhere else it needs to go (pretty much nowhere else
though).
Add a new function in m_vki,
VG_(vki_do_initial_consistency_checks) which is called at
startup, to make sure we have a consistent set of type
definitions for vki_sigset_t and vki_sigaction_{toK,fromK}_t.
Add some magic handling for VG_(sigaction) in m_libcsignal for
Darwin, to take care of the fact that Darwin requires us to
pass a so-called sa_tramp field (a.k.a. demux function)
* m_libsignal: implement a Darwin-specific VG_(sigtimedwait_zero)
based on AIX one with bug fixes. This function is used to poll
periodically for pending signals.
* fill in various Darwin-specific holes in m_signals
* remove Darwin-specific hacks in various places, eg m_translate
* create simple (semi-bogus) signal delivery frames, again based
on the AIX versions. (sigframe-x86-darwin.c). Do signal frame
removal using a fake system call, sys_FAKE_SIGRETURN.
* handle client syscalls properly: sigaction sigprocmask
sigaltstack
* vki-darwin.h: redefine vki_sigset_t using an array of words, so
we can get rid of ugly ifdeffery on the signal set functions in
m_libcsignal.
* tidied up m_signals a bit: broke up some very long lines
* changed (consistently) all places that say "#warning GrP fixme
signals" to "I_die_here" so we have a chance to find them on
demand.
Modified:
branches/DARWIN/coregrind/m_libcassert.c
branches/DARWIN/coregrind/m_libcproc.c
branches/DARWIN/coregrind/m_libcsignal.c
branches/DARWIN/coregrind/m_main.c
branches/DARWIN/coregrind/m_scheduler/scheduler.c
branches/DARWIN/coregrind/m_sigframe/sigframe-ppc32-aix5.c
branches/DARWIN/coregrind/m_sigframe/sigframe-ppc64-aix5.c
branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c
branches/DARWIN/coregrind/m_signals.c
branches/DARWIN/coregrind/m_syswrap/priv_syswrap-darwin.h
branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.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_syswrap/syswrap-x86-darwin.c
branches/DARWIN/coregrind/m_trampoline.S
branches/DARWIN/coregrind/m_translate.c
branches/DARWIN/coregrind/m_vki.c
branches/DARWIN/coregrind/pub_core_libcsignal.h
branches/DARWIN/coregrind/pub_core_machine.h
branches/DARWIN/coregrind/pub_core_signals.h
branches/DARWIN/coregrind/pub_core_trampoline.h
branches/DARWIN/coregrind/pub_core_vki.h
branches/DARWIN/include/vki/vki-darwin.h
branches/DARWIN/include/vki/vki-scnums-darwin.h
branches/DARWIN/memcheck/tests/unit_libcbase.c
Modified: branches/DARWIN/coregrind/m_libcassert.c
===================================================================
--- branches/DARWIN/coregrind/m_libcassert.c 2009-03-13 05:49:36 UTC (rev 9396)
+++ branches/DARWIN/coregrind/m_libcassert.c 2009-03-13 14:40:43 UTC (rev 9397)
@@ -159,15 +159,7 @@
VG_(printf)("If that doesn't help, please report this bug to: %s\n\n",
report);
VG_(printf)("In the bug report, send all the above text, the valgrind\n");
- VG_(printf)("version, and what %s you are using. Thanks.\n\n",
-#if defined(VGO_linux)
- "Linux distro"
-#else
- "OS and OS version"
-#endif
- );
-
- __builtin_trap(); // DDD ???
+ VG_(printf)("version, and what OS and version you are using. Thanks.\n\n" );
VG_(exit)(1);
}
Modified: branches/DARWIN/coregrind/m_libcproc.c
===================================================================
--- branches/DARWIN/coregrind/m_libcproc.c 2009-03-13 05:49:36 UTC (rev 9396)
+++ branches/DARWIN/coregrind/m_libcproc.c 2009-03-13 14:40:43 UTC (rev 9397)
@@ -330,8 +330,9 @@
} else {
/* parent */
#if defined(VGO_darwin)
+ Int zzz;
+ I_die_here;
/* GrP fixme signals */
- Int zzz;
zzz = VG_(waitpid)(pid, NULL, 0);
#else
/* We have to set SIGCHLD to its default behaviour in order that
Modified: branches/DARWIN/coregrind/m_libcsignal.c
===================================================================
--- branches/DARWIN/coregrind/m_libcsignal.c 2009-03-13 05:49:36 UTC (rev 9396)
+++ branches/DARWIN/coregrind/m_libcsignal.c 2009-03-13 14:40:43 UTC (rev 9397)
@@ -41,82 +41,56 @@
success and -1 on error. */
/* I believe the indexing scheme in ->sig[] is also correct for
32- and 64-bit AIX (verified 27 July 06). */
+/* In the sigset routines below, be aware that _VKI_NSIG_BPW can be
+ either 32 or 64, and hence the sig[] words can either be 32- or
+ 64-bits. And which they are it doesn't necessarily follow from the
+ host word size. */
Int VG_(sigfillset)( vki_sigset_t* set )
{
+ Int i;
if (set == NULL)
return -1;
-#if !defined(_VKI_NSIG_WORDS)
- *set = ~(vki_sigset_t)0;
-#else
- {
- Int i;
- for (i = 0; i < _VKI_NSIG_WORDS; i++)
- set->sig[i] = ~(UWord)0x0;
- }
-#endif
+ for (i = 0; i < _VKI_NSIG_WORDS; i++)
+ set->sig[i] = ~0;
return 0;
}
Int VG_(sigemptyset)( vki_sigset_t* set )
{
+ Int i;
if (set == NULL)
return -1;
-#if !defined(_VKI_NSIG_WORDS)
- *set = 0;
-#else
- {
- Int i;
- for (i = 0; i < _VKI_NSIG_WORDS; i++)
- set->sig[i] = 0x0;
- }
-#endif
+ for (i = 0; i < _VKI_NSIG_WORDS; i++)
+ set->sig[i] = 0;
return 0;
}
Bool VG_(isemptysigset)( const vki_sigset_t* set )
{
+ Int i;
vg_assert(set != NULL);
-#if !defined(_VKI_NSIG_WORDS)
- return (*set == 0) ? True : False;
-#else
- {
- Int i;
- for (i = 0; i < _VKI_NSIG_WORDS; i++)
- if (set->sig[i] != 0x0) return False;
- }
-#endif
+ for (i = 0; i < _VKI_NSIG_WORDS; i++)
+ if (set->sig[i] != 0) return False;
return True;
}
Bool VG_(isfullsigset)( const vki_sigset_t* set )
{
+ Int i;
vg_assert(set != NULL);
-#if !defined(_VKI_NSIG_WORDS)
- return (*set == ~(vki_sigset_t)0) ? True : False;
-#else
- {
- Int i;
- for (i = 0; i < _VKI_NSIG_WORDS; i++)
- if (set->sig[i] != ~(UWord)0x0) return False;
- return True;
- }
-#endif
+ for (i = 0; i < _VKI_NSIG_WORDS; i++)
+ if (set->sig[i] != ~0) return False;
+ return True;
}
Bool VG_(iseqsigset)( const vki_sigset_t* set1, const vki_sigset_t* set2 )
{
+ Int i;
vg_assert(set1 != NULL && set2 != NULL);
-#if !defined(_VKI_NSIG_WORDS)
- return (*set1 == *set2) ? True : False;
-#else
- {
- Int i;
- for (i = 0; i < _VKI_NSIG_WORDS; i++)
- if (set1->sig[i] != set2->sig[i]) return False;
- return True;
- }
-#endif
+ for (i = 0; i < _VKI_NSIG_WORDS; i++)
+ if (set1->sig[i] != set2->sig[i]) return False;
+ return True;
}
@@ -127,11 +101,7 @@
if (signum < 1 || signum > _VKI_NSIG)
return -1;
signum--;
-#if !defined(_VKI_NSIG_WORDS)
- *set |= (vki_sigset_t)1 << signum;
-#else
- set->sig[signum / _VKI_NSIG_BPW] |= (1UL << (signum % _VKI_NSIG_BPW));
-#endif
+ set->sig[signum / _VKI_NSIG_BPW] |= (1ULL << (signum % _VKI_NSIG_BPW));
return 0;
}
@@ -142,11 +112,7 @@
if (signum < 1 || signum > _VKI_NSIG)
return -1;
signum--;
-#if !defined(_VKI_NSIG_WORDS)
- *set &= ~((vki_sigset_t)1 << signum);
-#else
- set->sig[signum / _VKI_NSIG_BPW] &= ~(1UL << (signum % _VKI_NSIG_BPW));
-#endif
+ set->sig[signum / _VKI_NSIG_BPW] &= ~(1ULL << (signum % _VKI_NSIG_BPW));
return 0;
}
@@ -157,93 +123,164 @@
if (signum < 1 || signum > _VKI_NSIG)
return 0;
signum--;
-#if !defined(_VKI_NSIG_WORDS)
- return (*set & ((vki_sigset_t)1 << signum)) ? 1 : 0;
-#else
if (1 & ((set->sig[signum / _VKI_NSIG_BPW]) >> (signum % _VKI_NSIG_BPW)))
return 1;
else
return 0;
-#endif
}
/* Add all signals in src to dst. */
void VG_(sigaddset_from_set)( vki_sigset_t* dst, vki_sigset_t* src )
{
+ Int i;
vg_assert(dst != NULL && src != NULL);
-#if !defined(_VKI_NSIG_WORDS)
- *dst |= *src;
-#else
- {
- Int i;
- for (i = 0; i < _VKI_NSIG_WORDS; i++)
- dst->sig[i] |= src->sig[i];
- }
-#endif
+ for (i = 0; i < _VKI_NSIG_WORDS; i++)
+ dst->sig[i] |= src->sig[i];
}
/* Remove all signals in src from dst. */
void VG_(sigdelset_from_set)( vki_sigset_t* dst, vki_sigset_t* src )
{
+ Int i;
vg_assert(dst != NULL && src != NULL);
-#if !defined(_VKI_NSIG_WORDS)
- *dst &= ~*src;
-#else
- {
- Int i;
- for (i = 0; i < _VKI_NSIG_WORDS; i++)
- dst->sig[i] &= ~(src->sig[i]);
- }
-#endif
+ for (i = 0; i < _VKI_NSIG_WORDS; i++)
+ dst->sig[i] &= ~(src->sig[i]);
}
/* dst = dst `intersect` src. */
void VG_(sigintersectset)( vki_sigset_t* dst, vki_sigset_t* src )
{
+ Int i;
vg_assert(dst != NULL && src != NULL);
-#if !defined(_VKI_NSIG_WORDS)
- *dst &= *src;
-#else
- {
- Int i;
- for (i = 0; i < _VKI_NSIG_WORDS; i++)
- dst->sig[i] &= src->sig[i];
- }
-#endif
+ for (i = 0; i < _VKI_NSIG_WORDS; i++)
+ dst->sig[i] &= src->sig[i];
}
+/* dst = ~src */
+void VG_(sigcomplementset)( vki_sigset_t* dst, vki_sigset_t* src )
+{
+ Int i;
+ vg_assert(dst != NULL && src != NULL);
+ for (i = 0; i < _VKI_NSIG_WORDS; i++)
+ dst->sig[i] = ~ src->sig[i];
+}
+
+
/* The functions sigaction, sigprocmask, sigpending and sigsuspend
return 0 on success and -1 on error.
*/
Int VG_(sigprocmask)( Int how, const vki_sigset_t* set, vki_sigset_t* oldset)
{
-#if defined(__NR_rt_sigprocmask)
+# if defined(__NR_rt_sigprocmask)
SysRes res = VG_(do_syscall4)(__NR_rt_sigprocmask,
how, (UWord)set, (UWord)oldset,
_VKI_NSIG_WORDS * sizeof(UWord));
-#else
+# else
SysRes res = VG_(do_syscall3)(__NR_sigprocmask,
how, (UWord)set, (UWord)oldset);
-#endif
+# endif
return res.isError ? -1 : 0;
}
-Int VG_(sigaction) ( Int signum, const struct vki_sigaction* act,
- struct vki_sigaction* oldact)
+#if defined(VGO_darwin)
+/* A helper function for sigaction on Darwin. */
+static
+void darwin_signal_demux(void* a1, UWord a2, UWord a3, void* a4, void* a5) {
+ VG_(debugLog)(2, "libcsignal",
+ "PRE demux sig, a2 = %lu, signo = %lu\n", a2, a3);
+ if (a2 == 1)
+ ((void(*)(int))a1) (a3);
+ else
+ ((void(*)(int,void*,void*))a1) (a3,a4,a5);
+ VG_(debugLog)(2, "libcsignal",
+ "POST demux sig, a2 = %lu, signo = %lu\n", a2, a3);
+ VG_(do_syscall2)(__NR_sigreturn, (UWord)a5, 0x1E);
+ /* NOTREACHED */
+ __asm__ __volatile__("ud2");
+}
+#endif
+
+Int VG_(sigaction) ( Int signum,
+ const vki_sigaction_toK_t* act,
+ vki_sigaction_fromK_t* oldact)
{
-#if defined(__NR_rt_sigaction)
+# if defined(VGO_darwin)
+ /* If we're passing a new action to the kernel, make a copy of the
+ new action, install our own sa_tramp field in it, and ignore
+ whatever we were provided with. This is OK because all the
+ sigaction requests come from m_signals, and are not directly
+ what the client program requested, so there is no chance that we
+ will inadvertantly ignore the sa_tramp field requested by the
+ client. (In fact m_signals does ignore it when building signal
+ frames for the client, but that's a completely different
+ matter).
+
+ If we're receiving an old action from the kernel, be very
+ paranoid and make sure the kernel doesn't trash bits of memory
+ that we don't expect it to. */
+ SysRes res;
+
+ vki_sigaction_toK_t actCopy;
+ struct {
+ ULong before[2];
+ vki_sigaction_fromK_t oa;
+ ULong after[2];
+ }
+ oldactCopy;
+
+ vki_sigaction_toK_t* real_act;
+ vki_sigaction_fromK_t* real_oldact;
+
+ real_act = act ? &actCopy : NULL;
+ real_oldact = oldact ? &oldactCopy.oa : NULL;
+ VG_(memset)(&oldactCopy, 0x55, sizeof(oldactCopy));
+ if (real_act) {
+ *real_act = *act;
+ real_act->sa_tramp = (void*)&darwin_signal_demux;
+ }
+ res = VG_(do_syscall3)(__NR_sigaction,
+ signum, (UWord)real_act, (UWord)real_oldact);
+ if (real_oldact) {
+ vg_assert(oldactCopy.before[0] == 0x5555555555555555ULL);
+ vg_assert(oldactCopy.before[1] == 0x5555555555555555ULL);
+ vg_assert(oldactCopy.after[0] == 0x5555555555555555ULL);
+ vg_assert(oldactCopy.after[1] == 0x5555555555555555ULL);
+ *oldact = *real_oldact;
+ }
+ return res.isError ? -1 : 0;
+
+# elif defined(VGO_linux) || defined(VGO_aix5)
+ /* Normal case: vki_sigaction_toK_t and vki_sigaction_fromK_t are
+ identical types. */
SysRes res = VG_(do_syscall4)(__NR_rt_sigaction,
signum, (UWord)act, (UWord)oldact,
_VKI_NSIG_WORDS * sizeof(UWord));
-#else
- SysRes res = VG_(do_syscall3)(__NR_sigaction,
- signum, (UWord)act, (UWord)oldact);
-#endif
return res.isError ? -1 : 0;
+# else
+# error "Unsupported OS"
+# endif
}
+/* See explanation in pub_core_libcsignal.h. */
+void
+VG_(convert_sigaction_fromK_to_toK)( vki_sigaction_fromK_t* fromK,
+ /*OUT*/vki_sigaction_toK_t* toK )
+{
+# if defined(VGO_linux) || defined(VGO_aix5)
+ *toK = *fromK;
+# elif defined(VGO_darwin)
+ toK->ksa_handler = fromK->ksa_handler;
+ toK->sa_tramp = NULL; /* the cause of all the difficulty */
+ toK->sa_mask = fromK->sa_mask;
+ toK->sa_flags = fromK->sa_flags;
+# else
+# error "Unsupported OS"
+# endif
+}
+
+
Int VG_(kill)( Int pid, Int signo )
{
SysRes res = VG_(do_syscall2)(__NR_kill, pid, signo);
@@ -271,6 +308,7 @@
#endif
}
+/* ---------------------- sigtimedwait_zero ----------------------- */
/* A cut-down version of POSIX sigtimedwait: poll for pending signals
mentioned in the sigset_t, and if any are present, select one
@@ -288,6 +326,8 @@
obscure ways. I suspect it's only thread-safe because V forces
single-threadedness. */
+/* ---------- sigtimedwait_zero: Linux ----------- */
+
#if defined(VGO_linux)
Int VG_(sigtimedwait_zero)( const vki_sigset_t *set,
vki_siginfo_t *info )
@@ -298,6 +338,8 @@
return res.isError ? -1 : res.res;
}
+/* ---------- sigtimedwait_zero: AIX5 ----------- */
+
#elif defined(VGO_aix5)
/* The general idea is:
- use sigpending to find out which signals are pending
@@ -342,7 +384,7 @@
vg_assert(ir == 0);
/* pending = pending `intersect` blocked */
- VG_(sigintersectset)(&pending, set);
+ VG_(sigintersectset)(&pending, blocked);
/* decide which signal we're going to snarf */
for (i = 1; i < _VKI_NSIG; i++)
@@ -387,12 +429,108 @@
return i;
}
+/* ---------- sigtimedwait_zero: Darwin ----------- */
+
#elif defined(VGO_darwin)
-// GrP fixme
+
+//static void show_set ( HChar* str, const vki_sigset_t* set ) {
+// Int i;
+// VG_(printf)("%s { ", str);
+// for (i = 1; i <= _VKI_NSIG; i++) {
+// if (VG_(sigismember)(set, i))
+// VG_(printf)("%u ", i);
+// }
+// VG_(printf)("}\n");
+//}
+
+static void sigtimedwait_zero_handler ( Int sig )
+{
+ /* XXX this is wrong -- get rid of these. We could
+ get _any_ signal here */
+ vg_assert(sig != VKI_SIGILL);
+ vg_assert(sig != VKI_SIGSEGV);
+ vg_assert(sig != VKI_SIGBUS);
+ vg_assert(sig != VKI_SIGTRAP);
+ /* do nothing */
+}
+
Int VG_(sigtimedwait_zero)( const vki_sigset_t *set,
vki_siginfo_t *info )
{
- __builtin_trap();
+ const Bool debug = False;
+ Int i, ir;
+ SysRes sr;
+ vki_sigset_t pending, blocked, allbutone;
+ vki_sigaction_toK_t sa, saved_sa2;
+ vki_sigaction_fromK_t saved_sa;
+
+ //show_set("STWZ: looking for", set);
+
+ /* Find out what's pending: Darwin sigpending */
+ sr = VG_(do_syscall1)(__NR_sigpending, (UWord)&pending);
+ vg_assert(!sr.isError);
+
+ /* don't try for signals not in 'set' */
+ /* pending = pending `intersect` set */
+ VG_(sigintersectset)(&pending, (vki_sigset_t*)set);
+
+ /* don't try for signals not blocked at the moment */
+ ir = VG_(sigprocmask)(VKI_SIG_SETMASK, NULL, &blocked);
+ vg_assert(ir == 0);
+
+ /* pending = pending `intersect` blocked */
+ VG_(sigintersectset)(&pending, &blocked);
+
+ /* decide which signal we're going to snarf */
+ for (i = 1; i < _VKI_NSIG; i++)
+ if (VG_(sigismember)(&pending,i))
+ break;
+
+ if (i == _VKI_NSIG)
+ return 0;
+
+ if (debug)
+ VG_(debugLog)(0, "libcsignal",
+ "sigtimedwait_zero: snarfing signal %d\n", i );
+
+ /* fetch signal i.
+ pre: i is blocked and pending
+ pre: we are the only thread running
+ */
+ /* Set up alternative signal handler */
+ VG_(sigfillset)(&sa.sa_mask);
+ sa.ksa_handler = &sigtimedwait_zero_handler;
+ sa.sa_flags = 0;
+ ir = VG_(sigaction)(i, &sa, &saved_sa);
+ vg_assert(ir == 0);
+
+ /* Switch signal masks and wait for the signal. This should happen
+ immediately, since we've already established it is pending and
+ blocked. */
+ VG_(sigfillset)(&allbutone);
+ VG_(sigdelset)(&allbutone, i);
+ /* Note: pass the sig mask by value here, not reference (!) */
+ vg_assert(_VKI_NSIG_WORDS == 1);
+ sr = VG_(do_syscall3)(__NR_sigsuspend_nocancel,
+ (UWord)allbutone.sig[0], 0,0);
+ if (debug)
+ VG_(debugLog)(0, "libcsignal",
+ "sigtimedwait_zero: sigsuspend got "
+ "res %ld %ld err %ld\n",
+ sr.res, sr.res2, sr.err);
+ vg_assert(sr.isError);
+ vg_assert(sr.err == VKI_EINTR);
+
+ /* Restore signal's handler to whatever it was before */
+ VG_(convert_sigaction_fromK_to_toK)( &saved_sa, &saved_sa2 );
+ ir = VG_(sigaction)(i, &saved_sa2, NULL);
+ vg_assert(ir == 0);
+
+ /* This is bogus - we could get more info from the sighandler. */
+ VG_(memset)( info, 0, sizeof(*info) );
+ info->si_signo = i;
+
+ return i;
}
#else
Modified: branches/DARWIN/coregrind/m_main.c
===================================================================
--- branches/DARWIN/coregrind/m_main.c 2009-03-13 05:49:36 UTC (rev 9396)
+++ branches/DARWIN/coregrind/m_main.c 2009-03-13 14:40:43 UTC (rev 9397)
@@ -1734,7 +1734,7 @@
# elif defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
iters = 4;
# elif defined(VGO_darwin)
- iters = 5;
+ iters = 3;
# else
# error "Unknown plat"
# endif
@@ -2024,11 +2024,10 @@
//--------------------------------------------------------------
// Nb: temporarily parks the saved blocking-mask in saved_sigmask.
VG_(debugLog)(1, "main", "Initialise signal management\n");
-#if defined(VGO_darwin)
- // DDD: #warning GrP fixme signals
-#else
+ /* Check that the kernel-interface signal definitions look sane */
+ VG_(vki_do_initial_consistency_checks)();
+ /* .. and go on to use them. */
VG_(sigstartup_actions)();
-#endif
//--------------------------------------------------------------
// Listen for remote debugger
@@ -2260,12 +2259,7 @@
case VgSrc_FatalSig:
/* We were killed by a fatal signal, so replicate the effect */
vg_assert(VG_(threads)[tid].os_state.fatalsig != 0);
-#if defined(VGO_darwin)
- // DDD: #warning GrP fixme signals
-#else
VG_(kill_self)(VG_(threads)[tid].os_state.fatalsig);
-#endif
-
VG_(core_panic)("main(): signal was supposed to be fatal");
break;
Modified: branches/DARWIN/coregrind/m_scheduler/scheduler.c
===================================================================
--- branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-03-13 05:49:36 UTC (rev 9396)
+++ branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-03-13 14:40:43 UTC (rev 9397)
@@ -411,6 +411,8 @@
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;
@@ -429,14 +431,7 @@
VG_(threads)[tid].altstack.ss_size = 0;
VG_(threads)[tid].altstack.ss_flags = VKI_SS_DISABLE;
-#if defined(VGO_darwin)
- // DDD: #warning GrP fixme signals
-#else
- {
- vki_sigset_t savedmask;
- VG_(clear_out_queued_signals)(tid, &savedmask);
- }
-#endif
+ VG_(clear_out_queued_signals)(tid, &savedmask);
VG_(threads)[tid].sched_jmpbuf_valid = False;
}
@@ -879,6 +874,7 @@
if (jumped) {
block_signals();
#if defined(VGO_darwin)
+ I_die_here;
// DDD: #warning GrP fixme signals
#else
VG_(poll_signals)(tid);
@@ -999,11 +995,7 @@
/* Look for any pending signals for this thread, and set them up
for delivery */
-#if defined(VGO_darwin)
- // DDD: #warning GrP fixme signals
-#else
VG_(poll_signals)(tid);
-#endif
if (VG_(is_exiting)(tid))
break; /* poll_signals picked up a fatal signal */
@@ -1104,6 +1096,7 @@
#if defined(VGO_darwin)
// DDD: #warning GrP fixme synth signals
VG_(core_panic)("mapfail - no synth signals on darwin");
+ I_die_here;
#else
VG_(synth_fault)(tid);
#endif
@@ -1159,6 +1152,7 @@
#if defined(VGO_darwin)
// GrP fixme signals
// GrP remote debugger hack - gdb sets breakpoint (int3) in dyld code
+ I_die_here;
VG_(start_debugger_signal)(tid, 5);// gdb TARGET_SIGNAL_TRAP
#else
VG_(synth_sigtrap)(tid);
@@ -1168,6 +1162,7 @@
case VEX_TRC_JMP_SIGSEGV:
#if defined(VGO_darwin)
// DDD: #warning GrP fixme synth signals
+ I_die_here;
VG_(core_panic)("sigsegv - no synth signals on darwin");
#else
VG_(synth_fault)(tid);
Modified: branches/DARWIN/coregrind/m_sigframe/sigframe-ppc32-aix5.c
===================================================================
--- branches/DARWIN/coregrind/m_sigframe/sigframe-ppc32-aix5.c 2009-03-13 05:49:36 UTC (rev 9396)
+++ branches/DARWIN/coregrind/m_sigframe/sigframe-ppc32-aix5.c 2009-03-13 14:40:43 UTC (rev 9397)
@@ -231,5 +231,5 @@
}
/*--------------------------------------------------------------------*/
-/*--- end sigframe-ppc32-linux.c ---*/
+/*--- end sigframe-ppc32-aix5.c ---*/
/*--------------------------------------------------------------------*/
Modified: branches/DARWIN/coregrind/m_sigframe/sigframe-ppc64-aix5.c
===================================================================
--- branches/DARWIN/coregrind/m_sigframe/sigframe-ppc64-aix5.c 2009-03-13 05:49:36 UTC (rev 9396)
+++ branches/DARWIN/coregrind/m_sigframe/sigframe-ppc64-aix5.c 2009-03-13 14:40:43 UTC (rev 9397)
@@ -265,5 +265,5 @@
}
/*--------------------------------------------------------------------*/
-/*--- end sigframe-ppc64-linux.c ---*/
+/*--- end sigframe-ppc64-aix5.c ---*/
/*--------------------------------------------------------------------*/
Modified: branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c 2009-03-13 05:49:36 UTC (rev 9396)
+++ branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c 2009-03-13 14:40:43 UTC (rev 9397)
@@ -1 +1,219 @@
-// DDD: #warning fixme
+
+/*--------------------------------------------------------------------*/
+/*--- Create/destroy signal delivery frames. ---*/
+/*--- sigframe-x86-darwin.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2009 OpenWorks Ltd
+ in...@op...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#include "pub_core_basics.h"
+#include "pub_core_vki.h"
+#include "pub_core_vkiscnums.h"
+#include "pub_core_threadstate.h"
+#include "pub_core_aspacemgr.h"
+#include "pub_core_libcbase.h"
+#include "pub_core_libcassert.h"
+#include "pub_core_libcprint.h"
+#include "pub_core_machine.h"
+#include "pub_core_options.h"
+#include "pub_core_signals.h"
+#include "pub_core_tooliface.h"
+#include "pub_core_trampoline.h"
+#include "pub_core_sigframe.h" /* self */
+
+
+/* Cheap-ass hack copied from ppc32-aix5 code, just to get started.
+ Produce a frame with layout entirely of our own choosing. */
+
+/* This module creates and removes signal frames for signal deliveries
+ on x86-darwin. Kludgey; the machine state ought to be saved in a
+ ucontext and retrieved from it later, so the handler can modify it
+ and return. However .. for now .. just stick the vex guest state
+ in the frame and snarf it again later.
+
+ Also, don't bother with creating siginfo and ucontext in the
+ handler, although do point them somewhere non-faulting.
+
+ Frame should have a 16-aligned size, just in case that turns out to
+ be important for Darwin. (be conservative)
+*/
+struct hacky_sigframe {
+ /* first four words look like a call to a 3-arg x86 function */
+ UInt returnAddr;
+ UInt a1_signo;
+ UInt a2_siginfo;
+ UInt a3_ucontext;
+ UChar lower_guardzone[512]; // put nothing here
+ VexGuestX86State gst;
+ VexGuestX86State gshadow1;
+ VexGuestX86State gshadow2;
+ UInt magicPI;
+ UInt sigNo_private;
+ vki_sigset_t mask; // saved sigmask; restore when hdlr returns
+ UInt __pad[1];
+ UChar upper_guardzone[512]; // put nothing here
+};
+
+
+/* Extend the stack segment downwards if needed so as to ensure the
+ new signal frames are mapped to something. Return a Bool
+ indicating whether or not the operation was successful.
+*/
+static Bool extend ( ThreadState *tst, Addr addr, SizeT size )
+{
+ ThreadId tid = tst->tid;
+ /* For tracking memory events, indicate the entire frame has been
+ allocated. Except, don't mess with the area which
+ overlaps the previous frame's redzone. */
+ /* XXX is the following call really right? compared with the
+ amd64-linux version, this doesn't appear to handle the redzone
+ in the same way. */
+ VG_TRACK( new_mem_stack_signal,
+ addr, size - VG_STACK_REDZONE_SZB, tid );
+ return True;
+}
+
+
+/* Create a signal frame for thread 'tid'. Make a 3-arg frame
+ regardless of whether the client originally requested a 1-arg
+ version (no SA_SIGINFO) or a 3-arg one (SA_SIGINFO) since in the
+ former case, the x86 calling conventions will simply cause the
+ extra 2 args to be ignored (inside the handler). */
+void VG_(sigframe_create) ( ThreadId tid,
+ Addr sp_top_of_frame,
+ const vki_siginfo_t *siginfo,
+ const struct vki_ucontext *siguc,
+ void *handler,
+ UInt flags,
+ const vki_sigset_t *mask,
+ void *restorer )
+{
+ ThreadState* tst;
+ Addr esp;
+ struct hacky_sigframe* frame;
+ Int sigNo = siginfo->si_signo;
+
+ vg_assert(VG_IS_16_ALIGNED(sizeof(struct hacky_sigframe)));
+
+ sp_top_of_frame &= ~0xf;
+ esp = sp_top_of_frame - sizeof(struct hacky_sigframe);
+
+ tst = VG_(get_ThreadState)(tid);
+ if (!extend(tst, esp, sp_top_of_frame - esp))
+ return;
+
+ vg_assert(VG_IS_16_ALIGNED(esp));
+
+ frame = (struct hacky_sigframe *) esp;
+
+ /* clear it (very conservatively) (why so conservatively??) */
+ VG_(memset)(&frame->lower_guardzone, 0, 512);
+ VG_(memset)(&frame->gst, 0, sizeof(VexGuestX86State));
+ VG_(memset)(&frame->gshadow1, 0, sizeof(VexGuestX86State));
+ VG_(memset)(&frame->gshadow2, 0, sizeof(VexGuestX86State));
+
+ /* save stuff in frame */
+ frame->gst = tst->arch.vex;
+ frame->gshadow1 = tst->arch.vex_shadow1;
+ frame->gshadow2 = tst->arch.vex_shadow2;
+ frame->sigNo_private = sigNo;
+ frame->mask = tst->sig_mask;
+ frame->magicPI = 0x31415927;
+
+ /* Set up stack pointer */
+ vg_assert(esp == (Addr)&frame->returnAddr);
+ VG_(set_SP)(tid, esp);
+ VG_TRACK( post_reg_write, Vg_CoreSignal, tid, VG_O_STACK_PTR, sizeof(UInt));
+
+ /* Set up program counter */
+ VG_(set_IP)(tid, (UInt)handler);
+ VG_TRACK( post_reg_write, Vg_CoreSignal, tid, VG_O_INSTR_PTR, sizeof(UInt));
+
+ /* Set up RA and args for the frame */
+ VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal handler frame",
+ (Addr)frame, 4*sizeof(UInt) );
+ frame->returnAddr = (UInt)&VG_(x86_darwin_SUBST_FOR_sigreturn);
+ frame->a1_signo = sigNo;
+ frame->a2_siginfo = 0; /* oh well */
+ frame->a3_ucontext = 0; /* oh well */
+ VG_TRACK( post_mem_write, Vg_CoreSignal, tid,
+ (Addr)frame, 4*sizeof(UInt) );
+
+ if (VG_(clo_trace_signals))
+ VG_(message)(Vg_DebugMsg,
+ "sigframe_create (thread %d): next EIP=%#lx, next ESP=%#lx",
+ tid, (Addr)handler, (Addr)frame );
+}
+
+
+/* Remove a signal frame from thread 'tid's stack, and restore the CPU
+ state from it. Note, isRT is irrelevant here. */
+void VG_(sigframe_destroy)( ThreadId tid, Bool isRT )
+{
+ ThreadState *tst;
+ Addr esp;
+ Int sigNo;
+ struct hacky_sigframe* frame;
+
+ vg_assert(VG_(is_valid_tid)(tid));
+ tst = VG_(get_ThreadState)(tid);
+
+ /* Check that the stack frame looks valid */
+ esp = VG_(get_SP)(tid);
+
+ /* why -4 ? because the signal handler's return will have popped
+ the return address of the stack; and the return address is the
+ lowest-addressed element of hacky_sigframe. */
+ frame = (struct hacky_sigframe*)(esp - 4);
+ vg_assert(frame->magicPI == 0x31415927);
+ vg_assert(VG_IS_16_ALIGNED(frame));
+
+ /* restore the entire guest state, and shadows, from the
+ frame. Note, as per comments above, this is a kludge - should
+ restore it from saved ucontext. Oh well. */
+ tst->arch.vex = frame->gst;
+ tst->arch.vex_shadow1 = frame->gshadow1;
+ tst->arch.vex_shadow2 = frame->gshadow2;
+ tst->sig_mask = frame->mask;
+ tst->tmp_sig_mask = frame->mask;
+ sigNo = frame->sigNo_private;
+
+ if (VG_(clo_trace_signals))
+ VG_(message)(Vg_DebugMsg,
+ "sigframe_destroy (thread %d): valid magic; next EIP=%#x",
+ tid, tst->arch.vex.guest_EIP);
+
+ VG_TRACK( die_mem_stack_signal,
+ (Addr)frame,
+ sizeof(struct hacky_sigframe) - VG_STACK_REDZONE_SZB );
+
+ /* tell the tools */
+ VG_TRACK( post_deliver_signal, tid, sigNo );
+}
+
+/*--------------------------------------------------------------------*/
+/*--- end sigframe-x86-darwin.c ---*/
+/*--------------------------------------------------------------------*/
Modified: branches/DARWIN/coregrind/m_signals.c
===================================================================
--- branches/DARWIN/coregrind/m_signals.c 2009-03-13 05:49:36 UTC (rev 9396)
+++ branches/DARWIN/coregrind/m_signals.c 2009-03-13 14:40:43 UTC (rev 9397)
@@ -107,25 +107,23 @@
#include "pub_core_tooliface.h"
#include "pub_core_coredump.h"
-/* Maximum usable signal. */
-Int VG_(max_signal) = _VKI_NSIG;
-#if defined(VGO_darwin)
-
-// DDD: #warning GrP fixme signals
-
-#else
-
/* ---------------------------------------------------------------------
Forwards decls.
------------------------------------------------------------------ */
-static void sync_signalhandler ( Int sigNo, vki_siginfo_t *info, struct vki_ucontext * );
-static void async_signalhandler ( Int sigNo, vki_siginfo_t *info, struct vki_ucontext * );
-static void sigvgkill_handler ( Int sigNo, vki_siginfo_t *info, struct vki_ucontext * );
+static void sync_signalhandler ( Int sigNo, vki_siginfo_t *info,
+ struct vki_ucontext * );
+static void async_signalhandler ( Int sigNo, vki_siginfo_t *info,
+ struct vki_ucontext * );
+static void sigvgkill_handler ( Int sigNo, vki_siginfo_t *info,
+ struct vki_ucontext * );
static const Char *signame(Int sigNo);
+/* Maximum usable signal. */
+Int VG_(max_signal) = _VKI_NSIG;
+
#define N_QUEUED_SIGNALS 8
typedef struct SigQueue {
@@ -311,6 +309,36 @@
return VG_UCONTEXT_STACK_PTR(ucV);
}
+#elif defined(VGP_x86_darwin)
+
+ static inline Addr VG_UCONTEXT_INSTR_PTR( void* ucV ) {
+ ucontext_t* uc = (ucontext_t*)ucV;
+ struct __darwin_mcontext32* mc = uc->uc_mcontext;
+ struct __darwin_i386_thread_state* ss = &mc->__ss;
+ return ss->__eip;
+ }
+ static inline Addr VG_UCONTEXT_STACK_PTR( void* ucV ) {
+ ucontext_t* uc = (ucontext_t*)ucV;
+ struct __darwin_mcontext32* mc = uc->uc_mcontext;
+ struct __darwin_i386_thread_state* ss = &mc->__ss;
+ return ss->__esp;
+ }
+ static inline Addr VG_UCONTEXT_SYSCALL_NUM( void* ucV ) {
+ I_die_here;
+ }
+ static inline SysRes VG_UCONTEXT_SYSCALL_SYSRES( void* ucV ) {
+ I_die_here;
+ }
+ static inline Addr VG_UCONTEXT_LINK_REG( void* ucV ) {
+ return 0; /* No, really. We have no LRs today. */
+ }
+ static inline Addr VG_UCONTEXT_FRAME_PTR( void* ucV ) {
+ ucontext_t* uc = (ucontext_t*)ucV;
+ struct __darwin_mcontext32* mc = uc->uc_mcontext;
+ struct __darwin_i386_thread_state* ss = &mc->__ss;
+ return ss->__ebp;
+ }
+
#else
# error Unknown platform
#endif
@@ -326,6 +354,9 @@
#elif defined(VGO_aix5)
# define VKI_SIGINFO_si_addr si_addr
# define VKI_SIGINFO_si_pid si_pid
+#elif defined(VGO_darwin)
+# define VKI_SIGINFO_si_addr si_addr
+# define VKI_SIGINFO_si_pid si_pid
#else
# error Unknown OS
#endif
@@ -363,6 +394,10 @@
UInt scss_flags;
vki_sigset_t scss_mask;
void* scss_restorer; /* where sigreturn goes */
+ void* scss_sa_tramp; /* sa_tramp setting, Darwin only */
+ /* re _restorer and _sa_tramp, we merely record the values
+ supplied when the client does 'sigaction' and give them back
+ when requested. Otherwise they are simply ignored. */
}
SCSS_Per_Signal;
@@ -562,28 +597,28 @@
extern void my_sigreturn(void);
#if defined(VGP_x86_linux)
-# define _MYSIG(name) \
+# define _MY_SIGRETURN(name) \
".text\n" \
"my_sigreturn:\n" \
" movl $" #name ", %eax\n" \
" int $0x80\n" \
".previous\n"
#elif defined(VGP_amd64_linux)
-# define _MYSIG(name) \
+# define _MY_SIGRETURN(name) \
".text\n" \
"my_sigreturn:\n" \
" movq $" #name ", %rax\n" \
" syscall\n" \
".previous\n"
#elif defined(VGP_ppc32_linux)
-# define _MYSIG(name) \
+# define _MY_SIGRETURN(name) \
".text\n" \
"my_sigreturn:\n" \
" li 0, " #name "\n" \
" sc\n" \
".previous\n"
#elif defined(VGP_ppc64_linux)
-# define _MYSIG(name) \
+# define _MY_SIGRETURN(name) \
".align 2\n" \
".globl my_sigreturn\n" \
".section \".opd\",\"aw\"\n" \
@@ -597,22 +632,28 @@
" li 0, " #name "\n" \
" sc\n"
#elif defined(VGP_ppc32_aix5)
-# define _MYSIG(name) \
+# define _MY_SIGRETURN(name) \
".globl my_sigreturn\n" \
"my_sigreturn:\n" \
".long 0\n"
#elif defined(VGP_ppc64_aix5)
-# define _MYSIG(name) \
+# define _MY_SIGRETURN(name) \
".globl my_sigreturn\n" \
"my_sigreturn:\n" \
".long 0\n"
+#elif defined(VGP_x86_darwin)
+# define _MY_SIGRETURN(name) \
+ ".text\n" \
+ "my_sigreturn:\n" \
+ "movl $" VG_STRINGIFY(__NR_DARWIN_FAKE_SIGRETURN) ",%eax\n" \
+ "int $0x80"
#else
# error Unknown platform
#endif
-#define MYSIG(name) _MYSIG(name)
+#define MY_SIGRETURN(name) _MY_SIGRETURN(name)
asm(
- MYSIG(__NR_rt_sigreturn)
+ MY_SIGRETURN(__NR_rt_sigreturn)
);
@@ -620,7 +661,8 @@
{
Int res, sig;
SKSS skss_old;
- struct vki_sigaction ksa, ksa_old;
+ vki_sigaction_toK_t ksa;
+ vki_sigaction_fromK_t ksa_old;
/* Remember old SKSS and calculate new one. */
skss_old = skss;
@@ -647,7 +689,7 @@
ksa.ksa_handler = skss.skss_per_sig[sig].skss_handler;
ksa.sa_flags = skss.skss_per_sig[sig].skss_flags;
# if !defined(VGP_ppc32_linux) && !defined(VGP_ppc32_aix5) \
- && !defined(VGP_ppc64_aix5)
+ && !defined(VGP_ppc64_aix5) && !defined(VGP_x86_darwin)
ksa.sa_restorer = my_sigreturn;
# endif
/* Re above ifdef (also the assertion below), PaulM says:
@@ -664,11 +706,11 @@
if (VG_(clo_trace_signals) && VG_(clo_verbosity) > 2)
VG_(message)(Vg_DebugMsg,
"setting ksig %d to: hdlr %p, flags 0x%lx, "
- "mask(63..0) 0x%lx 0x%lx",
+ "mask(msb..lsb) 0x%llx 0x%llx",
sig, ksa.ksa_handler,
(UWord)ksa.sa_flags,
- (UWord)ksa.sa_mask.sig[1],
- (UWord)ksa.sa_mask.sig[0]
+ _VKI_NSIG_WORDS > 1 ? (ULong)ksa.sa_mask.sig[1] : 0,
+ (ULong)ksa.sa_mask.sig[0]
);
res = VG_(sigaction)( sig, &ksa, &ksa_old );
@@ -682,7 +724,7 @@
vg_assert(ksa_old.sa_flags
== skss_old.skss_per_sig[sig].skss_flags);
# if !defined(VGP_ppc32_linux) && !defined(VGP_ppc32_aix5) \
- && !defined(VGP_ppc64_aix5)
+ && !defined(VGP_ppc64_aix5) && !defined(VGP_x86_darwin)
vg_assert(ksa_old.sa_restorer
== my_sigreturn);
# endif
@@ -706,7 +748,7 @@
{
ThreadState *tst = VG_(get_ThreadState)(tid);
- return (m_SP - (Addr)tst->altstack.ss_sp < tst->altstack.ss_size);
+ return (m_SP - (Addr)tst->altstack.ss_sp < (Addr)tst->altstack.ss_size);
}
static Int sas_ss_flags ( ThreadId tid, Addr m_SP )
@@ -729,13 +771,18 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugExtraMsg,
"sys_sigaltstack: tid %d, "
- "ss %p, oss %p (current SP %p)",
- tid, (void*)ss, (void*)oss, (void*)m_SP );
+ "ss %p{%p,sz=%lu,flags=0x%llx}, oss %p (current SP %p)",
+ tid, (void*)ss,
+ ss ? ss->ss_sp : 0,
+ ss ? ss->ss_size : 0,
+ (ULong)(ss ? ss->ss_flags : 0),
+ (void*)oss, (void*)m_SP );
if (oss != NULL) {
oss->ss_sp = VG_(threads)[tid].altstack.ss_sp;
oss->ss_size = VG_(threads)[tid].altstack.ss_size;
- oss->ss_flags = VG_(threads)[tid].altstack.ss_flags | sas_ss_flags(tid, m_SP);
+ oss->ss_flags = VG_(threads)[tid].altstack.ss_flags
+ | sas_ss_flags(tid, m_SP);
}
if (ss != NULL) {
@@ -764,8 +811,8 @@
SysRes VG_(do_sys_sigaction) ( Int signo,
- const struct vki_sigaction *new_act,
- struct vki_sigaction *old_act )
+ const vki_sigaction_toK_t* new_act,
+ vki_sigaction_fromK_t* old_act )
{
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugExtraMsg,
@@ -800,7 +847,8 @@
old_act->ksa_handler = scss.scss_per_sig[signo].scss_handler;
old_act->sa_flags = scss.scss_per_sig[signo].scss_flags;
old_act->sa_mask = scss.scss_per_sig[signo].scss_mask;
-# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5)
+# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5) \
+ && !defined(VGP_x86_darwin)
old_act->sa_restorer = scss.scss_per_sig[signo].scss_restorer;
# endif
}
@@ -811,11 +859,17 @@
scss.scss_per_sig[signo].scss_flags = new_act->sa_flags;
scss.scss_per_sig[signo].scss_mask = new_act->sa_mask;
- scss.scss_per_sig[signo].scss_restorer = 0;
-# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5)
+ scss.scss_per_sig[signo].scss_restorer = NULL;
+# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5) \
+ && !defined(VGP_x86_darwin)
scss.scss_per_sig[signo].scss_restorer = new_act->sa_restorer;
# endif
+ scss.scss_per_sig[signo].scss_sa_tramp = NULL;
+# if defined(VGP_x86_darwin) || defined(VGP_amd64_darwin)
+ scss.scss_per_sig[signo].scss_sa_tramp = new_act->sa_tramp;
+# endif
+
VG_(sigdelset)(&scss.scss_per_sig[signo].scss_mask, VKI_SIGKILL);
VG_(sigdelset)(&scss.scss_per_sig[signo].scss_mask, VKI_SIGSTOP);
}
@@ -880,9 +934,9 @@
}
static
-const Char *format_sigset ( const vki_sigset_t* set )
+HChar* format_sigset ( const vki_sigset_t* set )
{
- static Char buf[128];
+ static HChar buf[128];
int w;
VG_(strcpy)(buf, "");
@@ -918,12 +972,12 @@
{
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugExtraMsg,
- "do_setmask: tid = %d how = %d (%s), set = %p %s",
+ "do_setmask: tid = %d how = %d (%s), newset = %p (%s)",
tid, how,
how==VKI_SIG_BLOCK ? "SIG_BLOCK" : (
how==VKI_SIG_UNBLOCK ? "SIG_UNBLOCK" : (
how==VKI_SIG_SETMASK ? "SIG_SETMASK" : "???")),
- newset, format_sigset(newset));
+ newset, newset ? format_sigset(newset) : "NULL" );
/* Just do this thread. */
vg_assert(VG_(is_valid_tid)(tid));
@@ -949,17 +1003,17 @@
vki_sigset_t* oldset )
{
switch(how) {
- case VKI_SIG_BLOCK:
- case VKI_SIG_UNBLOCK:
- case VKI_SIG_SETMASK:
- vg_assert(VG_(is_valid_tid)(tid));
- do_setmask ( tid, how, set, oldset );
- return VG_(mk_SysRes_Success)( 0 );
+ case VKI_SIG_BLOCK:
+ case VKI_SIG_UNBLOCK:
+ case VKI_SIG_SETMASK:
+ vg_assert(VG_(is_valid_tid)(tid));
+ do_setmask ( tid, how, set, oldset );
+ return VG_(mk_SysRes_Success)( 0 );
- default:
- VG_(message)(Vg_DebugMsg,
- "sigprocmask: unknown 'how' field %d", how);
- return VG_(mk_SysRes_Error)( VKI_EINVAL );
+ default:
+ VG_(message)(Vg_DebugMsg,
+ "sigprocmask: unknown 'how' field %d", how);
+ return VG_(mk_SysRes_Error)( VKI_EINVAL );
}
}
@@ -1009,7 +1063,8 @@
/* Set up a stack frame (VgSigContext) for the client's signal
handler. */
static
-void push_signal_frame ( ThreadId tid, const vki_siginfo_t *siginfo, const struct vki_ucontext *uc )
+void push_signal_frame ( ThreadId tid, const vki_siginfo_t *siginfo,
+ const struct vki_ucontext *uc )
{
Addr esp_top_of_frame;
ThreadState* tst;
@@ -1036,7 +1091,8 @@
= (Addr)(tst->altstack.ss_sp) + tst->altstack.ss_size;
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "delivering signal %d (%s) to thread %d: on ALT STACK (%p-%p; %ld bytes)",
+ "delivering signal %d (%s) to thread %d: "
+ "on ALT STACK (%p-%p; %ld bytes)",
sigNo, signame(sigNo), tid,
tst->altstack.ss_sp,
(UChar *)tst->altstack.ss_sp + tst->altstack.ss_size,
@@ -1068,7 +1124,7 @@
static const Char *signame(Int sigNo)
{
- static Char buf[10];
+ static Char buf[20];
switch(sigNo) {
case VKI_SIGHUP: return "SIGHUP";
@@ -1102,14 +1158,18 @@
case VKI_SIGPROF: return "SIGPROF";
case VKI_SIGWINCH: return "SIGWINCH";
case VKI_SIGIO: return "SIGIO";
+# if defined(VKI_SIGPWR)
case VKI_SIGPWR: return "SIGPWR";
+# endif
# if defined(VKI_SIGUNUSED)
case VKI_SIGUNUSED: return "SIGUNUSED";
# endif
+# if defined(VKI_SIGRTMIN) && defined(VKI_SIGRTMAX)
case VKI_SIGRTMIN ... VKI_SIGRTMAX:
VG_(sprintf)(buf, "SIGRT%d", sigNo-VKI_SIGRTMIN);
return buf;
+# endif
default:
VG_(sprintf)(buf, "SIG%d", sigNo);
@@ -1120,12 +1180,14 @@
/* Hit ourselves with a signal using the default handler */
void VG_(kill_self)(Int sigNo)
{
- vki_sigset_t mask, origmask;
- struct vki_sigaction sa, origsa;
+ vki_sigset_t mask, origmask;
+ vki_sigaction_toK_t sa, origsa2;
+ vki_sigaction_fromK_t origsa;
sa.ksa_handler = VKI_SIG_DFL;
sa.sa_flags = 0;
-# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5)
+# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5) \
+ && !defined(VGP_x86_darwin)
sa.sa_restorer = 0;
# endif
VG_(sigemptyset)(&sa.sa_mask);
@@ -1138,7 +1200,8 @@
VG_(kill)(VG_(getpid)(), sigNo);
- VG_(sigaction)(sigNo, &origsa, NULL);
+ VG_(convert_sigaction_fromK_to_toK)( &origsa, &origsa2 );
+ VG_(sigaction)(sigNo, &origsa2, NULL);
VG_(sigprocmask)(VKI_SIG_SETMASK, &origmask, NULL);
}
@@ -1161,42 +1224,47 @@
vg_assert(VG_(is_running_thread)(tid));
switch(sigNo) {
- case VKI_SIGQUIT: /* core */
- case VKI_SIGILL: /* core */
- case VKI_SIGABRT: /* core */
- case VKI_SIGFPE: /* core */
- case VKI_SIGSEGV: /* core */
- case VKI_SIGBUS: /* core */
- case VKI_SIGTRAP: /* core */
- case VKI_SIGXCPU: /* core */
- case VKI_SIGXFSZ: /* core */
- terminate = True;
- core = True;
- break;
+ case VKI_SIGQUIT: /* core */
+ case VKI_SIGILL: /* core */
+ case VKI_SIGABRT: /* core */
+ case VKI_SIGFPE: /* core */
+ case VKI_SIGSEGV: /* core */
+ case VKI_SIGBUS: /* core */
+ case VKI_SIGTRAP: /* core */
+ case VKI_SIGXCPU: /* core */
+ case VKI_SIGXFSZ: /* core */
+ terminate = True;
+ core = True;
+ break;
- case VKI_SIGHUP: /* term */
- case VKI_SIGINT: /* term */
- case VKI_SIGKILL: /* term - we won't see this */
- case VKI_SIGPIPE: /* term */
- case VKI_SIGALRM: /* term */
- case VKI_SIGTERM: /* term */
- case VKI_SIGUSR1: /* term */
- case VKI_SIGUSR2: /* term */
- case VKI_SIGIO: /* term */
- case VKI_SIGPWR: /* term */
- case VKI_SIGSYS: /* term */
- case VKI_SIGPROF: /* term */
- case VKI_SIGVTALRM: /* term */
- case VKI_SIGRTMIN ... VKI_SIGRTMAX: /* term */
- terminate = True;
- break;
+ case VKI_SIGHUP: /* term */
+ case VKI_SIGINT: /* term */
+ case VKI_SIGKILL: /* term - we won't see this */
+ case VKI_SIGPIPE: /* term */
+ case VKI_SIGALRM: /* term */
+ case VKI_SIGTERM: /* term */
+ case VKI_SIGUSR1: /* term */
+ case VKI_SIGUSR2: /* term */
+ case VKI_SIGIO: /* term */
+# if defined(VKI_SIGPWR)
+ case VKI_SIGPWR: /* term */
+# endif
+ case VKI_SIGSYS: /* term */
+ case VKI_SIGPROF: /* term */
+ case VKI_SIGVTALRM: /* term */
+# if defined(VKI_SIGRTMIN) && defined(VKI_SIGRTMAX)
+ case VKI_SIGRTMIN ... VKI_SIGRTMAX: /* term */
+# endif
+ terminate = True;
+ break;
}
vg_assert(!core || (core && terminate));
if (VG_(clo_trace_signals))
- VG_(message)(Vg_DebugMsg, "delivering %d (code %d) to default handler; action: %s%s",
- sigNo, info->si_code, terminate ? "terminate" : "ignore", core ? "+core" : "");
+ VG_(message)(Vg_DebugMsg,
+ "delivering %d (code %d) to default handler; action: %s%s",
+ sigNo, info->si_code, terminate ? "terminate" : "ignore", core ? "+core" : "");
if (!terminate)
return; /* nothing to do */
@@ -1353,7 +1421,8 @@
This updates the thread state, but it does not set it to be
Runnable.
*/
-static void deliver_signal ( ThreadId tid, const vki_siginfo_t *info, const struct vki_ucontext *uc )
+static void deliver_signal ( ThreadId tid, const vki_siginfo_t *info,
+ const struct vki_ucontext *uc )
{
Int sigNo = info->si_signo;
SCSS_Per_Signal *handler = &scss.scss_per_sig[sigNo];
@@ -1420,7 +1489,6 @@
if (!(handler->scss_flags & VKI_SA_NOMASK)) {
VG_(sigaddset_from_set)(&tst->sig_mask, &handler->scss_mask);
VG_(sigaddset)(&tst->sig_mask, sigNo);
-
tst->tmp_sig_mask = tst->sig_mask;
}
}
@@ -1502,12 +1570,19 @@
info.si_signo = VKI_SIGTRAP;
info.si_code = VKI_TRAP_BRKPT; /* tjh: only ever called for a brkpt ins */
-#if defined(VGA_x86) || defined(VGA_amd64)
- uc.uc_mcontext.trapno = 3; /* tjh: this is the x86 trap number
+
+# if defined(VGP_x86_linux) || defined(VGP_amd64_linux)
+ uc.uc_mcontext->trapno = 3; /* tjh: this is the x86 trap number
for a breakpoint trap... */
uc.uc_mcontext.err = 0; /* tjh: no error code for x86
breakpoint trap... */
-#endif
+# elif defined(VGP_x86_darwin) || defined(VGP_amd64_darwin)
+ /* the same thing, but using Darwin field/struct names */
+ /* XXX JRS this doesn't work, maybe because uc.uc_mcontext
+ points to unwritable memory? */
+ uc.uc_mcontext->__es.__trapno = 3;
+ uc.uc_mcontext->__es.__err = 0;
+# endif
resume_scheduler(tid);
deliver_signal(tid, &info, &uc);
@@ -1605,12 +1680,13 @@
since that's the only time this set of signals is unblocked.
*/
static
-void async_signalhandler ( Int sigNo, vki_siginfo_t *info, struct vki_ucontext *uc )
+void async_signalhandler ( Int sigNo,
+ vki_siginfo_t *info, struct vki_ucontext *uc )
{
ThreadId tid = VG_(lwpid_to_vgtid)(VG_(gettid)());
ThreadState *tst = VG_(get_ThreadState)(tid);
-#ifdef VGO_linux
+# if defined(VGO_linux)
/* The linux kernel uses the top 16 bits of si_code for it's own
use and only exports the bottom 16 bits to user space - at least
that is the theory, but it turns out that there are some kernels
@@ -1620,7 +1696,7 @@
mask them off) sign extends them when exporting to user space so
we do the same thing here. */
info->si_code = (Short)info->si_code;
-#endif
+# endif
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg, "Async handler got signal %d for tid %d info %d",
@@ -1648,7 +1724,8 @@
handler. */
resume_scheduler(tid);
- VG_(core_panic)("async_signalhandler: got unexpected signal while outside of scheduler");
+ VG_(core_panic)("async_signalhandler: got unexpected signal "
+ "while outside of scheduler");
}
/* Extend the stack to cover addr. maxsize is the limit the stack can grow to.
@@ -1724,11 +1801,35 @@
/*
Receive a sync signal from the host.
*/
+/* Darwin inside-vs-outside examples:
+ Segfault from within the same process (sync signal)
+ info->si_signo 11
+ info->si_errno 0
+ info->si_code 1
+ info->si_pid 0
+ info->si_uid 0
+ info->si_status 0
+ info->si_addr 0x90000000
+ Segfault from outside this process (async signal)
+ sync_sighandler(11, 0xF21ACDF4, 0xF21ACE34)
+ info->si_signo 11
+ info->si_errno 0
+ info->si_code 0
+ info->si_pid 0
+ info->si_uid 0
+ info->si_status 0
+ info->si_addr 0xF00C2E90
+*/
static
-void sync_signalhandler ( Int sigNo, vki_siginfo_t *info, struct vki_ucontext *uc )
+void sync_signalhandler ( Int sigNo,
+ vki_siginfo_t *info, struct vki_ucontext *uc )
{
+ Bool is_from_outside_process;
ThreadId tid = VG_(lwpid_to_vgtid)(VG_(gettid)());
+ if (0)
+ VG_(printf)("sync_sighandler(%d, %p, %p)\n", sigNo, info, uc);
+
vg_assert(info != NULL);
vg_assert(info->si_signo == sigNo);
vg_assert(sigNo == VKI_SIGSEGV ||
@@ -1737,7 +1838,7 @@
sigNo == VKI_SIGILL ||
sigNo == VKI_SIGTRAP);
-#ifdef VGO_linux
+# if defined(VGO_linux)
/* The linux kernel uses the top 16 bits of si_code for it's own
use and only exports the bottom 16 bits to user space - at least
that is the theory, but it turns out that there are some kernels
@@ -1747,9 +1848,39 @@
mask them off) sign extends them when exporting to user space so
we do the same thing here. */
info->si_code = (Short)info->si_code;
-#endif
+# endif
- if (info->si_code <= VKI_SI_USER) {
+ if (0) {
+ VG_(printf)("info->si_signo %d\n", info->si_signo);
+ VG_(printf)("info->si_errno %d\n", info->si_errno);
+ VG_(printf)("info->si_code %d\n", info->si_code);
+ VG_(printf)("info->si_pid %d\n", info->si_pid);
+ VG_(printf)("info->si_uid %d\n", info->si_uid);
+ VG_(printf)("info->si_status %d\n", info->si_status);
+ VG_(printf)("info->si_addr %p\n", info->si_addr);
+ }
+
+ /* Figure out if the signal is being sent from outside the process.
+ (Why do we care?) If it is, then treat it more like an async
+ signal than a sync signal -- that is, merely queue it for later
+ delivery. It seems the logic for detecting which case is which
+ differs between Linux/AIX and Darwin. */
+# if defined(VGO_linux) || defined(VGO_aix5)
+ is_from_outside_process = info->si_code <= VKI_SI_USER;
+# elif defined(VGO_darwin)
+ /* see "Values for si_code" in /usr/include/sys/signal.h;
+ all the XXX_NOOP values are zero. */
+ /* Bugger it, let's just deliver the damn thing as if it was a sync
+ signal from inside the process. I really don't understand
+ enough about the rationale behind this logic to make informed
+ decisions. JRS, 3 Mar 09. */
+ is_from_outside_process = False;
+ /* info->si_code == 0; */ /* originally .. */
+# else
+# error "Unknown OS"
+# endif
+
+ if (is_from_outside_process) {
/* If some user-process sent us one of these signals (ie,
they're not the result of a faulting instruction), then treat
it as an async signal. This is tricky because we could get
@@ -1817,7 +1948,7 @@
queue_signal(0, info); /* shared pending */
return;
- }
+ } /* if (is_from_outside_process) */
if (VG_(clo_trace_signals)) {
VG_(message)(Vg_DebugMsg, "signal %d arrived ... si_code=%d, "
@@ -1918,7 +2049,8 @@
Valgrind internally.
*/
VG_(message)(Vg_DebugMsg,
- "VALGRIND INTERNAL ERROR: Valgrind received a signal %d (%s) - exiting",
+ "VALGRIND INTERNAL ERROR: Valgrind received "
+ "a signal %d (%s) - exiting",
sigNo, signame(sigNo));
VG_(message)(Vg_DebugMsg,
@@ -1947,7 +2079,8 @@
blocked in, and return to the scheduler. This doesn't mark the thread
as exiting; that's the caller's job.
*/
-static void sigvgkill_handler(int signo, vki_siginfo_t *si, struct vki_ucontext *uc)
+static void sigvgkill_handler(int signo, vki_siginfo_t *si,
+ struct vki_ucontext *uc)
{
ThreadId tid = VG_(lwpid_to_vgtid)(VG_(gettid)());
ThreadStatus at_signal = VG_(threads)[tid].status;
@@ -1981,13 +2114,14 @@
}
static __attribute((unused))
-void pp_ksigaction ( struct vki_sigaction* sa )
+void pp_ksigaction ( vki_sigaction_toK_t* sa )
{
Int i;
VG_(printf)("pp_ksigaction: handler %p, flags 0x%x, restorer %p\n",
sa->ksa_handler,
(UInt)sa->sa_flags,
-# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5)
+# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5) \
+ && !defined(VGP_x86_darwin)
sa->sa_restorer
# else
(void*)0
@@ -2005,11 +2139,12 @@
*/
void VG_(set_default_handler)(Int signo)
{
- struct vki_sigaction sa;
+ vki_sigaction_toK_t sa;
sa.ksa_handler = VKI_SIG_DFL;
sa.sa_flags = 0;
-# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5)
+# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5) \
+ && !defined(VGP_x86_darwin)
sa.sa_restorer = 0;
# endif
VG_(sigemptyset)(&sa.sa_mask);
@@ -2025,15 +2160,12 @@
vki_siginfo_t si, *sip;
vki_sigset_t pollset;
ThreadState *tst = VG_(get_ThreadState)(tid);
- Int i;
vki_sigset_t saved_mask;
/* look for all the signals this thread isn't blocking */
- for(i = 0; i < _VKI_NSIG_WORDS; i++)
- pollset.sig[i] = ~tst->sig_mask.sig[i];
+ /* pollset = ~tst->sig_mask */
+ VG_(sigcomplementset)( &pollset, &tst->sig_mask );
- //VG_(printf)("tid %d pollset=%08x%08x\n", tid, pollset.sig[1], pollset.sig[0]);
-
block_all_host_signals(&saved_mask); // protect signal queue
/* First look for any queued pending signals */
@@ -2073,10 +2205,19 @@
*/
void VG_(sigstartup_actions) ( void )
{
- Int i, ret;
+ Int i, ret, vKI_SIGRTMIN;
vki_sigset_t saved_procmask;
- struct vki_sigaction sa;
+ vki_sigaction_fromK_t sa;
+ VG_(memset)(&scss, 0, sizeof(scss));
+ VG_(memset)(&skss, 0, sizeof(skss));
+
+# if defined(VKI_SIGRTMIN)
+ vKI_SIGRTMIN = VKI_SIGRTMIN;
+# else
+ vKI_SIGRTMIN = 0; /* eg Darwin */
+# endif
+
/* VG_(printf)("SIGSTARTUP\n"); */
/* Block all signals. saved_procmask remembers the previous mask,
which the first thread inherits.
@@ -2088,17 +2229,26 @@
/* Get the old host action */
ret = VG_(sigaction)(i, NULL, &sa);
+# if defined(VGP_x86_darwin)
+ /* apparently we may not even ask about the disposition of these
+ signals, let alone change them */
+ if (ret != 0 && (i == VKI_SIGKILL || i == VKI_SIGSTOP))
+ continue;
+# endif
+
if (ret != 0)
break;
/* Try setting it back to see if this signal is really
available */
- if (i >= VKI_SIGRTMIN) {
- struct vki_sigaction tsa;
+ if (vKI_SIGRTMIN > 0 /* it actually exists on this platform */
+ && i >= vKI_SIGRTMIN) {
+ vki_sigaction_toK_t tsa, sa2;
tsa.ksa_handler = (void *)sync_signalhandler;
tsa.sa_flags = VKI_SA_SIGINFO;
-# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5)
+# if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5) \
+ && !defined(VGP_x86_darwin)
tsa.sa_restorer = 0;
# endif
VG_(sigfillset)(&tsa.sa_mask);
@@ -2109,7 +2259,8 @@
break;
}
- ret = VG_(sigaction)(i, &sa, NULL);
+ VG_(convert_sigacti...
[truncated message content] |
|
From: John R.
|
Nicholas Nethercote wrote: > Some lessons learned from all this: > - Making the scope of variables as small as possible is a good thing. > Eg. declare them within local blocks rather than at the start of a > function, as this minimises the chances of getting into trouble. Think about assigning the first value as part of the declaration: int foo = bar(a); /* <purpose of 'foo'> */ This comes close to 'let', which is the most powerful word in a proof. Remember the keyword 'const', which is the most powerful accessory for debugging. 'const' minimizes the time span over which trouble can happen. My pet compiler enhancement is a diagnostic message: warning: omitted 'const' in declaration of 'foo' Unfortunately, the internal representation of types in gcc makes it difficult to implement such a warning. [I tried several years ago. Gcc considers the internal representation of a type to be a constant (may be freely copied, substituted, "impostored", etc.) but detecting "omitted 'const'" requires that the type for each declared variable must be a unique object which accumulates state.] -- |
|
From: Nuno L. <nun...@is...> - 2009-03-13 10:56:50
|
> On Friday 13 March 2009, Nicholas Nethercote wrote: >> There are two non-VEX complaints left. The first is a false positive >> because it can't tell that c->barf() in readdwarf3.c is a "noreturn" >> function, even though it's annotated as such. Must be because it's in >> a struct. > > Looks like a bug in the checker. A few days ago I put a bug report in there > Bugzilla, and they were _very_ responsive: the bug was fixed in less than > a day in SVN. This bug is well known. e.g.: http://llvm.org/bugs/show_bug.cgi?id=2461 It was not fixed yet because it requires some complex infrastructure :) Nuno |
|
From: Bart V. A. <bar...@gm...> - 2009-03-13 08:21:27
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) started at 2009-03-13 02:00:01 EDT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 406 tests, 36 stderr failures, 9 stdout failures, 0 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) memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stderr) none/tests/linux/mremap (stderr) none/tests/linux/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) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 406 tests, 38 stderr failures, 9 stdout failures, 0 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/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stderr) none/tests/linux/mremap (stderr) none/tests/linux/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) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Mar 13 03:10:28 2009 --- new.short Fri Mar 13 04:21:14 2009 *************** *** 8,10 **** ! == 406 tests, 38 stderr failures, 9 stdout failures, 0 post failures == exp-ptrcheck/tests/bad_percentify (stderr) --- 8,10 ---- ! == 406 tests, 36 stderr failures, 9 stdout failures, 0 post failures == exp-ptrcheck/tests/bad_percentify (stderr) *************** *** 31,34 **** helgrind/tests/hg05_race2 (stderr) - helgrind/tests/tc18_semabuse (stderr) - helgrind/tests/tc20_verifywrap (stderr) memcheck/tests/deep_templates (stdout) --- 31,32 ---- |
|
From: Bart V. A. <bar...@gm...> - 2009-03-13 07:17:25
|
On Fri, Mar 13, 2009 at 5:47 AM, Nicholas Nethercote
<n.n...@gm...> wrote:
> Thoughts?
There is another small but annoying inconsistency between stack traces
printed for an Intel CPU versus PPC: often the line numbers printed
for the topmost stack frame differ. See e.g.
memcheck/tests/varinfo6.stderr.diff-glibc25-amd64 in nightly PPC build
output for an example. If I counted line numbers correctly, the line
numbers reported on PPC for the topmost stackframe are correct
(varinfo6.c:34) but those reported on an Intel CPU are not
(varinfo6.c:35) ? Note: I did not analyze why the reported location
information differs in the example below.
$ cat memcheck/tests/varinfo6.stderr.diff-glibc25-amd64
--- varinfo6.stderr.exp-glibc25-amd64 2009-03-13 02:01:29.000000000 -0400
+++ varinfo6.stderr.out 2009-03-13 03:02:08.000000000 -0400
@@ -1,6 +1,6 @@
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:34)
+ at 0x........: croak (varinfo6.c:35)
by 0x........: mainSort (varinfo6.c:2999)
by 0x........: BZ2_blockSort (varinfo6.c:3143)
by 0x........: BZ2_compressBlock (varinfo6.c:4072)
@@ -8,17 +8,16 @@
by 0x........: BZ2_bzCompress (varinfo6.c:4860)
by 0x........: BZ2_bzBuffToBuffCompress (varinfo6.c:5667)
by 0x........: main (varinfo6.c:6517)
- Location 0x........ is 2 bytes inside local var "budget"
- declared at varinfo6.c:3115, in frame #2 of thread 1
+ Location 0x........ is 2 bytes inside runningOrder[0],
+ declared at varinfo6.c:2833, in frame #1 of thread 1
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:34)
+ at 0x........: croak (varinfo6.c:35)
by 0x........: BZ2_decompress (varinfo6.c:1699)
by 0x........: BZ2_bzDecompress (varinfo6.c:5230)
by 0x........: BZ2_bzBuffToBuffDecompress (varinfo6.c:5715)
by 0x........: main (varinfo6.c:6532)
- Location 0x........ is 2 bytes inside local var "i"
- declared at varinfo6.c:1517, in frame #1 of thread 1
+ Address 0x........ is on thread 1's stack
ERROR SUMMARY: 10216 errors from 2 contexts (suppressed: 0 from 0)
malloc/free: in use at exit: 0 bytes in 0 blocks.
Bart.
|
|
From: <sv...@va...> - 2009-03-13 05:49:49
|
Author: njn
Date: 2009-03-13 05:49:36 +0000 (Fri, 13 Mar 2009)
New Revision: 9396
Log:
Merge r9395 (exp-ptrcheck suppressions) from the trunk.
Modified:
branches/DARWIN/exp-ptrcheck.supp
Modified: branches/DARWIN/exp-ptrcheck.supp
===================================================================
--- branches/DARWIN/exp-ptrcheck.supp 2009-03-13 05:47:33 UTC (rev 9395)
+++ branches/DARWIN/exp-ptrcheck.supp 2009-03-13 05:49:36 UTC (rev 9396)
@@ -40,3 +40,18 @@
obj:/*lib*/ld-2.*so*
obj:/*lib*/ld-2.*so*
}
+
+{
+ I think this is glibc's ultra optimised getenv doing 2 byte reads
+ exp-ptrcheck:SorG
+ fun:getenv
+}
+
+{
+ Occurs on Fedora 7--9?
+ exp-ptrcheck:SorG
+ fun:_dl_fini
+ fun:exit
+ fun:(below main)
+}
+
|
|
From: <sv...@va...> - 2009-03-13 05:47:40
|
Author: njn
Date: 2009-03-13 05:47:33 +0000 (Fri, 13 Mar 2009)
New Revision: 9395
Log:
Add a Fedora suppression that hopefully will make failing tests work on
Tom's nightly test machines.
Modified:
trunk/exp-ptrcheck.supp
Modified: trunk/exp-ptrcheck.supp
===================================================================
--- trunk/exp-ptrcheck.supp 2009-03-13 05:38:01 UTC (rev 9394)
+++ trunk/exp-ptrcheck.supp 2009-03-13 05:47:33 UTC (rev 9395)
@@ -46,3 +46,12 @@
exp-ptrcheck:SorG
fun:getenv
}
+
+{
+ Occurs on Fedora 7--9?
+ exp-ptrcheck:SorG
+ fun:_dl_fini
+ fun:exit
+ fun:(below main)
+}
+
|
|
From: <sv...@va...> - 2009-03-13 05:38:12
|
Author: njn
Date: 2009-03-13 05:38:01 +0000 (Fri, 13 Mar 2009)
New Revision: 9394
Log:
Merge r9380, r9381 (test portability tweaks) from the DARWIN branch.
Modified:
trunk/none/tests/coolo_sigaction.cpp
trunk/none/tests/coolo_sigaction.stdout.exp
trunk/none/tests/sigstackgrowth.c
Modified: trunk/none/tests/coolo_sigaction.cpp
===================================================================
--- trunk/none/tests/coolo_sigaction.cpp 2009-03-13 05:14:54 UTC (rev 9393)
+++ trunk/none/tests/coolo_sigaction.cpp 2009-03-13 05:38:01 UTC (rev 9394)
@@ -8,7 +8,7 @@
void theHandler(int arg)
{
- printf("handled %d\n", arg);
+ printf("handled %s\n", arg == SIGCHLD ? "SIGCHLD" : "?!unexpected signal?!" );
}
void setupHandlers()
Modified: trunk/none/tests/coolo_sigaction.stdout.exp
===================================================================
--- trunk/none/tests/coolo_sigaction.stdout.exp 2009-03-13 05:14:54 UTC (rev 9393)
+++ trunk/none/tests/coolo_sigaction.stdout.exp 2009-03-13 05:38:01 UTC (rev 9394)
@@ -1 +1 @@
-handled 17
+handled SIGCHLD
Modified: trunk/none/tests/sigstackgrowth.c
===================================================================
--- trunk/none/tests/sigstackgrowth.c 2009-03-13 05:14:54 UTC (rev 9393)
+++ trunk/none/tests/sigstackgrowth.c 2009-03-13 05:38:01 UTC (rev 9394)
@@ -4,10 +4,26 @@
#include <sys/types.h>
#include <unistd.h>
-#if defined(_AIX) && !defined(SA_NOMASK)
-# define SA_NOMASK 0
-#endif
+/* What does this test do? It checks that valgrind's signal frame
+ building mechanism can create at least 4MB of signal delivery
+ frames, hence that it can actually expand the stack by that much
+ when delivering signals. A fair-enough thing to want to test.
+ It does this by getting into the signal handler, and then
+ recursively invoking the handler by sending itself the signal
+ again, until the stack has grown to 4MB from the starting frame
+ (main).
+
+ Consequence is: it is essential that we do not disable delivery of
+ further signals within the handler itself, else the kernel will
+ wait till the handler exits before delivering the next signal, the
+ frame will be cleared, the stack will never grow, and we'll be in
+ an infinite loop.
+
+ Hence we *must* give the SA_NODEFER flag when setting up the
+ handler.
+*/
+
static char *deep;
#define SIZE (4*1024*1024)
@@ -32,7 +48,7 @@
deep = &here - SIZE;
sa.sa_handler = handler;
- sa.sa_flags = SA_NOMASK;
+ sa.sa_flags = SA_NODEFER;
sigemptyset(&sa.sa_mask);
sigaction(SIGUSR1, &sa, NULL);
@@ -42,3 +58,4 @@
printf("FAILED\n");
exit(1);
}
+
|
|
From: <sv...@va...> - 2009-03-13 05:15:02
|
Author: njn
Date: 2009-03-13 05:14:54 +0000 (Fri, 13 Mar 2009)
New Revision: 9393
Log:
Implement a few sem_* wrappers. Fixes bug #185980.
Modified:
branches/DARWIN/coregrind/m_syswrap/priv_syswrap-darwin.h
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
branches/DARWIN/include/vki/vki-darwin.h
branches/DARWIN/memcheck/tests/darwin/scalar.c
branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp
Modified: branches/DARWIN/coregrind/m_syswrap/priv_syswrap-darwin.h
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/priv_syswrap-darwin.h 2009-03-13 03:28:53 UTC (rev 9392)
+++ branches/DARWIN/coregrind/m_syswrap/priv_syswrap-darwin.h 2009-03-13 05:14:54 UTC (rev 9393)
@@ -54,6 +54,11 @@
DECL_TEMPLATE(darwin, sys_semget);
DECL_TEMPLATE(darwin, sys_semop);
DECL_TEMPLATE(darwin, sys_semctl);
+DECL_TEMPLATE(darwin, sys_sem_open);
+DECL_TEMPLATE(darwin, sys_sem_close);
+DECL_TEMPLATE(darwin, sys_sem_unlink);
+DECL_TEMPLATE(darwin, sys_sem_post);
+DECL_TEMPLATE(darwin, sys_sem_wait_nocancel);
DECL_TEMPLATE(darwin, sys_bsdthread_create);
DECL_TEMPLATE(darwin, sys_bsdthread_terminate);
DECL_TEMPLATE(darwin, sys_kqueue);
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-03-13 03:28:53 UTC (rev 9392)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-03-13 05:14:54 UTC (rev 9393)
@@ -61,6 +61,7 @@
#include <mach/mach.h>
#include <mach/mach_vm.h>
+#include <semaphore.h>
#define msgh_request_port msgh_remote_port
#define msgh_reply_port msgh_local_port
#define BOOTSTRAP_MAX_NAME_LEN 128
@@ -1272,7 +1273,56 @@
ML_(generic_POST_sys_semctl)(tid, RES,ARG1,ARG2,ARG3,ARG4);
}
+PRE(sys_sem_open)
+{
+ if (ARG2 & VKI_O_CREAT) {
+ // 4-arg version
+ PRINT("sys_sem_open ( %#lx(%s), %ld, %ld, %ld )",
+ ARG1,(char*)ARG1,ARG2,ARG3,ARG4);
+ PRE_REG_READ4(vki_sem_t *, "sem_open",
+ const char *, name, int, oflag, vki_mode_t, mode,
+ unsigned int, value);
+ } else {
+ // 2-arg version
+ PRINT("sys_sem_open ( %#lx(%s), %ld )",ARG1,(char*)ARG1,ARG2);
+ PRE_REG_READ2(vki_sem_t *, "sem_open",
+ const char *, name, int, oflag);
+ }
+ PRE_MEM_RASCIIZ( "sem_open(name)", ARG1 );
+ /* Otherwise handle normally */
+ *flags |= SfMayBlock;
+}
+
+PRE(sys_sem_close)
+{
+ PRINT("sem_close( %#lx )", ARG1);
+ PRE_REG_READ1(int, "sem_close", vki_sem_t *, sem);
+}
+
+PRE(sys_sem_unlink)
+{
+ PRINT("sem_unlink( %#lx(%s) )", ARG1,(char*)ARG1);
+ PRE_REG_READ1(int, "sem_unlink", const char *, name);
+ PRE_MEM_RASCIIZ( "sem_unlink(name)", ARG1 );
+}
+
+PRE(sys_sem_post)
+{
+ PRINT("sem_post( %#lx )", ARG1);
+ PRE_REG_READ1(int, "sem_post", vki_sem_t *, sem);
+
+ *flags |= SfMayBlock;
+}
+
+PRE(sys_sem_wait_nocancel)
+{
+ PRINT("sem_wait_nocancel( %#lx )", ARG1);
+ PRE_REG_READ1(int, "sem_wait_nocancel", vki_sem_t *, sem);
+
+ *flags |= SfMayBlock;
+}
+
PRE(sys_kqueue)
{
PRINT("kqueue()");
@@ -6339,6 +6389,9 @@
X_ : PRE handler only
XY : PRE and POST handlers
*/
+// DDD: the "sys_" prefixes I think aren't necessary. The name on the right
+// is meant to be the name of the function implementing the syscall in the
+// kernel. On Darwin that seems to usually match the __NR_xyz name.
const SyscallTableEntry ML_(syscall_table)[] = {
// _____(__NR_syscall), // 0
MACX_(__NR_exit, sys_exit),
@@ -6608,12 +6661,13 @@
// _____(__NR_shmget),
MACXY(__NR_shm_open, sys_shm_open),
// _____(__NR_shm_unlink),
-// _____(__NR_sem_open),
-// _____(__NR_sem_close),
-// _____(__NR_sem_unlink),
+ MACX_(__NR_sem_open, sys_sem_open),
+ MACX_(__NR_sem_close, sys_sem_close),
+ MACX_(__NR_sem_unlink, sys_sem_unlink),
// _____(__NR_sem_wait),
// _____(__NR_sem_trywait),
// _____(__NR_sem_post),
+ MACX_(__NR_sem_post, sys_sem_post),
// _____(__NR_sem_getvalue),
// _____(__NR_sem_init),
// _____(__NR_sem_destroy),
@@ -6702,7 +6756,7 @@
// _____(__NR_auditctl),
MACXY(__NR_bsdthread_create, sys_bsdthread_create), // 360
MACX_(__NR_bsdthread_terminate, sys_bsdthread_terminate),
- MACX_(__NR_kqueue, sys_kqueue),
+ MACXY(__NR_kqueue, sys_kqueue),
MACXY(__NR_kevent, sys_kevent),
// _____(__NR_lchown),
// _____(__NR_stack_snapshot),
@@ -6761,7 +6815,7 @@
GENXY(__NR_poll_nocancel, sys_poll),
// _____(__NR_msgsnd_nocancel),
// _____(__NR_msgrcv_nocancel),
-// _____(__NR_sem_wait_nocancel), // 420
+ MACX_(__NR_sem_wait_nocancel, sys_sem_wait_nocancel), // 420
// _____(__NR_aio_suspend_nocancel),
// _____(__NR___sigwait_nocancel),
MACX_(__NR___semwait_signal_nocancel, sys___semwait_signal),
Modified: branches/DARWIN/include/vki/vki-darwin.h
===================================================================
--- branches/DARWIN/include/vki/vki-darwin.h 2009-03-13 03:28:53 UTC (rev 9392)
+++ branches/DARWIN/include/vki/vki-darwin.h 2009-03-13 05:14:54 UTC (rev 9393)
@@ -571,6 +571,11 @@
#define vki_semun semun
+#include <sys/semaphore.h>
+
+#define vki_sem_t sem_t
+
+
#include <sys/mount.h>
#define VKI_MFSNAMELEN MFSNAMELEN
Modified: branches/DARWIN/memcheck/tests/darwin/scalar.c
===================================================================
--- branches/DARWIN/memcheck/tests/darwin/scalar.c 2009-03-13 03:28:53 UTC (rev 9392)
+++ branches/DARWIN/memcheck/tests/darwin/scalar.c 2009-03-13 05:14:54 UTC (rev 9393)
@@ -321,12 +321,30 @@
// __NR_shmget 265
// __NR_shm_open 266
// __NR_shm_unlink 267
+
// __NR_sem_open 268
+ GO(__NR_sem_open, "2s 1m");
+ SY(__NR_sem_open, x0, x0); FAIL;
+
+ GO(__NR_sem_open, "(4-args) 2s 0m");
+ SY(__NR_sem_open, "my_sem", O_CREAT|O_EXCL, x0, x0); FAIL;
+
// __NR_sem_close 269
+ // Nb: we add 0x12345 to make sure it's not a valid semaphore descriptor.
+ GO(__NR_sem_close, "1s 0m");
+ SY(__NR_sem_close, x0+0x12345); FAIL;
+
// __NR_sem_unlink 270
+ GO(__NR_sem_unlink, "1s 1m");
+ SY(__NR_sem_unlink, x0); FAIL;
+
// __NR_sem_wait 271
// __NR_sem_trywait 272
+
// __NR_sem_post 273
+ GO(__NR_sem_post, "1s 0m");
+ SY(__NR_sem_post, x0); FAIL;
+
// __NR_sem_getvalue 274
// __NR_sem_init 275
// __NR_sem_destroy 276
@@ -474,7 +492,11 @@
// __NR_poll_nocancel 417
// __NR_msgsnd_nocancel 418
// __NR_msgrcv_nocancel 419
+
// __NR_sem_wait_nocancel 420
+ GO(__NR_sem_wait_nocancel, "1s 0m");
+ SY(__NR_sem_wait_nocancel, x0); FAIL;
+
// __NR_aio_suspend_nocancel 421
// __NR___sigwait_nocancel 422
// __NR___semwait_signal_nocancel 423
Modified: branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp 2009-03-13 03:28:53 UTC (rev 9392)
+++ branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp 2009-03-13 05:14:54 UTC (rev 9393)
@@ -85,6 +85,56 @@
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (scalar.c:24)
-----------------------------------------------------
+268: __NR_sem_open 2s 1m
+-----------------------------------------------------
+
+Syscall param sem_open(name) contains uninitialised byte(s)
+ ...
+
+Syscall param sem_open(oflag) contains uninitialised byte(s)
+ ...
+
+Syscall param sem_open(name) points to unaddressable byte(s)
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+268: __NR_sem_open (4-args) 2s 0m
+-----------------------------------------------------
+
+Syscall param sem_open(mode) contains uninitialised byte(s)
+ ...
+
+Syscall param sem_open(value) contains uninitialised byte(s)
+ ...
+-----------------------------------------------------
+269: __NR_sem_close 1s 0m
+-----------------------------------------------------
+
+Syscall param sem_close(sem) contains uninitialised byte(s)
+ ...
+-----------------------------------------------------
+270: __NR_sem_unlink 1s 1m
+-----------------------------------------------------
+
+Syscall param sem_unlink(name) contains uninitialised byte(s)
+ ...
+
+Syscall param sem_unlink(name) points to unaddressable byte(s)
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+273: __NR_sem_post 1s 0m
+-----------------------------------------------------
+
+Syscall param sem_post(sem) contains uninitialised byte(s)
+ ...
+-----------------------------------------------------
+420:__NR_sem_wait_nocancel 1s 0m
+-----------------------------------------------------
+
+Syscall param sem_wait_nocancel(sem) contains uninitialised byte(s)
+ ...
+-----------------------------------------------------
9999: 9999 1e
-----------------------------------------------------
WARNING: unhandled syscall: 1660954383
|
|
From: Nicholas N. <n.n...@gm...> - 2009-03-13 04:47:58
|
Hi,
Currently we print out stack traces in various possible forms:
at 0x80483BF: really (malloc1.c:20)
at 0x80483BF: really (in /foo/a.out)
at 0x80483BF: really
at 0x80483BF: (within /foo/a.out)
at 0x80483BF: ??? (malloc1.c:20)
at 0x80483BF: ???
The inconsistency is annoying. Why sometimes have "???" for the function but
sometimes nothing? Why sometimes 'in' for an object file and sometimes
'within'? I think it's because nobody really ever thought about it, and the
control flow of the responsible code (in debuginfo.c/VG_(describe_IP)) is
ugly.
A more consistent form would be:
at 0x80483BF: really (malloc1.c:20)
at 0x80483BF: really (in /foo/a.out)
at 0x80483BF: really (in ???)
at 0x80483BF: ??? (in /foo/a.out)
at 0x80483BF: ??? (malloc1.c:20)
at 0x80483BF: ??? (in ???)
The last line is a little ugly, so we can do this instead:
at 0x80483BF: ???
The attached patch does this. All the regtests still pass. XML
output isn't affected.
Thoughts?
Nick
|