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
(8) |
2
(2) |
3
(1) |
4
(2) |
|
5
(1) |
6
(4) |
7
(6) |
8
(5) |
9
(3) |
10
(5) |
11
(1) |
|
12
(6) |
13
(4) |
14
(1) |
15
(4) |
16
(1) |
17
|
18
|
|
19
|
20
|
21
(2) |
22
(28) |
23
(17) |
24
(6) |
25
(4) |
|
26
(2) |
27
(2) |
28
|
29
(5) |
30
(8) |
31
(14) |
|
|
From: <sv...@va...> - 2015-07-29 14:03:09
|
Author: florian
Date: Wed Jul 29 15:03:00 2015
New Revision: 15455
Log:
Non-functional change; comments mostly.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c Wed Jul 29 15:03:00 2015
@@ -515,8 +515,8 @@
return ML_(am_get_segname)( seg->fnIdx );
}
-/* Binary search the interval array for a given address. Since the
- array covers the entire address space the search cannot fail. The
+/* Binary search the segment tree for a given address. Since the
+ tree covers the entire address space the search cannot fail. The
_WRK function does the real work. Its caller (just below) caches
the results thereof, to save time. With N_CACHE of 63 we get a hit
rate exceeding 90% when running OpenOffice.
@@ -548,6 +548,7 @@
}
}
+/* This function never returns NULL */
NSegment *ML_(am_find_segment)( Addr a )
{
# define N_CACHE 131 /*prime*/
@@ -761,7 +762,6 @@
sLo is the first address denoted by some segment and sHi is the
highest address denoted by some other segment. Returns the indices
of the lowest and highest segments in the range. */
-
static void split_segments_lo_and_hi( Addr sLo, Addr sHi,
/*OUT*/NSegment **segLo,
/*OUT*/NSegment **segHi )
@@ -784,10 +784,6 @@
}
-/* Add SEG to the collection, deleting/truncating any it overlaps.
- This deals with all the tricky cases of splitting up segments as
- needed. */
-
/* Locate the subtree X containing the interval [from:to] such that no
subtree of X contains [from:to]. This function never returns NULL. */
static NSegment *
@@ -1127,7 +1123,7 @@
if (nopost) return subtree; // return values does not matter
#endif
- DEBUG("\nPOST PROCESSING\n");
+ DEBUG("POST PROCESSING\n");
// It cannot be that both children of the subtree are leaves.
// Assume both children L and R are leaves with (L) = [p,x] and
// (R) = [x+1,q]. As L needs to contain a node [from,...] it follows
@@ -1210,6 +1206,9 @@
}
}
+/* Add SEG to the collection, deleting/truncating any it overlaps.
+ This deals with all the tricky cases of splitting up segments as
+ needed. */
void ML_(am_add_segment)( const NSegment *seg )
{
DEBUG("adding segment "INTERVAL_FMT"\n", seg->start, seg->end);
|
|
From: Bart V. A. <bva...@ac...> - 2015-07-29 02:40:10
|
On 07/27/15 08:52, Ivo Raisr wrote: > 2015-07-27 16:58 GMT+02:00 Will Schmidt <wil...@vn... > <mailto:wil...@vn...>>: > > On Sat, 2015-07-25 at 14:18 +1000, Rhys Kidd wrote: > > Not all systems put true in /bin hence there are issues on Darwin > with > > the introduction of this line to configure.ac <http://configure.ac> > > > > + if `LD_SHOW_AUXV=1 /bin/true | grep ^AT_HWCAP | grep -q -w > > ${AUXV_CHECK_FOR}` > > > > > > > > Can you confirm if the below quick hack job continues to work > > selecting the right PPC HW capabilities? > > > For the LD_SHOW_AUXV=1 component to work, we do need to specify a binary > version of true. It will otherwise use the shell built-in which doesn't > trigger the loader (LD_*)... > > Something like the following would be a compromise that should work OK > for power. Would that also be OK for other Darwin and other platforms? > Alternatively, could probably try to wrap the entire thing in a uname > check.. > > TRUE_BIN=`which true` > if `LD_SHOW_AUXV=1 ${TRUE_BIN} | grep ^AT_HWCAP | grep -q -w > ${AUXV_CHECK_FOR}` > > > For Solaris it's ok. > Note that these checks are not used on Solaris/illumos at all. Please have a look at the configure.ac changes in r15452. Bart. |
|
From: Ivo R. <ivo...@gm...> - 2015-07-27 15:52:48
|
2015-07-27 16:58 GMT+02:00 Will Schmidt <wil...@vn...>:
> On Sat, 2015-07-25 at 14:18 +1000, Rhys Kidd wrote:
> > Not all systems put true in /bin hence there are issues on Darwin with
> > the introduction of this line to configure.ac
> >
> > + if `LD_SHOW_AUXV=1 /bin/true | grep ^AT_HWCAP | grep -q -w
> > ${AUXV_CHECK_FOR}`
> >
> >
> >
> > Can you confirm if the below quick hack job continues to work
> > selecting the right PPC HW capabilities?
>
>
> For the LD_SHOW_AUXV=1 component to work, we do need to specify a binary
> version of true. It will otherwise use the shell built-in which doesn't
> trigger the loader (LD_*)...
>
> Something like the following would be a compromise that should work OK
> for power. Would that also be OK for other Darwin and other platforms?
> Alternatively, could probably try to wrap the entire thing in a uname
> check..
>
> TRUE_BIN=`which true`
> if `LD_SHOW_AUXV=1 ${TRUE_BIN} | grep ^AT_HWCAP | grep -q -w
> ${AUXV_CHECK_FOR}`
>
>
For Solaris it's ok.
Note that these checks are not used on Solaris/illumos at all.
I.
|
|
From: Will S. <wil...@vn...> - 2015-07-27 14:58:48
|
On Sat, 2015-07-25 at 14:18 +1000, Rhys Kidd wrote:
> Not all systems put true in /bin hence there are issues on Darwin with
> the introduction of this line to configure.ac
>
> + if `LD_SHOW_AUXV=1 /bin/true | grep ^AT_HWCAP | grep -q -w
> ${AUXV_CHECK_FOR}`
>
>
>
> Can you confirm if the below quick hack job continues to work
> selecting the right PPC HW capabilities?
For the LD_SHOW_AUXV=1 component to work, we do need to specify a binary
version of true. It will otherwise use the shell built-in which doesn't
trigger the loader (LD_*)...
Something like the following would be a compromise that should work OK
for power. Would that also be OK for other Darwin and other platforms?
Alternatively, could probably try to wrap the entire thing in a uname
check..
TRUE_BIN=`which true`
if `LD_SHOW_AUXV=1 ${TRUE_BIN} | grep ^AT_HWCAP | grep -q -w
${AUXV_CHECK_FOR}`
>
> We are letting $PATH work for us with this change. For reference on
> Darwin the location is:
>
> $ which true
> /usr/bin/true
>
>
>
> Regards,
>
> Rhys
>
> -----
> Index: configure.ac
> ===================================================================
> --- configure.ac (revision 15449)
> +++ configure.ac (working copy)
> @@ -1350,7 +1350,7 @@
> AC_DEFUN([AC_HWCAP_CONTAINS_FLAG],[
> AUXV_CHECK_FOR=$1
> AC_MSG_CHECKING([if AT_HWCAP contains the $AUXV_CHECK_FOR
> indicator])
> - if `LD_SHOW_AUXV=1 /bin/true | grep ^AT_HWCAP | grep -q -w
> ${AUXV_CHECK_FOR}`
> + if `LD_SHOW_AUXV=1 true | grep ^AT_HWCAP | grep -q -w
> ${AUXV_CHECK_FOR}`
> then
> AC_MSG_RESULT([yes])
> AC_SUBST([$2],[yes])
>
>
>
>
> On 21 July 2015 at 07:25, <sv...@va...> wrote:
> Author: carll
> Date: Mon Jul 20 22:25:32 2015
> New Revision: 15423
>
> Log:
> Patch 4 and 5 of 7, improve PPC HW capabiltiy checking.
>
> The patch was submitted by Will Schmidt
> (wil...@vn...).
>
> Patches 4 and 5 need to be applied together. Add convenience
> function
> for processing hwcap entries. Add logic to check for HTM
> support in compiler.
>
> Bugzilla 34979
>
> Modified:
> trunk/configure.ac
> trunk/none/tests/ppc32/Makefile.am
> trunk/none/tests/ppc64/Makefile.am
> trunk/none/tests/ppc64/test_tm.c
> trunk/none/tests/ppc64/test_touch_tm.c
>
> Modified: trunk/configure.ac
> ==============================================================================
> --- trunk/configure.ac (original)
> +++ trunk/configure.ac Mon Jul 20 22:25:32 2015
> @@ -1264,6 +1264,28 @@
> [],
> [#include <pthread.h>])
>
> +# Convenience function. Set flags based on the existing
> HWCAP entries.
> +# The AT_HWCAP entries are generated by glibc, and are based
> on
> +# functions supported by the hardware/system/libc.
> +# Subsequent support for whether the capability will actually
> be utilized
> +# will also be checked against the compiler capabilities.
> +# called as
> +#
> AC_HWCAP_CONTAINS_FLAG[hwcap_string_to_match],[VARIABLE_TO_SET]
> +AC_DEFUN([AC_HWCAP_CONTAINS_FLAG],[
> + AUXV_CHECK_FOR=$1
> + AC_MSG_CHECKING([if AT_HWCAP contains the $AUXV_CHECK_FOR
> indicator])
> + if `LD_SHOW_AUXV=1 /bin/true | grep ^AT_HWCAP | grep -q -w
> ${AUXV_CHECK_FOR}`
> + then
> + AC_MSG_RESULT([yes])
> + AC_SUBST([$2],[yes])
> + else
> + AC_MSG_RESULT([no])
> + AC_SUBST([$2],[])
> + fi
> +])
> +
> +# gather hardware capabilities. (hardware/kernel/libc)
> +AC_HWCAP_CONTAINS_FLAG([htm],[HWCAP_HAS_HTM])
>
> # does this compiler support -maltivec and does it have the
> include file
> # <altivec.h> ?
> @@ -1386,6 +1408,42 @@
>
> AM_CONDITIONAL(HAS_ISA_2_07, test x$ac_asm_have_isa_2_07 =
> xyes)
>
> +# HTM (Hardware Transactional Memory)
> +AC_MSG_CHECKING([if compiler accepts the -mhtm flag])
> +safe_CFLAGS=$CFLAGS
> +CFLAGS="-mhtm -Werror"
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> +]], [[
> + return 0;
> +]])], [
> +AC_MSG_RESULT([yes])
> +ac_compiler_supports_htm=yes
> +], [
> +AC_MSG_RESULT([no])
> +ac_compiler_supports_htm=no
> +])
> +CFLAGS=$safe_CFLAGS
> +
> +AC_MSG_CHECKING([if compiler can find the htm builtins])
> +safe_CFLAGS=$CFLAGS
> +CFLAGS="-mhtm -Werror"
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> + ]], [[
> + if (__builtin_tbegin (0))
> + __builtin_tend (0);
> + ]])], [
> + AC_MSG_RESULT([yes])
> +ac_compiler_sees_htm_builtins=yes
> + ], [
> + AC_MSG_RESULT([no])
> +ac_compiler_sees_htm_builtins=no
> + ])
> +CFLAGS=$safe_CFLAGS
> +
> +AM_CONDITIONAL(SUPPORTS_HTM, test x$ac_compiler_supports_htm
> = xyes \
> + -a x
> $ac_compiler_sees_htm_builtins = xyes \
> + -a x$HWCAP_HAS_HTM = xyes )
> +
> # Check for pthread_create@GLIBC2.0
> AC_MSG_CHECKING([for pthread_create@GLIBC2.0()])
>
>
> Modified: trunk/none/tests/ppc32/Makefile.am
> ==============================================================================
> --- trunk/none/tests/ppc32/Makefile.am (original)
> +++ trunk/none/tests/ppc32/Makefile.am Mon Jul 20 22:25:32
> 2015
> @@ -99,13 +99,17 @@
> endif
>
> if HAS_ISA_2_07
> -BUILD_FLAGS_ISA_2_07 = -mhtm -mcpu=power8
> +BUILD_FLAGS_ISA_2_07 = -mcpu=power8
> ISA_2_07_FLAG = -DHAS_ISA_2_07
> else
> BUILD_FLAGS_ISA_2_07 =
> ISA_2_07_FLAG =
> endif
>
> +if SUPPORTS_HTM
> +HTM_FLAG = -mhtm -DSUPPORTS_HTM
> +endif
> +
> jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g
> -mregnames \
> @FLAG_M32@ $(ALTIVEC_FLAG)
> $(BUILD_FLAG_ALTIVEC)
>
> @@ -141,9 +145,9 @@
> test_isa_2_07_part2_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O
> -g -mregnames $(ISA_2_07_FLAG) \
> @FLAG_M32@ $(BUILD_FLAGS_ISA_2_07)
>
> -test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(ISA_2_07_FLAG) \
> +test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(HTM_FLAG) $(ISA_2_07_FLAG) \
> @FLAG_M32@ $(BUILD_FLAGS_ISA_2_07)
> -test_touch_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g
> -mregnames $(ISA_2_07_FLAG) \
> +test_touch_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g
> -mregnames $(HTM_FLAG) $(ISA_2_07_FLAG) \
> @FLAG_M32@ $(BUILD_FLAGS_ISA_2_07)
>
> test_isa_2_06_part3_LDADD = -lm
>
> Modified: trunk/none/tests/ppc64/Makefile.am
> ==============================================================================
> --- trunk/none/tests/ppc64/Makefile.am (original)
> +++ trunk/none/tests/ppc64/Makefile.am Mon Jul 20 22:25:32
> 2015
> @@ -75,13 +75,17 @@
> endif
>
> if HAS_ISA_2_07
> -BUILD_FLAGS_ISA_2_07 = -mhtm -mcpu=power8
> +BUILD_FLAGS_ISA_2_07 = -mcpu=power8
> ISA_2_07_FLAG = -DHAS_ISA_2_07
> else
> BUILD_FLAGS_ISA_2_07 =
> ISA_2_07_FLAG =
> endif
>
> +if SUPPORTS_HTM
> +HTM_FLAG = -mhtm -DSUPPORTS_HTM
> +endif
> +
> test_isa_2_06_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O
> -g -mregnames $(VSX_FLAG) \
> @FLAG_M64@ $(ALTIVEC_FLAG)
> $(BUILD_FLAG_VSX)
>
> @@ -114,9 +118,9 @@
> test_isa_2_07_part2_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O
> -g -mregnames $(ISA_2_07_FLAG) \
> @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07)
>
> -test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(ISA_2_07_FLAG) \
> +test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(HTM_FLAG) $(ISA_2_07_FLAG) \
> @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07)
> -test_touch_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g
> -mregnames $(ISA_2_07_FLAG) \
> +test_touch_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g
> -mregnames $(HTM_FLAG) $(ISA_2_07_FLAG) \
> @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07)
>
> test_isa_2_06_part3_LDADD = -lm
>
> Modified: trunk/none/tests/ppc64/test_tm.c
> ==============================================================================
> --- trunk/none/tests/ppc64/test_tm.c (original)
> +++ trunk/none/tests/ppc64/test_tm.c Mon Jul 20 22:25:32 2015
> @@ -1,5 +1,5 @@
> #include <stdio.h>
> -#ifdef HAS_ISA_2_07
> +#ifdef SUPPORTS_HTM
> int __attribute__ ((noinline)) htm_begin (int r3, int r4)
> {
> int ret;
> @@ -14,10 +14,12 @@
> #endif
>
> int main (void) {
> -#ifdef HAS_ISA_2_07
> +#ifdef SUPPORTS_HTM
> int ret;
> ret = htm_begin (10, 20);
> printf ("ret = %d, expected = 10\n", ret);
> +#else
> + printf ("No HTM support.");
> #endif
> return 0;
> }
>
> Modified: trunk/none/tests/ppc64/test_touch_tm.c
> ==============================================================================
> --- trunk/none/tests/ppc64/test_touch_tm.c (original)
> +++ trunk/none/tests/ppc64/test_touch_tm.c Mon Jul 20 22:25:32
> 2015
> @@ -1,7 +1,7 @@
> #include <stdio.h>
>
> int main (void) {
> -#ifdef HAS_ISA_2_07
> +#ifdef SUPPORTS_HTM
> /* Just get the compiler to generate each of the TM
> instructions
> * so we can verify that valgrind recognizes them.
> * For now, only the tbegin instruction does anything in
> valgrind.
> @@ -18,6 +18,8 @@
> __builtin_trechkpt (); // not recognized by early HW
> __builtin_treclaim (0); // not recognized by early HW
> __builtin_tsr (0);
> +#else
> + printf ("No HTM support.");
> #endif
> return 0;
> }
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and
> support that
> you need to offload your IT needs and focus on growing your
> business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
>
>
|
|
From: <sv...@va...> - 2015-07-26 05:52:30
|
Author: rhyskidd
Date: Sun Jul 26 06:52:21 2015
New Revision: 15454
Log:
Fix memcheck/tests/darwin/aio on OS X.
n-i-bz
On OS X 10.10
Before:
== 593 tests, 214 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
After:
== 593 tests, 213 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
Modified:
trunk/memcheck/tests/darwin/aio.c
trunk/memcheck/tests/darwin/aio.stderr.exp
Modified: trunk/memcheck/tests/darwin/aio.c
==============================================================================
--- trunk/memcheck/tests/darwin/aio.c (original)
+++ trunk/memcheck/tests/darwin/aio.c Sun Jul 26 06:52:21 2015
@@ -14,6 +14,7 @@
struct aiocb a;
struct sigevent s;
+ memset(&a, 0, sizeof(struct aiocb));
// Not sure if the sigevent is even looked at by aio_*... just zero it.
memset(&s, 0, sizeof(struct sigevent));
Modified: trunk/memcheck/tests/darwin/aio.stderr.exp
==============================================================================
--- trunk/memcheck/tests/darwin/aio.stderr.exp (original)
+++ trunk/memcheck/tests/darwin/aio.stderr.exp Sun Jul 26 06:52:21 2015
@@ -1,14 +1,16 @@
Warning: invalid file descriptor -1 in syscall aio_read()
Syscall param aio_read(aiocbp->aio_buf) points to unaddressable byte(s)
- ...
+ at 0x........: aio_read (in /...libc...)
+ by 0x........: main (aio.c:45)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (aio.c:55)
+ at 0x........: main (aio.c:56)
Syscall param aio_write(aiocbp->aio_buf) points to unaddressable byte(s)
- ...
+ at 0x........: aio_write (in /...libc...)
+ by 0x........: main (aio.c:70)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
|
From: <sv...@va...> - 2015-07-26 04:26:16
|
Author: rhyskidd
Date: Sun Jul 26 05:26:06 2015
New Revision: 15453
Log:
Clean up some bit rot within memcheck/tests/darwin/scalar. n-i-bz.
Modified:
trunk/memcheck/tests/darwin/scalar.stderr.exp
Modified: trunk/memcheck/tests/darwin/scalar.stderr.exp
==============================================================================
--- trunk/memcheck/tests/darwin/scalar.stderr.exp (original)
+++ trunk/memcheck/tests/darwin/scalar.stderr.exp Sun Jul 26 05:26:06 2015
@@ -9,18 +9,23 @@
-----------------------------------------------------
Syscall param (syscallno) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:31)
Syscall param read(fd) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:31)
Syscall param read(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:31)
Syscall param read(count) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:31)
Syscall param read(buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:31)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -28,15 +33,19 @@
-----------------------------------------------------
Syscall param write(fd) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:34)
Syscall param write(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:34)
Syscall param write(count) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:34)
Syscall param write(buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:34)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -44,12 +53,15 @@
-----------------------------------------------------
Syscall param open(filename) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:38)
Syscall param open(flags) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:38)
Syscall param open(filename) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:38)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -69,22 +81,28 @@
-----------------------------------------------------
Syscall param wait4(pid) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:49)
Syscall param wait4(status) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:49)
Syscall param wait4(options) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:49)
Syscall param wait4(rusage) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:49)
Syscall param wait4(status) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:49)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param wait4(rusage) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:49)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -95,16 +113,20 @@
-----------------------------------------------------
Syscall param link(oldpath) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:54)
Syscall param link(newpath) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:54)
Syscall param link(oldpath) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:54)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param link(newpath) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:54)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -112,9 +134,11 @@
-----------------------------------------------------
Syscall param unlink(pathname) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:57)
Syscall param unlink(pathname) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:57)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -125,9 +149,11 @@
-----------------------------------------------------
Syscall param chdir(path) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:62)
Syscall param chdir(path) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:62)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -141,15 +167,19 @@
-----------------------------------------------------
Syscall param mknod(pathname) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:68)
Syscall param mknod(mode) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:68)
Syscall param mknod(dev) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:68)
Syscall param mknod(pathname) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:68)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -157,12 +187,15 @@
-----------------------------------------------------
Syscall param chmod(path) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:71)
Syscall param chmod(mode) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:71)
Syscall param chmod(path) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:71)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -170,15 +203,19 @@
-----------------------------------------------------
Syscall param chown(path) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:74)
Syscall param chown(owner) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:74)
Syscall param chown(group) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:74)
Syscall param chown(path) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:74)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -189,15 +226,19 @@
-----------------------------------------------------
Syscall param getfsstat(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:79)
Syscall param getfsstat(bufsize) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:79)
Syscall param getfsstat(flags) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:79)
Syscall param getfsstat(buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:79)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -256,15 +297,19 @@
-----------------------------------------------------
Syscall param mincore(start) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:165)
Syscall param mincore(length) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:165)
Syscall param mincore(vec) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:165)
Syscall param mincore(vec) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:165)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -272,9 +317,11 @@
-----------------------------------------------------
Syscall param setpgid(pid) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:172)
Syscall param setpgid(pgid) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:172)
-----------------------------------------------------
(78): old wait
@@ -308,21 +355,27 @@
-----------------------------------------------------
Syscall param setsockopt(s) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:213)
Syscall param setsockopt(level) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:213)
Syscall param setsockopt(optname) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:213)
Syscall param setsockopt(optval) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:213)
Syscall param setsockopt(optlen) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:213)
Syscall param socketcall.setsockopt(optval) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:213)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -357,22 +410,28 @@
-----------------------------------------------------
Syscall param getsockopt(s) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:242)
Syscall param getsockopt(level) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:242)
Syscall param getsockopt(optname) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:242)
Syscall param getsockopt(optval) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:242)
Syscall param getsockopt(optlen) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:242)
Syscall param socketcall.getsockopt(optlen) points to unaddressable byte(s)
...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
+ by 0x........: main (scalar.c:242)
+ Address 0x........ is 0 bytes after a block of size 8 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (scalar.c:14)
@@ -393,11 +452,11 @@
-----------------------------------------------------
Syscall param mkfifo(mode) contains uninitialised byte(s)
...
- by 0x........: main (in ./scalar)
+ by 0x........: main (scalar.c:265)
Syscall param mkfifo(path) points to unaddressable byte(s)
...
- by 0x........: main (in ./scalar)
+ by 0x........: main (scalar.c:265)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -445,22 +504,28 @@
-----------------------------------------------------
Syscall param mount(type) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:323)
Syscall param mount(dir) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:323)
Syscall param mount(flags) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:323)
Syscall param mount(data) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:323)
Syscall param mount(type) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:323)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param mount(dir) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:323)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -471,18 +536,23 @@
-----------------------------------------------------
Syscall param csops(pid) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:328)
Syscall param csops(ops) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:328)
Syscall param csops(useraddr) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:328)
Syscall param csops(usersize) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:328)
Syscall param csops(useraddr) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:328)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -517,19 +587,24 @@
-----------------------------------------------------
Syscall param exchangedata(path1) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:398)
Syscall param exchangedata(path2) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:398)
Syscall param exchangedata(options) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:398)
Syscall param exchangedata(path1) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:398)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param exchangedata(path2) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:398)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -549,27 +624,34 @@
-----------------------------------------------------
Syscall param shmat(shmid) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:447)
Syscall param shmat(shmaddr) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:447)
Syscall param shmat(shmflg) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:447)
-----------------------------------------------------
x2000107(263): __NR_shmctl 3s 1m
-----------------------------------------------------
Syscall param shmctl(shmid) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:450)
Syscall param shmctl(cmd) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:450)
Syscall param shmctl(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:450)
Syscall param shmctl(IPC_STAT, buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:450)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -583,24 +665,30 @@
-----------------------------------------------------
Syscall param shmget(key) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:456)
Syscall param shmget(size) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:456)
Syscall param shmget(shmflg) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:456)
-----------------------------------------------------
x200010c(268): __NR_sem_open 2s 1m
-----------------------------------------------------
Syscall param sem_open(name) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:462)
Syscall param sem_open(oflag) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:462)
Syscall param sem_open(name) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:462)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -623,9 +711,11 @@
-----------------------------------------------------
Syscall param sem_unlink(name) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:472)
Syscall param sem_unlink(name) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:472)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -649,20 +739,21 @@
-----------------------------------------------------
x2000113(275): __NR_sem_init 3s 1m
-----------------------------------------------------
-
-More than 100 errors detected. Subsequent errors
-will still be recorded, but in less detail than before.
Syscall param sem_init(sem) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:486)
Syscall param sem_init(pshared) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:486)
Syscall param sem_init(value) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:486)
Syscall param sem_init(sem) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:486)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -670,9 +761,11 @@
-----------------------------------------------------
Syscall param sem_destroy(sem) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:489)
Syscall param sem_destroy(sem) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:489)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -680,30 +773,48 @@
-----------------------------------------------------
Syscall param stat_extended(file_name) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:497)
Syscall param stat_extended(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:497)
Syscall param stat_extended(fsacl) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:497)
Syscall param stat_extended(fsacl_size) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:497)
Syscall param stat_extended(file_name) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:497)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param stat_extended(buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:497)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param stat_extended(fsacl_size) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:497)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param stat_extended(file_name) points to unaddressable byte(s)
+ ...
+ by 0x........: main (scalar.c:500)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param stat_extended(buf) points to unaddressable byte(s)
+ ...
+ by 0x........: main (scalar.c:500)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param stat_extended(fsacl) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:500)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -711,30 +822,48 @@
-----------------------------------------------------
Syscall param lstat_extended(file_name) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:503)
Syscall param lstat_extended(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:503)
Syscall param lstat_extended(fsacl) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:503)
Syscall param lstat_extended(fsacl_size) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:503)
Syscall param lstat_extended(file_name) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:503)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param lstat_extended(buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:503)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param lstat_extended(fsacl_size) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:503)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param lstat_extended(file_name) points to unaddressable byte(s)
+ ...
+ by 0x........: main (scalar.c:506)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param lstat_extended(buf) points to unaddressable byte(s)
+ ...
+ by 0x........: main (scalar.c:506)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param lstat_extended(fsacl) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:506)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -742,26 +871,48 @@
-----------------------------------------------------
Syscall param fstat_extended(fd) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:509)
Syscall param fstat_extended(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:509)
Syscall param fstat_extended(fsacl) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:509)
Syscall param fstat_extended(fsacl_size) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:509)
+
+Syscall param fstat_extended(fd) points to unaddressable byte(s)
+ ...
+ by 0x........: main (scalar.c:509)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param fstat_extended(buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:509)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param fstat_extended(fsacl_size) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:509)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param fstat_extended(fd) points to unaddressable byte(s)
+ ...
+ by 0x........: main (scalar.c:512)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param fstat_extended(buf) points to unaddressable byte(s)
+ ...
+ by 0x........: main (scalar.c:512)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param fstat_extended(fsacl) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:512)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -769,18 +920,23 @@
-----------------------------------------------------
Syscall param access_extended(entries) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:521)
Syscall param access_extended(size) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:521)
Syscall param access_extended(results) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:521)
Syscall param access_extended(uid) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:521)
Syscall param access_extended(entries) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:521)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -809,15 +965,19 @@
-----------------------------------------------------
Syscall param aio_suspend(aiocbp) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:563)
Syscall param aio_suspend(nent) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:563)
Syscall param aio_suspend(timeout) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:563)
Syscall param aio_suspend(list) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:563)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -831,9 +991,11 @@
-----------------------------------------------------
Syscall param aio_read(aiocbp) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:571)
Syscall param aio_read(aiocbp) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:571)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -841,9 +1003,11 @@
-----------------------------------------------------
Syscall param aio_write(aiocbp) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:574)
Syscall param aio_write(aiocbp) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:574)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -857,18 +1021,22 @@
-----------------------------------------------------
Syscall param __pthread_kill(thread) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:590)
Syscall param __pthread_kill(sig) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:590)
-----------------------------------------------------
x2000149(329):__NR___pthread_sigmask 3s 0m
-----------------------------------------------------
Syscall param __pthread_sigmask(set) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:593)
Syscall param __pthread_sigmask(oldset) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:593)
-----------------------------------------------------
(335): old utrace
@@ -878,30 +1046,38 @@
-----------------------------------------------------
Syscall param stat64_extended(file_name) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:613)
Syscall param stat64_extended(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:613)
Syscall param stat64_extended(fsacl) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:613)
Syscall param stat64_extended(fsacl_size) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:613)
Syscall param stat64_extended(file_name) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:613)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param stat64_extended(buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:613)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param stat64_extended(fsacl_size) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:613)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param stat64_extended(fsacl) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:616)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -909,30 +1085,38 @@
-----------------------------------------------------
Syscall param lstat64_extended(file_name) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:619)
Syscall param lstat64_extended(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:619)
Syscall param lstat64_extended(fsacl) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:619)
Syscall param lstat64_extended(fsacl_size) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:619)
Syscall param lstat64_extended(file_name) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:619)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param lstat64_extended(buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:619)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param lstat64_extended(fsacl_size) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:619)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param lstat64_extended(fsacl) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:622)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -940,26 +1124,33 @@
-----------------------------------------------------
Syscall param fstat64_extended(fd) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:625)
Syscall param fstat64_extended(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:625)
Syscall param fstat64_extended(fsacl) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:625)
Syscall param fstat64_extended(fsacl_size) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:625)
Syscall param fstat64_extended(buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:625)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param fstat64_extended(fsacl_size) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:625)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param fstat64_extended(fsacl) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:628)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -967,15 +1158,19 @@
-----------------------------------------------------
Syscall param getfsstat64(buf) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:637)
Syscall param getfsstat64(bufsize) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:637)
Syscall param getfsstat64(flags) contains uninitialised byte(s)
...
+ by 0x........: main (scalar.c:637)
Syscall param getfsstat64(buf) points to unaddressable byte(s)
...
+ by 0x........: main (scalar.c:637)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
@@ -984,7 +1179,7 @@
-----------------------------------------------------
x270f(9999): 9999 1e
-----------------------------------------------------
-WARNING: unhandled syscall: unix:9999
+WARNING: unhandled amd64-darwin syscall: unix:9999
You may be able to write your own handler.
Read the file README_MISSING_SYSCALL_OR_IOCTL.
Nevertheless we consider this a bug. Please report
|
|
From: <sv...@va...> - 2015-07-25 14:31:10
|
Author: bart
Date: Sat Jul 25 15:31:02 2015
New Revision: 15452
Log:
configure.ac: Improve portability of the code introduced in r15423
Modified:
trunk/configure.ac
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Jul 25 15:31:02 2015
@@ -1350,7 +1350,7 @@
AC_DEFUN([AC_HWCAP_CONTAINS_FLAG],[
AUXV_CHECK_FOR=$1
AC_MSG_CHECKING([if AT_HWCAP contains the $AUXV_CHECK_FOR indicator])
- if `LD_SHOW_AUXV=1 /bin/true | grep ^AT_HWCAP | grep -q -w ${AUXV_CHECK_FOR}`
+ if LD_SHOW_AUXV=1 `which true` | grep ^AT_HWCAP | grep -q -w ${AUXV_CHECK_FOR}
then
AC_MSG_RESULT([yes])
AC_SUBST([$2],[yes])
|
|
From: <sv...@va...> - 2015-07-25 07:58:02
|
Author: rhyskidd
Date: Sat Jul 25 08:57:55 2015
New Revision: 15451
Log:
ioctl handling needs to do POST handling on generic ioctls and needs to handle BPF ioctls
bz#312989
Patch by Guy Harris <gu...@al...>
On OS X 10.10
Before:
== 593 tests, 214 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
After:
== 593 tests, 214 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/syswrap-darwin.c
trunk/include/vki/vki-darwin.h
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sat Jul 25 08:57:55 2015
@@ -121,6 +121,8 @@
302630 Memcheck on multithreaded program fails with Assertion
'sizeof(UWord) == sizeof(UInt)' failed in m_syscall.c
== 326797
+312989 ioctl handling needs to do POST handling on generic ioctls and
+ needs to handle BPF ioctls
319274 Fix unhandled syscall: unix:410 (sigsuspend_nocancel) on OS X
324181 mmap does not handle MAP_32BIT (handle it now, rather than fail it)
327745 Fix valgrind 3.9.0 build fails on Mac OS X 10.6.8
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Sat Jul 25 08:57:55 2015
@@ -1106,6 +1106,8 @@
case VKI_TIOCPTYGRANT:
case VKI_TIOCPTYUNLK:
case VKI_DTRACEHIOC_REMOVE:
+ case VKI_BIOCFLUSH:
+ case VKI_BIOCPROMISC:
PRINT("ioctl ( %ld, 0x%lx )",ARG1,ARG2);
PRE_REG_READ2(long, "ioctl",
unsigned int, fd, unsigned int, request);
@@ -1291,6 +1293,71 @@
case VKI_FIONCLEX:
break;
+ // net/bpf.h
+ case VKI_BIOCSETF: /* set BPF filter */
+ /*
+ * struct bpf_program has a 32-bit count of instructions,
+ * followed by a pointer to an array of those instructions.
+ * In 64-bit mode, there's padding between those two elements.
+ *
+ * So that we don't bogusly complain about the padding bytes,
+ * we just report that we read bf_len and and bf_insns.
+ *
+ * We then make sure that what bf_insns points to is valid.
+ */
+ PRE_MEM_READ( "ioctl(BIOCSETF)",
+ (Addr)&((struct vki_bpf_program *)ARG3)->vki_bf_len,
+ sizeof(((struct vki_bpf_program *)ARG3)->vki_bf_len) );
+ PRE_MEM_READ( "ioctl(BIOCSETF)",
+ (Addr)&((struct vki_bpf_program *)ARG3)->vki_bf_insns,
+ sizeof(((struct vki_bpf_program *)ARG3)->vki_bf_insns) );
+ if ( ARG3 ) {
+ /* bf_len * sizeof (*bf_insns) */
+ struct vki_bpf_program *bp = (struct vki_bpf_program *)ARG3;
+ if ( bp->bf_insns != NULL )
+ PRE_MEM_READ( "ioctl(BIOCSETF) points to a struct bpf_program whose bf_insns member",
+ (Addr)(bp->vki_bf_insns),
+ bp->vki_bf_len * sizeof(*bp->vki_bf_insns) );
+ }
+ break;
+ case VKI_BIOCSETIF: /* set BPF interface */
+ PRE_MEM_RASCIIZ( "ioctl(BIOCSETIF)",
+ (Addr)((struct vki_ifreq *)ARG3)->vki_ifr_name );
+ break;
+ case VKI_BIOCSRTIMEOUT: /* set BPF timeout */
+ /*
+ * 64-bit struct timeval starts with a 64-bit "seconds since the
+ * Epoch" value, followed by a 32-bit microseconds value. The
+ * resulting structure is padded to a multiple of 8 bytes, so
+ * there are 4 padding bytes at the end.
+ *
+ * So that we don't bogusly complain about the padding bytes,
+ * we just report that we read tv_sec and tv_usec.
+ */
+ PRE_MEM_READ( "ioctl(BIOCSRTIMEOUT)",
+ (Addr)&((struct vki_timeval *)ARG3)->vki_tv_sec,
+ sizeof(((struct vki_timeval *)ARG3)->vki_tv_sec) );
+ PRE_MEM_READ( "ioctl(BIOCSRTIMEOUT)",
+ (Addr)&((struct vki_timeval *)ARG3)->vki_tv_usec,
+ sizeof(((struct vki_timeval *)ARG3)->vki_tv_usec) );
+ break;
+ case VKI_BIOCGDLTLIST: /* get list of BPF DLTs */
+ PRE_MEM_READ( "ioctl(BIOCGDLTLIST).bfl_len",
+ (Addr)&((struct vki_bpf_dltlist *)ARG3)->vki_bfl_list,
+ sizeof(((struct vki_bpf_dltlist *)ARG3)->vki_bfl_list) );
+ if ( ARG3 ) {
+ /* bfl_len * sizeof (*bfl_list) */
+ struct vki_bpf_dltlist *bdl = (struct vki_bpf_dltlist *)ARG3;
+ if ( bdl->bfl_list != NULL )
+ PRE_MEM_READ( "ioctl(BIOCGDLTLIST).bfl_len",
+ (Addr)&((struct vki_bpf_dltlist *)ARG3)->vki_bfl_len,
+ sizeof(((struct vki_bpf_dltlist *)ARG3)->vki_bfl_len) );
+ PRE_MEM_WRITE( "ioctl(BIOCGDLTLIST) points to a struct bpf_dltlist whose bfl_list member",
+ (Addr)(bdl->vki_bfl_list),
+ bdl->bfl_len * sizeof(*bdl->vki_bfl_list) );
+ }
+ break;
+
default:
ML_(PRE_unknown_ioctl)(tid, ARG2, ARG3);
break;
@@ -1417,7 +1484,19 @@
case VKI_TIOCPTYUNLK:
break;
+ // bpf.h
+ case VKI_BIOCGDLTLIST: /* get list of BPF DLTs */
+ if (RES == 0 && ARG3 ) {
+ /* bfl_len * sizeof (*bfl_list) */
+ struct vki_bpf_dltlist *bdl = (struct vki_bpf_dltlist *)ARG3;
+ if ( bdl->vki_bfl_list != NULL )
+ POST_MEM_WRITE( (Addr)(bdl->vki_bfl_list),
+ bdl->bfl_len * sizeof(*bdl->vki_bfl_list) );
+ }
+ break;
+
default:
+ ML_(POST_unknown_ioctl)(tid, RES, ARG2, ARG3);
break;
}
}
Modified: trunk/include/vki/vki-darwin.h
==============================================================================
--- trunk/include/vki/vki-darwin.h (original)
+++ trunk/include/vki/vki-darwin.h Sat Jul 25 08:57:55 2015
@@ -112,6 +112,8 @@
#define vki_timeval timeval
#define vki_timeval32 timeval32
+#define vki_tv_sec tv_sec
+#define vki_tv_usec tv_usec
#define vki_timespec timespec
#define vki_itimerval itimerval
#define vki_timezone timezone
@@ -1001,6 +1003,23 @@
#define VKI_DTRACEHIOC_ADDDOF DTRACEHIOC_ADDDOF
+#include <net/bpf.h>
+
+#define vki_bpf_program bpf_program
+#define vki_bf_len bf_len
+#define vki_bf_insns bf_insns
+#define vki_bpf_dltlist bpf_dltlist
+#define vki_bfl_len bfl_len
+#define vki_bfl_list bfl_list
+
+#define VKI_BIOCSETF BIOCSETF
+#define VKI_BIOCFLUSH BIOCFLUSH
+#define VKI_BIOCPROMISC BIOCPROMISC
+#define VKI_BIOCSETIF BIOCSETIF
+#define VKI_BIOCSRTIMEOUT BIOCSRTIMEOUT
+#define VKI_BIOCGDLTLIST BIOCGDLTLIST
+
+
#include <sys/ucontext.h>
/* quite why sys/ucontext.h provides a 'struct __darwin_ucontext'
|
|
From: <sv...@va...> - 2015-07-25 05:50:17
|
Author: rhyskidd
Date: Sat Jul 25 06:50:10 2015
New Revision: 15450
Log:
Fix clang/osx: ld: warning: -read_only_relocs cannot be used with x86_64
bz#349769
Modified:
trunk/NEWS
trunk/auxprogs/Makefile.am
trunk/cachegrind/Makefile.am
trunk/coregrind/Makefile.am
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sat Jul 25 06:50:10 2015
@@ -263,6 +263,7 @@
349087 Fix UNKNOWN task message [id 3410, to mach_task_self(),
reply 0x........] (task_set_special_port)
349626 Implemented additional Xen hypercalls
+349769 Fix clang/osx: ld: warning: -read_only_relocs cannot be used with x86_64
349874 Fix typos in source code
349828 memcpy intercepts memmove causing src/dst overlap error (ppc64 ld.so)
349941 di_notify_mmap might create wrong start/size DebugInfoMapping
Modified: trunk/auxprogs/Makefile.am
==============================================================================
--- trunk/auxprogs/Makefile.am (original)
+++ trunk/auxprogs/Makefile.am Sat Jul 25 06:50:10 2015
@@ -36,9 +36,13 @@
if VGCONF_PLATVARIANT_IS_ANDROID
valgrind_listener_CFLAGS += -static
endif
+# If there is no secondary platform, and the platforms include x86-darwin,
+# then the primary platform must be x86-darwin. Hence:
+if ! VGCONF_HAVE_PLATFORM_SEC
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
valgrind_listener_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
endif
+endif
if VGCONF_OS_IS_SOLARIS
valgrind_listener_LDADD = -lsocket -lnsl
endif
@@ -51,9 +55,13 @@
if VGCONF_PLATVARIANT_IS_ANDROID
valgrind_di_server_CFLAGS += -static
endif
+# If there is no secondary platform, and the platforms include x86-darwin,
+# then the primary platform must be x86-darwin. Hence:
+if ! VGCONF_HAVE_PLATFORM_SEC
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
valgrind_di_server_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
endif
+endif
if VGCONF_OS_IS_SOLARIS
valgrind_di_server_LDADD = -lsocket -lnsl
endif
Modified: trunk/cachegrind/Makefile.am
==============================================================================
--- trunk/cachegrind/Makefile.am (original)
+++ trunk/cachegrind/Makefile.am Sat Jul 25 06:50:10 2015
@@ -28,9 +28,13 @@
cg_merge_CFLAGS = $(AM_CFLAGS_PRI)
cg_merge_CCASFLAGS = $(AM_CCASFLAGS_PRI)
cg_merge_LDFLAGS = $(AM_CFLAGS_PRI)
+# If there is no secondary platform, and the platforms include x86-darwin,
+# then the primary platform must be x86-darwin. Hence:
+if ! VGCONF_HAVE_PLATFORM_SEC
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
cg_merge_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
endif
+endif
#----------------------------------------------------------------------------
# cachegrind-<platform>
Modified: trunk/coregrind/Makefile.am
==============================================================================
--- trunk/coregrind/Makefile.am (original)
+++ trunk/coregrind/Makefile.am Sat Jul 25 06:50:10 2015
@@ -54,9 +54,13 @@
valgrind_CFLAGS = $(AM_CFLAGS_PRI)
valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
+# If there is no secondary platform, and the platforms include x86-darwin,
+# then the primary platform must be x86-darwin. Hence:
+if ! VGCONF_HAVE_PLATFORM_SEC
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
valgrind_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
endif
+endif
# On Android we must ask for non-executable stack, not sure why.
if VGCONF_PLATVARIANT_IS_ANDROID
valgrind_CFLAGS += -static
@@ -96,9 +100,13 @@
vgdb_LDADD = -lpthread
endif
endif
+# If there is no secondary platform, and the platforms include x86-darwin,
+# then the primary platform must be x86-darwin. Hence:
+if ! VGCONF_HAVE_PLATFORM_SEC
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
vgdb_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
endif
+endif
#----------------------------------------------------------------------------
# Darwin Mach stuff
|
|
From: Rhys K. <rhy...@gm...> - 2015-07-25 04:18:55
|
Not all systems put true in /bin hence there are issues on Darwin with the
introduction of this line to configure.ac
+ if `LD_SHOW_AUXV=1 /bin/true | grep ^AT_HWCAP | grep -q -w
${AUXV_CHECK_FOR}`
Can you confirm if the below quick hack job continues to work selecting the
right PPC HW capabilities?
We are letting $PATH work for us with this change. For reference on Darwin
the location is:
$ which true
/usr/bin/true
Regards,
Rhys
-----
Index: configure.ac
===================================================================
--- configure.ac (revision 15449)
+++ configure.ac (working copy)
@@ -1350,7 +1350,7 @@
AC_DEFUN([AC_HWCAP_CONTAINS_FLAG],[
AUXV_CHECK_FOR=$1
AC_MSG_CHECKING([if AT_HWCAP contains the $AUXV_CHECK_FOR indicator])
- if `LD_SHOW_AUXV=1 /bin/true | grep ^AT_HWCAP | grep -q -w
${AUXV_CHECK_FOR}`
+ if `LD_SHOW_AUXV=1 true | grep ^AT_HWCAP | grep -q -w ${AUXV_CHECK_FOR}`
then
AC_MSG_RESULT([yes])
AC_SUBST([$2],[yes])
On 21 July 2015 at 07:25, <sv...@va...> wrote:
> Author: carll
> Date: Mon Jul 20 22:25:32 2015
> New Revision: 15423
>
> Log:
> Patch 4 and 5 of 7, improve PPC HW capabiltiy checking.
>
> The patch was submitted by Will Schmidt (wil...@vn...).
>
> Patches 4 and 5 need to be applied together. Add convenience function
> for processing hwcap entries. Add logic to check for HTM support in
> compiler.
>
> Bugzilla 34979
>
> Modified:
> trunk/configure.ac
> trunk/none/tests/ppc32/Makefile.am
> trunk/none/tests/ppc64/Makefile.am
> trunk/none/tests/ppc64/test_tm.c
> trunk/none/tests/ppc64/test_touch_tm.c
>
> Modified: trunk/configure.ac
>
> ==============================================================================
> --- trunk/configure.ac (original)
> +++ trunk/configure.ac Mon Jul 20 22:25:32 2015
> @@ -1264,6 +1264,28 @@
> [],
> [#include <pthread.h>])
>
> +# Convenience function. Set flags based on the existing HWCAP entries.
> +# The AT_HWCAP entries are generated by glibc, and are based on
> +# functions supported by the hardware/system/libc.
> +# Subsequent support for whether the capability will actually be utilized
> +# will also be checked against the compiler capabilities.
> +# called as
> +# AC_HWCAP_CONTAINS_FLAG[hwcap_string_to_match],[VARIABLE_TO_SET]
> +AC_DEFUN([AC_HWCAP_CONTAINS_FLAG],[
> + AUXV_CHECK_FOR=$1
> + AC_MSG_CHECKING([if AT_HWCAP contains the $AUXV_CHECK_FOR indicator])
> + if `LD_SHOW_AUXV=1 /bin/true | grep ^AT_HWCAP | grep -q -w
> ${AUXV_CHECK_FOR}`
> + then
> + AC_MSG_RESULT([yes])
> + AC_SUBST([$2],[yes])
> + else
> + AC_MSG_RESULT([no])
> + AC_SUBST([$2],[])
> + fi
> +])
> +
> +# gather hardware capabilities. (hardware/kernel/libc)
> +AC_HWCAP_CONTAINS_FLAG([htm],[HWCAP_HAS_HTM])
>
> # does this compiler support -maltivec and does it have the include file
> # <altivec.h> ?
> @@ -1386,6 +1408,42 @@
>
> AM_CONDITIONAL(HAS_ISA_2_07, test x$ac_asm_have_isa_2_07 = xyes)
>
> +# HTM (Hardware Transactional Memory)
> +AC_MSG_CHECKING([if compiler accepts the -mhtm flag])
> +safe_CFLAGS=$CFLAGS
> +CFLAGS="-mhtm -Werror"
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> +]], [[
> + return 0;
> +]])], [
> +AC_MSG_RESULT([yes])
> +ac_compiler_supports_htm=yes
> +], [
> +AC_MSG_RESULT([no])
> +ac_compiler_supports_htm=no
> +])
> +CFLAGS=$safe_CFLAGS
> +
> +AC_MSG_CHECKING([if compiler can find the htm builtins])
> +safe_CFLAGS=$CFLAGS
> +CFLAGS="-mhtm -Werror"
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> + ]], [[
> + if (__builtin_tbegin (0))
> + __builtin_tend (0);
> + ]])], [
> + AC_MSG_RESULT([yes])
> +ac_compiler_sees_htm_builtins=yes
> + ], [
> + AC_MSG_RESULT([no])
> +ac_compiler_sees_htm_builtins=no
> + ])
> +CFLAGS=$safe_CFLAGS
> +
> +AM_CONDITIONAL(SUPPORTS_HTM, test x$ac_compiler_supports_htm = xyes \
> + -a x$ac_compiler_sees_htm_builtins = xyes \
> + -a x$HWCAP_HAS_HTM = xyes )
> +
> # Check for pthread_create@GLIBC2.0
> AC_MSG_CHECKING([for pthread_create@GLIBC2.0()])
>
>
> Modified: trunk/none/tests/ppc32/Makefile.am
>
> ==============================================================================
> --- trunk/none/tests/ppc32/Makefile.am (original)
> +++ trunk/none/tests/ppc32/Makefile.am Mon Jul 20 22:25:32 2015
> @@ -99,13 +99,17 @@
> endif
>
> if HAS_ISA_2_07
> -BUILD_FLAGS_ISA_2_07 = -mhtm -mcpu=power8
> +BUILD_FLAGS_ISA_2_07 = -mcpu=power8
> ISA_2_07_FLAG = -DHAS_ISA_2_07
> else
> BUILD_FLAGS_ISA_2_07 =
> ISA_2_07_FLAG =
> endif
>
> +if SUPPORTS_HTM
> +HTM_FLAG = -mhtm -DSUPPORTS_HTM
> +endif
> +
> jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames \
> @FLAG_M32@ $(ALTIVEC_FLAG) $(BUILD_FLAG_ALTIVEC)
>
> @@ -141,9 +145,9 @@
> test_isa_2_07_part2_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(ISA_2_07_FLAG) \
> @FLAG_M32@ $(BUILD_FLAGS_ISA_2_07)
>
> -test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(ISA_2_07_FLAG) \
> +test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG)
> $(ISA_2_07_FLAG) \
> @FLAG_M32@ $(BUILD_FLAGS_ISA_2_07)
> -test_touch_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(ISA_2_07_FLAG) \
> +test_touch_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(HTM_FLAG) $(ISA_2_07_FLAG) \
> @FLAG_M32@ $(BUILD_FLAGS_ISA_2_07)
>
> test_isa_2_06_part3_LDADD = -lm
>
> Modified: trunk/none/tests/ppc64/Makefile.am
>
> ==============================================================================
> --- trunk/none/tests/ppc64/Makefile.am (original)
> +++ trunk/none/tests/ppc64/Makefile.am Mon Jul 20 22:25:32 2015
> @@ -75,13 +75,17 @@
> endif
>
> if HAS_ISA_2_07
> -BUILD_FLAGS_ISA_2_07 = -mhtm -mcpu=power8
> +BUILD_FLAGS_ISA_2_07 = -mcpu=power8
> ISA_2_07_FLAG = -DHAS_ISA_2_07
> else
> BUILD_FLAGS_ISA_2_07 =
> ISA_2_07_FLAG =
> endif
>
> +if SUPPORTS_HTM
> +HTM_FLAG = -mhtm -DSUPPORTS_HTM
> +endif
> +
> test_isa_2_06_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(VSX_FLAG) \
> @FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX)
>
> @@ -114,9 +118,9 @@
> test_isa_2_07_part2_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(ISA_2_07_FLAG) \
> @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07)
>
> -test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(ISA_2_07_FLAG) \
> +test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG)
> $(ISA_2_07_FLAG) \
> @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07)
> -test_touch_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(ISA_2_07_FLAG) \
> +test_touch_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames
> $(HTM_FLAG) $(ISA_2_07_FLAG) \
> @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07)
>
> test_isa_2_06_part3_LDADD = -lm
>
> Modified: trunk/none/tests/ppc64/test_tm.c
>
> ==============================================================================
> --- trunk/none/tests/ppc64/test_tm.c (original)
> +++ trunk/none/tests/ppc64/test_tm.c Mon Jul 20 22:25:32 2015
> @@ -1,5 +1,5 @@
> #include <stdio.h>
> -#ifdef HAS_ISA_2_07
> +#ifdef SUPPORTS_HTM
> int __attribute__ ((noinline)) htm_begin (int r3, int r4)
> {
> int ret;
> @@ -14,10 +14,12 @@
> #endif
>
> int main (void) {
> -#ifdef HAS_ISA_2_07
> +#ifdef SUPPORTS_HTM
> int ret;
> ret = htm_begin (10, 20);
> printf ("ret = %d, expected = 10\n", ret);
> +#else
> + printf ("No HTM support.");
> #endif
> return 0;
> }
>
> Modified: trunk/none/tests/ppc64/test_touch_tm.c
>
> ==============================================================================
> --- trunk/none/tests/ppc64/test_touch_tm.c (original)
> +++ trunk/none/tests/ppc64/test_touch_tm.c Mon Jul 20 22:25:32 2015
> @@ -1,7 +1,7 @@
> #include <stdio.h>
>
> int main (void) {
> -#ifdef HAS_ISA_2_07
> +#ifdef SUPPORTS_HTM
> /* Just get the compiler to generate each of the TM instructions
> * so we can verify that valgrind recognizes them.
> * For now, only the tbegin instruction does anything in valgrind.
> @@ -18,6 +18,8 @@
> __builtin_trechkpt (); // not recognized by early HW
> __builtin_treclaim (0); // not recognized by early HW
> __builtin_tsr (0);
> +#else
> + printf ("No HTM support.");
> #endif
> return 0;
> }
>
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
>
|
|
From: <sv...@va...> - 2015-07-24 20:48:58
|
Author: florian
Date: Fri Jul 24 21:48:51 2015
New Revision: 15449
Log:
Add more sanity checks.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c Fri Jul 24 21:48:51 2015
@@ -348,6 +348,8 @@
if (s->left == NULL) return False;
/* Both subtrees != NULL */
if (s->left == s->right) return False;
+ if (s->left == s->up) return False;
+ if (s->right == s->up) return False;
/* Check address range containment */
if (s->start != s->left->start) return False;
if (s->end != s->right->end) return False;
@@ -356,7 +358,6 @@
}
switch (s->kind) {
-
case SkFree:
return
s->smode == SmFixed
@@ -422,7 +423,6 @@
return False;
switch (s1->kind) {
-
case SkFree:
s1->end = s2->end;
return True;
|
|
From: <sv...@va...> - 2015-07-24 17:12:52
|
Author: florian
Date: Fri Jul 24 17:47:44 2015
New Revision: 15448
Log:
When deleting a node also invalidate the 'up' link.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c Fri Jul 24 17:47:44 2015
@@ -685,7 +685,7 @@
ML_(am_dec_refcount)(node->fnIdx);
/* Chain into freelist */
- node->left = node->right = NULL;
+ node->left = node->right = node->up = NULL;
node->fnIdx = ON_FREELIST;
node->left = segment_freelist;
segment_freelist = node;
|
|
From: <sv...@va...> - 2015-07-24 13:02:35
|
Author: florian
Date: Fri Jul 24 14:02:26 2015
New Revision: 15447
Log:
clone_segment returns a segment that is disconnected from the
segment tree.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c Fri Jul 24 14:02:26 2015
@@ -661,7 +661,6 @@
}
/* Clone a segment. This creates a new leaf node. */
-
static NSegment *clone_segment( const NSegment *seg )
{
aspacem_assert(is_leaf(seg));
@@ -671,6 +670,7 @@
NSegment *new = new_node();
*new = *seg;
+ new->left = new->right = new->up = NULL;
ML_(am_inc_refcount)(seg->fnIdx);
|
|
From: <sv...@va...> - 2015-07-24 12:48:11
|
Author: rhyskidd
Date: Fri Jul 24 13:47:59 2015
New Revision: 15446
Log:
Properly conditionalise these tests, now that they are guarded on certain combinations of operating system and compiler.
Modified:
trunk/none/tests/x86/insn_sse.vgtest
trunk/none/tests/x86/insn_sse2.vgtest
trunk/none/tests/x86/insn_sse3.vgtest
Modified: trunk/none/tests/x86/insn_sse.vgtest
==============================================================================
--- trunk/none/tests/x86/insn_sse.vgtest (original)
+++ trunk/none/tests/x86/insn_sse.vgtest Fri Jul 24 13:47:59 2015
@@ -1,3 +1,3 @@
prog: ../../../none/tests/x86/insn_sse
-prereq: ../../../tests/x86_amd64_features x86-sse
+prereq: ../../../tests/x86_amd64_features x86-sse && test -e ../../../none/tests/x86/insn_sse
vgopts: -q
Modified: trunk/none/tests/x86/insn_sse2.vgtest
==============================================================================
--- trunk/none/tests/x86/insn_sse2.vgtest (original)
+++ trunk/none/tests/x86/insn_sse2.vgtest Fri Jul 24 13:47:59 2015
@@ -1,3 +1,3 @@
prog: ../../../none/tests/x86/insn_sse2
-prereq: ../../../tests/x86_amd64_features x86-sse2
+prereq: ../../../tests/x86_amd64_features x86-sse2 && test -e ../../../none/tests/x86/insn_sse2
vgopts: -q
Modified: trunk/none/tests/x86/insn_sse3.vgtest
==============================================================================
--- trunk/none/tests/x86/insn_sse3.vgtest (original)
+++ trunk/none/tests/x86/insn_sse3.vgtest Fri Jul 24 13:47:59 2015
@@ -1,3 +1,3 @@
prog: ../../../none/tests/x86/insn_sse3
-prereq: ../../../tests/x86_amd64_features x86-sse3
+prereq: ../../../tests/x86_amd64_features x86-sse3 && test -e ../../../none/tests/x86/insn_sse3
vgopts: -q
|
|
From: <sv...@va...> - 2015-07-24 11:50:23
|
Author: florian
Date: Fri Jul 24 12:50:12 2015
New Revision: 15445
Log:
Remove command line options --db-attach and --db-command which were
deprecated in 3.10.0
Removed:
trunk/coregrind/m_debugger.c
trunk/coregrind/pub_core_debugger.h
Modified:
trunk/NEWS
trunk/coregrind/Makefile.am
trunk/coregrind/m_errormgr.c
trunk/coregrind/m_main.c
trunk/coregrind/m_options.c
trunk/coregrind/m_signals.c
trunk/coregrind/pub_core_gdbserver.h
trunk/coregrind/pub_core_options.h
trunk/docs/xml/manual-core.xml
trunk/include/vki/vki-solaris.h
trunk/none/tests/cmdline1.stdout.exp
trunk/none/tests/cmdline2.stdout.exp
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Jul 24 12:50:12 2015
@@ -43,6 +43,9 @@
* ==================== OTHER CHANGES ====================
+* The command line options --db-attach and --db-command have been removed.
+ They were deprecated in 3.10.0
+
* When a process dies due to a signal, Valgrind now shows the signal
and the stacktrace at default verbosity (i.e. verbosity 1).
Modified: trunk/coregrind/Makefile.am
==============================================================================
--- trunk/coregrind/Makefile.am (original)
+++ trunk/coregrind/Makefile.am Fri Jul 24 12:50:12 2015
@@ -174,7 +174,6 @@
pub_core_cpuid.h \
pub_core_deduppoolalloc.h \
pub_core_debuginfo.h \
- pub_core_debugger.h \
pub_core_debuglog.h \
pub_core_demangle.h \
pub_core_dispatch.h \
@@ -287,7 +286,6 @@
m_clientstate.c \
m_cpuid.S \
m_deduppoolalloc.c \
- m_debugger.c \
m_debuglog.c \
m_errormgr.c \
m_execontext.c \
Removed: trunk/coregrind/m_debugger.c
==============================================================================
--- trunk/coregrind/m_debugger.c (original)
+++ trunk/coregrind/m_debugger.c (removed)
@@ -1,565 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Attaching a debugger. m_debugger.c ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2013 Julian Seward
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#include "pub_core_basics.h"
-#include "pub_core_vki.h"
-#include "pub_core_threadstate.h"
-#include "pub_core_xarray.h"
-#include "pub_core_clientstate.h"
-#include "pub_core_debugger.h"
-#include "pub_core_gdbserver.h"
-#include "pub_core_libcbase.h"
-#include "pub_core_libcprint.h"
-#include "pub_core_libcproc.h"
-#include "pub_core_libcsignal.h"
-#include "pub_core_libcassert.h"
-#include "pub_core_options.h"
-
-
-#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
-#define WSTOPSIG(status) (((status) & 0xff00) >> 8)
-
-static Int ptrace_setregs(Int pid, const VexGuestArchState* vex)
-{
-#if defined(VGP_x86_linux)
- struct vki_user_regs_struct regs;
- VG_(memset)(®s, 0, sizeof(regs));
- regs.cs = vex->guest_CS;
- regs.ss = vex->guest_SS;
- regs.ds = vex->guest_DS;
- regs.es = vex->guest_ES;
- regs.fs = vex->guest_FS;
- regs.gs = vex->guest_GS;
- regs.eax = vex->guest_EAX;
- regs.ebx = vex->guest_EBX;
- regs.ecx = vex->guest_ECX;
- regs.edx = vex->guest_EDX;
- regs.esi = vex->guest_ESI;
- regs.edi = vex->guest_EDI;
- regs.ebp = vex->guest_EBP;
- regs.esp = vex->guest_ESP;
- regs.eflags = LibVEX_GuestX86_get_eflags(vex);
- regs.eip = vex->guest_EIP;
- return VG_(ptrace)(VKI_PTRACE_SETREGS, pid, NULL, ®s);
-
-#elif defined(VGP_amd64_linux)
- struct vki_user_regs_struct regs;
- VG_(memset)(®s, 0, sizeof(regs));
- regs.rax = vex->guest_RAX;
- regs.rbx = vex->guest_RBX;
- regs.rcx = vex->guest_RCX;
- regs.rdx = vex->guest_RDX;
- regs.rsi = vex->guest_RSI;
- regs.rdi = vex->guest_RDI;
- regs.rbp = vex->guest_RBP;
- regs.rsp = vex->guest_RSP;
- regs.r8 = vex->guest_R8;
- regs.r9 = vex->guest_R9;
- regs.r10 = vex->guest_R10;
- regs.r11 = vex->guest_R11;
- regs.r12 = vex->guest_R12;
- regs.r13 = vex->guest_R13;
- regs.r14 = vex->guest_R14;
- regs.r15 = vex->guest_R15;
- regs.eflags = LibVEX_GuestAMD64_get_rflags(vex);
- regs.rip = vex->guest_RIP;
- /* Set %{c,d,e,f,s,g}s and %{fs,gs}_base (whatever those are) to
- values which don't fail the kernel's sanity checks. I have no
- idea what these should really be set to. Anyway, mostly it
- seems that zero is an allowable value, except for %cs and %ss
- which have to have their lowest 2 bits be 11. See putreg() in
- linux-2.6.23/arch/x86_64/kernel/ptrace.c for the apparently
- relevant sanity checks. This fixes #145622. */
- regs.cs = 3;
- regs.ds = 0;
- regs.es = 0;
- regs.fs = 0;
- regs.ss = 3;
- regs.gs = 0;
- regs.fs_base = 0;
- regs.gs_base = 0;
- return VG_(ptrace)(VKI_PTRACE_SETREGS, pid, NULL, ®s);
-
-#elif defined(VGP_ppc32_linux)
- Int rc = 0;
- /* apparently the casting to void* is the Right Thing To Do */
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R0 * 4), (void*)vex->guest_GPR0);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R1 * 4), (void*)vex->guest_GPR1);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R2 * 4), (void*)vex->guest_GPR2);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R3 * 4), (void*)vex->guest_GPR3);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R4 * 4), (void*)vex->guest_GPR4);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R5 * 4), (void*)vex->guest_GPR5);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R6 * 4), (void*)vex->guest_GPR6);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R7 * 4), (void*)vex->guest_GPR7);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R8 * 4), (void*)vex->guest_GPR8);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R9 * 4), (void*)vex->guest_GPR9);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R10 * 4), (void*)vex->guest_GPR10);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R11 * 4), (void*)vex->guest_GPR11);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R12 * 4), (void*)vex->guest_GPR12);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R13 * 4), (void*)vex->guest_GPR13);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R14 * 4), (void*)vex->guest_GPR14);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R15 * 4), (void*)vex->guest_GPR15);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R16 * 4), (void*)vex->guest_GPR16);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R17 * 4), (void*)vex->guest_GPR17);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R18 * 4), (void*)vex->guest_GPR18);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R19 * 4), (void*)vex->guest_GPR19);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R20 * 4), (void*)vex->guest_GPR20);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R21 * 4), (void*)vex->guest_GPR21);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R22 * 4), (void*)vex->guest_GPR22);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R23 * 4), (void*)vex->guest_GPR23);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R24 * 4), (void*)vex->guest_GPR24);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R25 * 4), (void*)vex->guest_GPR25);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R26 * 4), (void*)vex->guest_GPR26);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R27 * 4), (void*)vex->guest_GPR27);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R28 * 4), (void*)vex->guest_GPR28);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R29 * 4), (void*)vex->guest_GPR29);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R30 * 4), (void*)vex->guest_GPR30);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R31 * 4), (void*)vex->guest_GPR31);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_NIP * 4), (void*)vex->guest_CIA);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_CCR * 4),
- (void*)LibVEX_GuestPPC32_get_CR(vex));
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_LNK * 4), (void*)vex->guest_LR);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_CTR * 4), (void*)vex->guest_CTR);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_XER * 4),
- (void*)LibVEX_GuestPPC32_get_XER(vex));
- return rc;
-
-#elif defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
- Int rc = 0;
- /* FRJ: copied nearly verbatim from the ppc32 case. I compared the
- vki-ppc64-linux.h with its ppc32 counterpart and saw no
- appreciable differences, other than the registers being 8 bytes
- instead of 4. No idea why we don't set all of the entries
- declared in vki_pt_regs, but ppc32 doesn't so there must be a
- reason.
-
- Finally, note that CR and XER are 32 bits even for ppc64 (see
- libvex_guest_ppc64.h), but the vki_pt_regs struct still gives
- them 64 bits.
- */
- /* apparently the casting to void* is the Right Thing To Do */
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R0 * 8), (void*)vex->guest_GPR0);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R1 * 8), (void*)vex->guest_GPR1);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R2 * 8), (void*)vex->guest_GPR2);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R3 * 8), (void*)vex->guest_GPR3);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R4 * 8), (void*)vex->guest_GPR4);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R5 * 8), (void*)vex->guest_GPR5);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R6 * 8), (void*)vex->guest_GPR6);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R7 * 8), (void*)vex->guest_GPR7);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R8 * 8), (void*)vex->guest_GPR8);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R9 * 8), (void*)vex->guest_GPR9);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R10 * 8), (void*)vex->guest_GPR10);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R11 * 8), (void*)vex->guest_GPR11);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R12 * 8), (void*)vex->guest_GPR12);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R13 * 8), (void*)vex->guest_GPR13);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R14 * 8), (void*)vex->guest_GPR14);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R15 * 8), (void*)vex->guest_GPR15);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R16 * 8), (void*)vex->guest_GPR16);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R17 * 8), (void*)vex->guest_GPR17);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R18 * 8), (void*)vex->guest_GPR18);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R19 * 8), (void*)vex->guest_GPR19);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R20 * 8), (void*)vex->guest_GPR20);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R21 * 8), (void*)vex->guest_GPR21);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R22 * 8), (void*)vex->guest_GPR22);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R23 * 8), (void*)vex->guest_GPR23);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R24 * 8), (void*)vex->guest_GPR24);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R25 * 8), (void*)vex->guest_GPR25);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R26 * 8), (void*)vex->guest_GPR26);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R27 * 8), (void*)vex->guest_GPR27);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R28 * 8), (void*)vex->guest_GPR28);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R29 * 8), (void*)vex->guest_GPR29);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R30 * 8), (void*)vex->guest_GPR30);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_R31 * 8), (void*)vex->guest_GPR31);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_NIP * 8), (void*)vex->guest_CIA);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_CCR * 8),
- (void*)(long)LibVEX_GuestPPC64_get_CR(vex));
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_LNK * 8), (void*)vex->guest_LR);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_CTR * 8), (void*)vex->guest_CTR);
- rc |= VG_(ptrace)(VKI_PTRACE_POKEUSR, pid, (void*)(VKI_PT_XER * 8),
- (void*)(long)LibVEX_GuestPPC64_get_XER(vex));
- return rc;
-
-#elif defined(VGP_arm_linux)
- struct vki_user_regs_struct uregs;
- VG_(memset)(&uregs, 0, sizeof(uregs));
- uregs.ARM_r0 = vex->guest_R0;
- uregs.ARM_r1 = vex->guest_R1;
- uregs.ARM_r2 = vex->guest_R2;
- uregs.ARM_r3 = vex->guest_R3;
- uregs.ARM_r4 = vex->guest_R4;
- uregs.ARM_r5 = vex->guest_R5;
- uregs.ARM_r6 = vex->guest_R6;
- uregs.ARM_r7 = vex->guest_R7;
- uregs.ARM_r8 = vex->guest_R8;
- uregs.ARM_r9 = vex->guest_R9;
- uregs.ARM_r10 = vex->guest_R10;
- uregs.ARM_fp = vex->guest_R11;
- uregs.ARM_ip = vex->guest_R12;
- uregs.ARM_sp = vex->guest_R13;
- uregs.ARM_lr = vex->guest_R14;
- // Remove the T bit from the bottom of R15T. It will get shipped
- // over in CPSR.T instead, since LibVEX_GuestARM_get_cpsr copies
- // it from R15T[0].
- uregs.ARM_pc = vex->guest_R15T & 0xFFFFFFFE;
- uregs.ARM_cpsr = LibVEX_GuestARM_get_cpsr(vex);
- return VG_(ptrace)(VKI_PTRACE_SETREGS, pid, NULL, &uregs);
-
-#elif defined(VGP_arm64_linux)
- I_die_here;
- //ATC
- struct vki_user_pt_regs uregs;
- VG_(memset)(&uregs, 0, sizeof(uregs));
- uregs.regs[0] = vex->guest_X0;
- uregs.regs[1] = vex->guest_X1;
- uregs.regs[2] = vex->guest_X2;
- uregs.regs[3] = vex->guest_X3;
- uregs.regs[4] = vex->guest_X4;
- uregs.regs[5] = vex->guest_X5;
- uregs.regs[6] = vex->guest_X6;
- uregs.regs[7] = vex->guest_X7;
- uregs.regs[8] = vex->guest_X8;
- uregs.regs[9] = vex->guest_X9;
- uregs.regs[10] = vex->guest_X10;
- uregs.regs[11] = vex->guest_X11;
- uregs.regs[12] = vex->guest_X12;
- uregs.regs[13] = vex->guest_X13;
- uregs.regs[14] = vex->guest_X14;
- uregs.regs[15] = vex->guest_X15;
- uregs.regs[16] = vex->guest_X16;
- uregs.regs[17] = vex->guest_X17;
- uregs.regs[18] = vex->guest_X18;
- uregs.regs[19] = vex->guest_X19;
- uregs.regs[20] = vex->guest_X20;
- uregs.regs[21] = vex->guest_X21;
- uregs.regs[22] = vex->guest_X22;
- uregs.regs[23] = vex->guest_X23;
- uregs.regs[24] = vex->guest_X24;
- uregs.regs[25] = vex->guest_X25;
- uregs.regs[26] = vex->guest_X26;
- uregs.regs[27] = vex->guest_X27;
- uregs.regs[28] = vex->guest_X28;
- uregs.regs[29] = vex->guest_X29;
- uregs.regs[30] = vex->guest_X30;
- uregs.sp = vex->guest_XSP;
- uregs.pc = vex->guest_PC;
- uregs.pstate = LibVEX_GuestARM64_get_nzcv(vex); /* is this correct? */
- return VG_(ptrace)(VKI_PTRACE_SETREGS, pid, NULL, &uregs);
-
-#elif defined(VGP_x86_darwin)
- I_die_here;
-
-#elif defined(VGP_amd64_darwin)
- I_die_here;
-
-#elif defined(VGP_s390x_linux)
- struct vki_user_regs_struct regs;
- vki_ptrace_area pa;
-
- /* We don't set the psw mask and start at offset 8 */
- pa.vki_len = (unsigned long) ®s.per_info - (unsigned long) ®s.psw.addr;
- pa.vki_process_addr = (unsigned long) ®s.psw.addr;
- pa.vki_kernel_addr = 8;
-
- VG_(memset)(®s, 0, sizeof(regs));
- regs.psw.addr = vex->guest_IA;
-
- /* We don't set the mask */
- regs.gprs[0] = vex->guest_r0;
- regs.gprs[1] = vex->guest_r1;
- regs.gprs[2] = vex->guest_r2;
- regs.gprs[3] = vex->guest_r3;
- regs.gprs[4] = vex->guest_r4;
- regs.gprs[5] = vex->guest_r5;
- regs.gprs[6] = vex->guest_r6;
- regs.gprs[7] = vex->guest_r7;
- regs.gprs[8] = vex->guest_r8;
- regs.gprs[9] = vex->guest_r9;
- regs.gprs[10] = vex->guest_r10;
- regs.gprs[11] = vex->guest_r11;
- regs.gprs[12] = vex->guest_r12;
- regs.gprs[13] = vex->guest_r13;
- regs.gprs[14] = vex->guest_r14;
- regs.gprs[15] = vex->guest_r15;
-
- regs.acrs[0] = vex->guest_a0;
- regs.acrs[1] = vex->guest_a1;
- regs.acrs[2] = vex->guest_a2;
- regs.acrs[3] = vex->guest_a3;
- regs.acrs[4] = vex->guest_a4;
- regs.acrs[5] = vex->guest_a5;
- regs.acrs[6] = vex->guest_a6;
- regs.acrs[7] = vex->guest_a7;
- regs.acrs[8] = vex->guest_a8;
- regs.acrs[9] = vex->guest_a9;
- regs.acrs[10] = vex->guest_a10;
- regs.acrs[11] = vex->guest_a11;
- regs.acrs[12] = vex->guest_a12;
- regs.acrs[13] = vex->guest_a13;
- regs.acrs[14] = vex->guest_a14;
- regs.acrs[15] = vex->guest_a15;
-
- /* only used for system call restart and friends, just use r2 */
- regs.orig_gpr2 = vex->guest_r2;
-
- regs.fp_regs.fprs[0].ui = vex->guest_f0;
- regs.fp_regs.fprs[1].ui = vex->guest_f1;
- regs.fp_regs.fprs[2].ui = vex->guest_f2;
- regs.fp_regs.fprs[3].ui = vex->guest_f3;
- regs.fp_regs.fprs[4].ui = vex->guest_f4;
- regs.fp_regs.fprs[5].ui = vex->guest_f5;
- regs.fp_regs.fprs[6].ui = vex->guest_f6;
- regs.fp_regs.fprs[7].ui = vex->guest_f7;
- regs.fp_regs.fprs[8].ui = vex->guest_f8;
- regs.fp_regs.fprs[9].ui = vex->guest_f9;
- regs.fp_regs.fprs[10].ui = vex->guest_f10;
- regs.fp_regs.fprs[11].ui = vex->guest_f11;
- regs.fp_regs.fprs[12].ui = vex->guest_f12;
- regs.fp_regs.fprs[13].ui = vex->guest_f13;
- regs.fp_regs.fprs[14].ui = vex->guest_f14;
- regs.fp_regs.fprs[15].ui = vex->guest_f15;
- regs.fp_regs.fpc = vex->guest_fpc;
-
- return VG_(ptrace)(VKI_PTRACE_POKEUSR_AREA, pid, &pa, NULL);
-
-#elif defined(VGP_mips32_linux) || defined(VGP_mips64_linux)
- struct vki_user_regs_struct regs;
- VG_(memset)(®s, 0, sizeof(regs));
- regs.MIPS_r0 = vex->guest_r0;
- regs.MIPS_r1 = vex->guest_r1;
- regs.MIPS_r2 = vex->guest_r2;
- regs.MIPS_r3 = vex->guest_r3;
- regs.MIPS_r4 = vex->guest_r4;
- regs.MIPS_r5 = vex->guest_r5;
- regs.MIPS_r6 = vex->guest_r6;
- regs.MIPS_r7 = vex->guest_r7;
- regs.MIPS_r8 = vex->guest_r8;
- regs.MIPS_r9 = vex->guest_r9;
- regs.MIPS_r10 = vex->guest_r10;
- regs.MIPS_r11 = vex->guest_r11;
- regs.MIPS_r12 = vex->guest_r12;
- regs.MIPS_r13 = vex->guest_r13;
- regs.MIPS_r14 = vex->guest_r14;
- regs.MIPS_r15 = vex->guest_r15;
- regs.MIPS_r16 = vex->guest_r16;
- regs.MIPS_r17 = vex->guest_r17;
- regs.MIPS_r18 = vex->guest_r18;
- regs.MIPS_r19 = vex->guest_r19;
- regs.MIPS_r20 = vex->guest_r20;
- regs.MIPS_r21 = vex->guest_r21;
- regs.MIPS_r22 = vex->guest_r22;
- regs.MIPS_r23 = vex->guest_r23;
- regs.MIPS_r24 = vex->guest_r24;
- regs.MIPS_r25 = vex->guest_r25;
- regs.MIPS_r26 = vex->guest_r26;
- regs.MIPS_r27 = vex->guest_r27;
- regs.MIPS_r28 = vex->guest_r28;
- regs.MIPS_r29 = vex->guest_r29;
- regs.MIPS_r30 = vex->guest_r30;
- regs.MIPS_r31 = vex->guest_r31;
- return VG_(ptrace)(VKI_PTRACE_SETREGS, pid, NULL, ®s);
-
-#elif defined(VGP_tilegx_linux)
- struct vki_user_regs_struct regs;
- VG_(memset)(®s, 0, sizeof(regs));
- regs.TILEGX_r0 = vex->guest_r0;
- regs.TILEGX_r1 = vex->guest_r1;
- regs.TILEGX_r2 = vex->guest_r2;
- regs.TILEGX_r3 = vex->guest_r3;
- regs.TILEGX_r4 = vex->guest_r4;
- regs.TILEGX_r5 = vex->guest_r5;
- regs.TILEGX_r6 = vex->guest_r6;
- regs.TILEGX_r7 = vex->guest_r7;
- regs.TILEGX_r8 = vex->guest_r8;
- regs.TILEGX_r9 = vex->guest_r9;
- regs.TILEGX_r10 = vex->guest_r10;
- regs.TILEGX_r11 = vex->guest_r11;
- regs.TILEGX_r12 = vex->guest_r12;
- regs.TILEGX_r13 = vex->guest_r13;
- regs.TILEGX_r14 = vex->guest_r14;
- regs.TILEGX_r15 = vex->guest_r15;
- regs.TILEGX_r16 = vex->guest_r16;
- regs.TILEGX_r17 = vex->guest_r17;
- regs.TILEGX_r18 = vex->guest_r18;
- regs.TILEGX_r19 = vex->guest_r19;
- regs.TILEGX_r20 = vex->guest_r20;
- regs.TILEGX_r21 = vex->guest_r21;
- regs.TILEGX_r22 = vex->guest_r22;
- regs.TILEGX_r23 = vex->guest_r23;
- regs.TILEGX_r24 = vex->guest_r24;
- regs.TILEGX_r25 = vex->guest_r25;
- regs.TILEGX_r26 = vex->guest_r26;
- regs.TILEGX_r27 = vex->guest_r27;
- regs.TILEGX_r28 = vex->guest_r28;
- regs.TILEGX_r29 = vex->guest_r29;
- regs.TILEGX_r30 = vex->guest_r30;
- regs.TILEGX_r31 = vex->guest_r31;
- regs.TILEGX_r32 = vex->guest_r32;
- regs.TILEGX_r33 = vex->guest_r33;
- regs.TILEGX_r34 = vex->guest_r34;
- regs.TILEGX_r35 = vex->guest_r35;
- regs.TILEGX_r36 = vex->guest_r36;
- regs.TILEGX_r37 = vex->guest_r37;
- regs.TILEGX_r38 = vex->guest_r38;
- regs.TILEGX_r39 = vex->guest_r39;
- regs.TILEGX_r40 = vex->guest_r40;
- regs.TILEGX_r41 = vex->guest_r41;
- regs.TILEGX_r42 = vex->guest_r42;
- regs.TILEGX_r43 = vex->guest_r43;
- regs.TILEGX_r44 = vex->guest_r44;
- regs.TILEGX_r45 = vex->guest_r45;
- regs.TILEGX_r46 = vex->guest_r46;
- regs.TILEGX_r47 = vex->guest_r47;
- regs.TILEGX_r48 = vex->guest_r48;
- regs.TILEGX_r49 = vex->guest_r49;
- regs.TILEGX_r50 = vex->guest_r50;
- regs.TILEGX_r51 = vex->guest_r51;
- regs.TILEGX_r52 = vex->guest_r52;
- regs.TILEGX_r53 = vex->guest_r53;
- regs.TILEGX_r54 = vex->guest_r54;
- regs.TILEGX_r55 = vex->guest_r55;
- regs.TILEGX_pc = vex->guest_pc;
-
- return VG_(ptrace)(VKI_PTRACE_SETREGS, pid, NULL, ®s);
-
-#elif defined(VGP_x86_solaris)
- I_die_here;
-
-#elif defined(VGP_amd64_solaris)
- I_die_here;
-
-#else
-# error Unknown arch
-#endif
-}
-
-/* Start debugger and get it to attach to this process. Called if the
- user requests this service after an error has been shown, so she can
- poke around and look at parameters, memory, etc. You can't
- meaningfully get the debugger to continue the program, though; to
- continue, quit the debugger. */
-void VG_(start_debugger) ( ThreadId tid )
-{
-# define N_BUF 4096
- Int pid, rc;
-
- pid = VG_(fork)();
-
- if (pid == 0) {
- /* child */
- VG_(set_ptracer)();
- rc = VG_(ptrace)(VKI_PTRACE_TRACEME, 0, NULL, NULL);
- vg_assert(rc == 0);
- rc = VG_(kill)(VG_(getpid)(), VKI_SIGSTOP);
- vg_assert(rc == 0);
-
- } else if (pid > 0) {
- /* parent */
- Int status;
- Int res;
-
- if ((res = VG_(waitpid)(pid, &status, 0)) == pid &&
- WIFSTOPPED(status) && WSTOPSIG(status) == VKI_SIGSTOP &&
- ptrace_setregs(pid, &(VG_(threads)[tid].arch.vex)) == 0 &&
- VG_(kill)(pid, VKI_SIGSTOP) == 0 &&
- VG_(ptrace)(VKI_PTRACE_DETACH, pid, NULL, 0) == 0)
- {
- HChar pidbuf[15];
- HChar file[50];
- HChar buf[N_BUF];
- HChar *bufptr;
- const HChar *cmdptr;
-
- VG_(sprintf)(pidbuf, "%d", pid);
- VG_(sprintf)(file, "/proc/%d/fd/%d", pid, VG_(cl_exec_fd));
-
- bufptr = buf;
- cmdptr = VG_(clo_db_command);
-
- while (*cmdptr) {
- /* each iteration can advance bufptr by at most the length
- of file[], so the following assertion is generously
- over-paranoid. */
- vg_assert(bufptr - buf < N_BUF-15-50-10/*paranoia*/);
- switch (*cmdptr) {
- case '%':
- switch (*++cmdptr) {
- case 'f':
- VG_(memcpy)(bufptr, file, VG_(strlen)(file));
- bufptr += VG_(strlen)(file);
- cmdptr++;
- break;
- case 'p':
- VG_(memcpy)(bufptr, pidbuf, VG_(strlen)(pidbuf));
- bufptr += VG_(strlen)(pidbuf);
- cmdptr++;
- break;
- default:
- *bufptr++ = *cmdptr++;
- break;
- }
- break;
- default:
- *bufptr++ = *cmdptr++;
- break;
- }
- vg_assert(bufptr - buf < N_BUF-15-50-10/*paranoia*/);
- }
-
- *bufptr++ = '\0';
-
- VG_(message)(Vg_UserMsg, "starting debugger with cmd: %s\n", buf);
- res = VG_(system)(buf);
- if (res == 0) {
- VG_(message)(Vg_UserMsg, "\n");
- VG_(message)(Vg_UserMsg,
- "Debugger has detached. Valgrind regains control."
- " We continue.\n");
- } else {
- VG_(message)(Vg_UserMsg,
- "Warning: Debugger attach failed! (sys_system)\n");
- VG_(message)(Vg_UserMsg, "\n");
- }
- } else {
- VG_(message)(Vg_UserMsg,
- "Warning: Debugger attach failed! (ptrace problem?)\n");
- VG_(message)(Vg_UserMsg, "\n");
- }
-
- VG_(kill)(pid, VKI_SIGKILL);
- VG_(waitpid)(pid, &status, 0);
- }
-# undef N_BUF
-}
-
-
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_errormgr.c
==============================================================================
--- trunk/coregrind/m_errormgr.c (original)
+++ trunk/coregrind/m_errormgr.c Fri Jul 24 12:50:12 2015
@@ -31,7 +31,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_threadstate.h" // For VG_N_THREADS
-#include "pub_core_debugger.h"
#include "pub_core_debuginfo.h"
#include "pub_core_debuglog.h"
#include "pub_core_errormgr.h"
@@ -515,7 +514,7 @@
/* Do text-mode actions on error, that is, immediately after an error
is printed. These are:
- * possibly, attach to a debugger
+ * possibly, call the GDB server
* possibly, generate a suppression.
Note this should not be called in XML mode!
*/
@@ -533,15 +532,6 @@
VG_(umsg)("Continuing ...\n");
}
- /* Perhaps we want a debugger attach at this point? */
- /* GDBTD ??? maybe we should/could remove the below assuming the
- gdbserver interface is better ??? */
- if (allow_db_attach &&
- VG_(is_action_requested)( "Attach to debugger", & VG_(clo_db_attach) ))
- {
- if (0) VG_(printf)("starting debugger\n");
- VG_(start_debugger)( err->tid );
- }
/* Or maybe we want to generate the error's suppression? */
if (VG_(clo_gen_suppressions) == 2
|| (VG_(clo_gen_suppressions) == 1
Modified: trunk/coregrind/m_main.c
==============================================================================
--- trunk/coregrind/m_main.c (original)
+++ trunk/coregrind/m_main.c Fri Jul 24 12:50:12 2015
@@ -133,9 +133,6 @@
" load default suppressions [yes]\n"
" --suppressions=<filename> suppress errors described in <filename>\n"
" --gen-suppressions=no|yes|all print suppressions for errors? [no]\n"
-" --db-attach=no|yes start debugger when errors detected? [no]\n"
-" Note: deprecated feature\n"
-" --db-command=<command> command to start debugger [%s -nw %%f %%p]\n"
" --input-fd=<number> file descriptor for input [0=stdin]\n"
" --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [no]\n"
" --max-stackframe=<number> assume stack switch for SP changes larger\n"
@@ -301,7 +298,6 @@
" Bug reports, feedback, admiration, abuse, etc, to: %s.\n"
"\n";
- const HChar* gdb_path = GDB_PATH;
HChar default_alignment[30]; // large enough
HChar default_redzone_size[30]; // large enough
@@ -319,7 +315,6 @@
/* 'usage1' a type as described after each arg. */
VG_(printf)(usage1,
VG_(clo_vgdb_error) /* int */,
- gdb_path /* char* */,
default_alignment /* char* */,
default_redzone_size /* char* */,
VG_(clo_vgdb_poll) /* int */,
@@ -617,7 +612,6 @@
}
else if VG_BOOL_CLO(arg, "--vgdb-shadow-registers",
VG_(clo_vgdb_shadow_registers)) {}
- else if VG_BOOL_CLO(arg, "--db-attach", VG_(clo_db_attach)) {}
else if VG_BOOL_CLO(arg, "--demangle", VG_(clo_demangle)) {}
else if VG_STR_CLO (arg, "--soname-synonyms",VG_(clo_soname_synonyms)) {}
else if VG_BOOL_CLO(arg, "--error-limit", VG_(clo_error_limit)) {}
@@ -682,7 +676,6 @@
else if VG_BOOL_CLO(arg, "--trace-syscalls", VG_(clo_trace_syscalls)) {}
else if VG_BOOL_CLO(arg, "--wait-for-gdb", VG_(clo_wait_for_gdb)) {}
- else if VG_STR_CLO (arg, "--db-command", VG_(clo_db_command)) {}
else if VG_BOOL_CLO(arg, "--sym-offsets", VG_(clo_sym_offsets)) {}
else if VG_BOOL_CLO(arg, "--read-inline-info", VG_(clo_read_inline_info)) {}
else if VG_BOOL_CLO(arg, "--read-var-info", VG_(clo_read_var_info)) {}
@@ -902,11 +895,7 @@
/* END command-line processing loop */
- /* Notify about deprecated features */
- if (VG_(clo_db_attach))
- VG_(umsg)
- ("\nWarning: --db-attach is a deprecated feature which will be\n"
- " removed in the next release. Use --vgdb-error=1 instead\n\n");
+ /* Notify about deprecated features here. */
/* Determine the path prefix for vgdb */
if (VG_(clo_vgdb_prefix) == NULL)
@@ -998,16 +987,6 @@
"--gen-suppressions=yes.\n");
}
- /* We can't allow DB attaching (or we maybe could, but results
- could be chaotic ..) since it requires user input. Hence
- disallow. */
- if (VG_(clo_db_attach)) {
- VG_(fmsg_bad_option)(
- "--xml=yes together with --db-attach=yes",
- "--db-attach=yes is not allowed with --xml=yes\n"
- "because it would require user input.\n");
- }
-
/* Disallow dump_error in XML mode; sounds like a recipe for
chaos. No big deal; dump_error is a flag for debugging V
itself. */
Modified: trunk/coregrind/m_options.c
==============================================================================
--- trunk/coregrind/m_options.c (original)
+++ trunk/coregrind/m_options.c Fri Jul 24 12:50:12 2015
@@ -67,8 +67,6 @@
const HChar *VG_(arg_vgdb_prefix) = NULL;
Bool VG_(clo_vgdb_shadow_registers) = False;
-Bool VG_(clo_db_attach) = False;
-const HChar* VG_(clo_db_command) = GDB_PATH " -nw %f %p";
Int VG_(clo_gen_suppressions) = 0;
Int VG_(clo_sanity_level) = 1;
Int VG_(clo_verbosity) = 1;
Modified: trunk/coregrind/m_signals.c
==============================================================================
--- trunk/coregrind/m_signals.c (original)
+++ trunk/coregrind/m_signals.c Fri Jul 24 12:50:12 2015
@@ -207,7 +207,6 @@
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
#include "pub_core_aspacemgr.h"
-#include "pub_core_debugger.h" // For VG_(start_debugger)
#include "pub_core_errormgr.h"
#include "pub_core_gdbserver.h"
#include "pub_core_libcbase.h"
@@ -1899,10 +1898,6 @@
VG_(gdbserver_report_fatal_signal) (info, tid);
}
- if (VG_(is_action_requested)( "Attach to debugger", & VG_(clo_db_attach) )) {
- VG_(start_debugger)( tid );
- }
-
if (core) {
static const struct vki_rlimit zero = { 0, 0 };
Removed: trunk/coregrind/pub_core_debugger.h
==============================================================================
--- trunk/coregrind/pub_core_debugger.h (original)
+++ trunk/coregrind/pub_core_debugger.h (removed)
@@ -1,47 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Attaching a debugger. pub_core_debugger.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2013 Julian Seward
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#ifndef __PUB_CORE_DEBUGGER_H
-#define __PUB_CORE_DEBUGGER_H
-
-//--------------------------------------------------------------------
-// PURPOSE: This simple module just deals with attaching a debugger to the
-// running program.
-//--------------------------------------------------------------------
-
-#include "pub_core_basics.h" // ThreadId
-
-extern void VG_(start_debugger) ( ThreadId tid );
-
-#endif // __PUB_CORE_DEBUGGER_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/pub_core_gdbserver.h
==============================================================================
--- trunk/coregrind/pub_core_gdbserver.h (original)
+++ trunk/coregrind/pub_core_gdbserver.h Fri Jul 24 12:50:12 2015
@@ -63,7 +63,7 @@
void VG_(gdbserver_exit) (ThreadId tid, VgSchedReturnCode tids_schedretcode);
/* On systems that defines PR_SET_PTRACER, verify if ptrace_scope is
- is permissive enough for vgdb or --db-attach=yes.
+ is permissive enough for vgdb.
Otherwise, call set_ptracer.
This is especially aimed at Ubuntu >= 10.10 which has added
the ptrace_scope context. */
Modified: trunk/coregrind/pub_core_options.h
==============================================================================
--- trunk/coregrind/pub_core_options.h (original)
+++ trunk/coregrind/pub_core_options.h Fri Jul 24 12:50:12 2015
@@ -88,10 +88,6 @@
shadow registers */
extern Bool VG_(clo_vgdb_shadow_registers);
-/* Enquire about whether to attach to a debugger at errors? default: NO */
-extern Bool VG_(clo_db_attach);
-/* The debugger command? default: whatever gdb ./configure found */
-extern const HChar* VG_(clo_db_command);
/* Generating a suppression for each error? default: 0 (NO)
Other values: 1 (yes, but ask user), 2 (yes, don't ask user) */
extern Int VG_(clo_gen_suppressions);
Modified: trunk/docs/xml/manual-core.xml
==============================================================================
--- trunk/docs/xml/manual-core.xml (original)
+++ trunk/docs/xml/manual-core.xml Fri Jul 24 12:50:12 2015
@@ -1412,11 +1412,13 @@
after every error shown and print the line:
<literallayout><computeroutput> ---- Print suppression ? --- [Return/N/n/Y/y/C/c] ----</computeroutput></literallayout>
- The prompt's behaviour is the same as for the
- <option>--db-attach</option> option (see below).</para>
+ Pressing <varname>Ret</varname>, or <varname>N Ret</varname> or
+ <varname>n Ret</varname>, causes Valgrind continue execution without
+ printing a suppression for this error.</para>
- <para>If you choose to, Valgrind will print out a suppression for
- this error. You can then cut and paste it into a suppression file
+ <para>Pressing <varname>Y Ret</varname> or
+ <varname>y Ret</varname> causes Valgrind to write a suppression
+ for this error. You can then cut and paste it into a suppression file
if you don't want to hear about the error in the future.</para>
<para>When set to <varname>all</varname>, Valgrind will print a
@@ -1451,76 +1453,12 @@
</listitem>
</varlistentry>
- <varlistentry id="opt.db-attach" xreflabel="--db-attach">
- <term>
- <option><![CDATA[--db-attach=<yes|no> [default: no] ]]></option>
- </term>
- <listitem>
- <para>When enabled, Valgrind will pause after every error shown
- and print the line:
- <literallayout><computeroutput> ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ----</computeroutput></literallayout>
-
- Pressing <varname>Ret</varname>, or <varname>N Ret</varname> or
- <varname>n Ret</varname>, causes Valgrind not to start a debugger
- for this error.</para>
-
- <para>Pressing <varname>Y Ret</varname> or
- <varname>y Ret</varname> causes Valgrind to start a debugger for
- the program at this point. When you have finished with the
- debugger, quit from it, and the program will continue. Trying to
- continue from inside the debugger doesn't work.</para>
-
- <para>
- Note: if you use GDB, more powerful debugging support is
- provided by the <option>--vgdb=</option> <varname>yes</varname>
- or <varname>full</varname> value. This activates Valgrind's
- internal gdbserver, which provides more-or-less full GDB-style
- control of the application: insertion of breakpoints, continuing
- from inside GDB, inferior function calls, and much more.
- </para>
-
- <para><varname>C Ret</varname> or <varname>c Ret</varname> causes
- Valgrind not to start a debugger, and not to ask again.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry id="opt.db-command" xreflabel="--db-command">
- <term>
- <option><![CDATA[--db-command=<command> [default: gdb -nw %f %p] ]]></option>
- </term>
- <listitem>
- <para>Specify the debugger to use with the
- <option>--db-attach</option> command. The default debugger is
- GDB. This option is a template that is expanded by Valgrind at
- runtime. <literal>%f</literal> is replaced with the executable's
- file name and <literal>%p</literal> is replaced by the process ID
- of the executable.</para>
-
- <para>This specifies how Valgrind will invoke the debugger. By
- default it will use whatever GDB is detected at build time, which
- is usually <computeroutput>/usr/bin/gdb</computeroutput>. Using
- this command, you can specify some alternative command to invoke
- the debugger you want to use.</para>
-
- <para>The command string given can include one or instances of the
- <literal>%p</literal> and <literal>%f</literal> expansions. Each
- instance of <literal>%p</literal> expands to the PID of the
- process to be debugged and each instance of <literal>%f</literal>
- expands to the path to the executable for the process to be
- debugged.</para>
-
- <para>Since <computeroutput><command></computeroutput> is likely
- to contain spaces, you will need to put this entire option in
- quotes to ensure it is correctly handled by the shell.</para>
- </listitem>
- </varlistentry>
-
<varlistentry id="opt.input-fd" xreflabel="--input-fd">
<term>
<option><![CDATA[--input-fd=<number> [default: 0, stdin] ]]></option>
</term>
<listitem>
- <para>When using <option>--db-attach=yes</option> or
+ <para>When using
<option>--gen-suppressions=yes</option>, Valgrind will stop so as
to read keyboard input from you when each error occurs. By
default it reads from the standard input (stdin), which is
@@ -2452,8 +2390,7 @@
<para>If you wish to debug your program rather than debugging
Valgrind itself, then you should use the options
-<option>--vgdb=yes</option> or <option>--vgdb=full</option>
-or <option>--db-attach=yes</option>.
+<option>--vgdb=yes</option> or <option>--vgdb=full</option>.
</para>
<!-- end of xi:include in the manpage -->
Modified: trunk/include/vki/vki-solaris.h
==============================================================================
--- trunk/include/vki/vki-solaris.h (original)
+++ trunk/include/vki/vki-solaris.h Fri Jul 24 12:50:12 2015
@@ -60,12 +60,6 @@
#define __EXTENSIONS__ 1
/* assert _FILE_OFFSET_BITS == 32 */
-/* XXX These two PTRACE defines are currently used only in m_debugger.c for
- legacy 'attach debugger' functionality. This is going to be removed
- in future Valgrind version and so can these two as well. */
-#define VKI_PTRACE_TRACEME 0
-#define VKI_PTRACE_DETACH -1
-
#define VKI_PAGE_SHIFT 12
#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
#define VKI_PAGEMASK (~VKI_PAGEOFFSET)
Modified: trunk/none/tests/cmdline1.stdout.exp
==============================================================================
--- trunk/none/tests/cmdline1.stdout.exp (original)
+++ trunk/none/tests/cmdline1.stdout.exp Fri Jul 24 12:50:12 2015
@@ -47,9 +47,6 @@
load default suppressions [yes]
--suppressions=<filename> suppress errors described in <filename>
--gen-suppressions=no|yes|all print suppressions for errors? [no]
- --db-attach=no|yes start debugger when errors detected? [no]
- Note: deprecated feature
- --db-command=<command> command to start debugger [... -nw %f %p]
--input-fd=<number> file descriptor for input [0=stdin]
--dsymutil=no|yes run dsymutil on Mac OS X when helpful? [no]
--max-stackframe=<number> assume stack switch for SP changes larger
Modified: trunk/none/tests/cmdline2.stdout.exp
==============================================================================
--- trunk/none/tests/cmdline2.stdout.exp (original)
+++ trunk/none/tests/cmdline2.stdout.exp Fri Jul 24 12:50:12 2015
@@ -47,9 +47,6 @@
load default suppressions [yes]
--suppressions=<filename> suppress errors described in <filename>
--gen-suppressions=no|yes|all print suppressions for errors? [no]
- --db-attach=no|yes start debugger when errors detected? [no]
- Note: deprecated feature
- --db-command=<command> command to start debugger [... -nw %f %p]
--input-fd=<number> file descriptor for input [0=stdin]
--dsymutil=no|yes run dsymutil on Mac OS X when helpful? [no]
--max-stackframe=<number> assume stack switch for SP changes larger
|
|
From: <sv...@va...> - 2015-07-24 10:23:42
|
Author: rhyskidd
Date: Fri Jul 24 11:23:34 2015
New Revision: 15444
Log:
Fix valgrind 3.9.0 build fails on Mac OS X 10.6.8
bz#327745
Patch by Mark H <mh...@ya...>
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
trunk/coregrind/m_syswrap/syswrap-darwin.c
trunk/include/vki/vki-scnums-darwin.h
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Jul 24 11:23:34 2015
@@ -120,6 +120,7 @@
== 326797
319274 Fix unhandled syscall: unix:410 (sigsuspend_nocancel) on OS X
324181 mmap does not handle MAP_32BIT (handle it now, rather than fail it)
+327745 Fix valgrind 3.9.0 build fails on Mac OS X 10.6.8
333051 mmap of huge pages fails due to incorrect alignment
== 339163
334802 valgrind does not always explain why a given option is bad
Modified: trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
==============================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-darwin.h (original)
+++ trunk/coregrind/m_syswrap/priv_syswrap-darwin.h Fri Jul 24 11:23:34 2015
@@ -350,7 +350,7 @@
DECL_TEMPLATE(darwin, fchmod_extended); // 283
DECL_TEMPLATE(darwin, access_extended); // 284
DECL_TEMPLATE(darwin, settid); // 285
-#if DARWIN_VERS >= DARWIN_10_7
+#if DARWIN_VERS >= DARWIN_10_6
DECL_TEMPLATE(darwin, gettid); // 286
#endif
// NYI setsgroups 287
@@ -362,23 +362,44 @@
// NYI identitysvc 293
// NYI shared_region_check_np 294
// NYI shared_region_map_np 295
+#if DARWIN_VERS >= DARWIN_10_6
+// NYI vm_pressure_monitor 296
+// NYI psynch_rw_longrdlock 297
+// NYI psynch_rw_yieldwrlock 298
+// NYI psynch_rw_downgrade 299
+// NYI psynch_rw_upgrade 300
+DECL_TEMPLATE(darwin, psynch_mutexwait); // 301
+DECL_TEMPLATE(darwin, psynch_mutexdrop); // 302
+DECL_TEMPLATE(darwin, psynch_cvbroad); // 303
+DECL_TEMPLATE(darwin, psynch_cvsignal); // 304
+DECL_TEMPLATE(darwin, psynch_cvwait); // 305
+DECL_TEMPLATE(darwin, psynch_rw_rdlock); // 306
+DECL_TEMPLATE(darwin, psynch_rw_wrlock); // 307
+DECL_TEMPLATE(darwin, psynch_rw_unlock); // 308
+// NYI psynch_rw_unlock2 309
+#else
// old load_shared_file
// old reset_shared_file
// old new_system_shared_regions
// old shared_region_map_file_np
// old shared_region_make_private_np
-DECL_TEMPLATE(darwin, psynch_mutexwait); // 301 // new in 10.7 ?
-DECL_TEMPLATE(darwin, psynch_mutexdrop); // 302 // new in 10.7 ?
-DECL_TEMPLATE(darwin, psynch_cvbroad); // 303 // new in 10.7 ?
-DECL_TEMPLATE(darwin, psynch_cvsignal); // 304 // new in 10.7 ?
-DECL_TEMPLATE(darwin, psynch_cvwait); // 305 // new in 10.7 ?
-DECL_TEMPLATE(darwin, psynch_rw_rdlock); // 306 // new in 10.7 ?
-DECL_TEMPLATE(darwin, psynch_rw_wrlock); // 307 // new in 10.7 ?
-DECL_TEMPLATE(darwin, psynch_rw_unlock); // 308 // new in 10.7 ?
+// NYI __pthread_mutex_destroy 301
+// NYI __pthread_mutex_init 302
+// NYI __pthread_mutex_lock 303
+// NYI __pthread_mutex_trylock 304
+// NYI __pthread_mutex_unlock 305
+// NYI __pthread_cond_init 306
+// NYI __pthread_cond_destroy 307
+// NYI __pthread_cond_broadcast 308
// NYI __pthread_cond_signal 309
+#endif
// NYI getsid 310
// NYI settid_with_pid 311
-DECL_TEMPLATE(darwin, psynch_cvclrprepost); // 312 // new in 10.7 ?
+#if DARWIN_VERS >= DARWIN_10_7
+DECL_TEMPLATE(darwin, psynch_cvclrprepost); // 312
+#else
+// NYI __pthread_cond_timedwait 312
+#endif
// NYI aio_fsync 313
DECL_TEMPLATE(darwin, aio_return); // 314
DECL_TEMPLATE(darwin, aio_suspend); // 315
@@ -402,9 +423,7 @@
DECL_TEMPLATE(darwin, __pthread_canceled); // 333
DECL_TEMPLATE(darwin, __semwait_signal); // 334
// old utrace
-#if DARWIN_VERS >= DARWIN_10_6
DECL_TEMPLATE(darwin, proc_info); // 336
-#endif
DECL_TEMPLATE(darwin, sendfile); // 337
DECL_TEMPLATE(darwin, stat64); // 338
DECL_TEMPLATE(darwin, fstat64); // 339
@@ -425,9 +444,7 @@
// NYI setauid 354
// NYI getaudit 355
// NYI setaudit 356
-#if DARWIN_VERS >= DARWIN_10_7
DECL_TEMPLATE(darwin, getaudit_addr) // 357
-#endif
// NYI setaudit_addr 358
// NYI auditctl 359
DECL_TEMPLATE(darwin, bsdthread_create); // 360
@@ -442,7 +459,9 @@
DECL_TEMPLATE(darwin, kevent64); // 369
// 370
// 371
+#if DARWIN_VERS >= DARWIN_10_6
DECL_TEMPLATE(darwin, __thread_selfid); // 372
+#endif
// 373
// 374
// 375
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Fri Jul 24 11:23:34 2015
@@ -3171,47 +3171,6 @@
count, (Addr)p-(Addr)ARG3, ARG4);
}
-
-PRE(fsgetpath)
-{
-#if VG_WORDSIZE == 4
- PRINT("fsgetpath(%#lx, %ld, %#lx {%u,%u}, %llu)",
- ARG1, ARG2, ARG3,
- ((unsigned int *)ARG3)[0], ((unsigned int *)ARG3)[1],
- LOHI64(ARG4, ARG5));
- PRE_REG_READ5(ssize_t, "fsgetpath",
- void*,"buf", size_t,"bufsize",
- fsid_t *,"fsid",
- vki_uint32_t, "objid_low32", vki_uint32_t, "objid_high32");
-#else
- PRINT("fsgetpath(%#lx, %ld, %#lx {%u,%u}, %lu)",
- ARG1, ARG2, ARG3,
- ((unsigned int *)ARG3)[0],
- ((unsigned int *)ARG3)[1], ARG4);
- PRE_REG_READ4(ssize_t, "fsgetpath",
- void*,"buf", size_t,"bufsize",
- fsid_t *,"fsid", uint64_t,"objid");
-#endif
- PRE_MEM_READ("fsgetpath(fsid)", ARG3, sizeof(fsid_t));
- PRE_MEM_WRITE("fsgetpath(buf)", ARG1, ARG2);
-}
-
-POST(fsgetpath)
-{
- POST_MEM_WRITE(ARG1, RES);
-}
-
-PRE(audit_session_self)
-{
- PRINT("audit_session_self()");
-}
-
-POST(audit_session_self)
-{
- record_named_port(tid, RES, MACH_PORT_RIGHT_SEND, "audit-session-%p");
- PRINT("audit-session %#lx", RES);
-}
-
PRE(exchangedata)
{
PRINT("exchangedata(%#lx(%s), %#lx(%s), %lu)",
@@ -4141,6 +4100,17 @@
}
}
+PRE(getaudit_addr)
+{
+ PRINT("getaudit_addr(%#lx, %lu)", ARG1, ARG2);
+ PRE_REG_READ1(void*, "auditinfo_addr", int, "length");
+ PRE_MEM_WRITE("getaudit_addr(auditinfo_addr)", ARG1, ARG2);
+}
+POST(getaudit_addr)
+{
+ POST_MEM_WRITE(ARG1, ARG2);
+}
+
PRE(mmap)
{
@@ -4386,7 +4356,6 @@
uint32_t flavor, uint64_t arg,
user_addr_t buffer, int32_t buffersize)
*/
-#if DARWIN_VERS >= DARWIN_10_6
PRE(proc_info)
{
#if VG_WORDSIZE == 4
@@ -4452,7 +4421,6 @@
#endif
}
-#endif /* DARWIN_VERS >= DARWIN_10_6 */
/* ---------------------------------------------------------------------
aio_*
@@ -8718,12 +8686,6 @@
//}
-PRE(__thread_selfid)
-{
- PRINT("__thread_selfid ()");
- PRE_REG_READ0(vki_uint64_t, "__thread_selfid");
-}
-
PRE(task_for_pid)
{
PRINT("task_for_pid(%s, %ld, %#lx)", name_for_port(ARG1), ARG2, ARG3);
@@ -9072,21 +9034,10 @@
/* ---------------------------------------------------------------------
- Added for OSX 10.7 (Lion)
+ Added for OSX 10.6 (Snow Leopard)
------------------------------------------------------------------ */
-#if DARWIN_VERS >= DARWIN_10_7
-
-PRE(getaudit_addr)
-{
- PRINT("getaudit_addr(%#lx, %lu)", ARG1, ARG2);
- PRE_REG_READ1(void*, "auditinfo_addr", int, "length");
- PRE_MEM_WRITE("getaudit_addr(auditinfo_addr)", ARG1, ARG2);
-}
-POST(getaudit_addr)
-{
- POST_MEM_WRITE(ARG1, ARG2);
-}
+#if DARWIN_VERS >= DARWIN_10_6
PRE(psynch_mutexwait)
{
@@ -9157,6 +9108,60 @@
{
}
+PRE(__thread_selfid)
+{
+ PRINT("__thread_selfid ()");
+ PRE_REG_READ0(vki_uint64_t, "__thread_selfid");
+}
+
+PRE(fsgetpath)
+{
+#if VG_WORDSIZE == 4
+ PRINT("fsgetpath(%#lx, %ld, %#lx {%u,%u}, %llu)",
+ ARG1, ARG2, ARG3,
+ ((unsigned int *)ARG3)[0], ((unsigned int *)ARG3)[1],
+ LOHI64(ARG4, ARG5));
+ PRE_REG_READ5(ssize_t, "fsgetpath",
+ void*,"buf", size_t,"bufsize",
+ fsid_t *,"fsid",
+ vki_uint32_t, "objid_low32", vki_uint32_t, "objid_high32");
+#else
+ PRINT("fsgetpath(%#lx, %ld, %#lx {%u,%u}, %lu)",
+ ARG1, ARG2, ARG3,
+ ((unsigned int *)ARG3)[0],
+ ((unsigned int *)ARG3)[1], ARG4);
+ PRE_REG_READ4(ssize_t, "fsgetpath",
+ void*,"buf", size_t,"bufsize",
+ fsid_t *,"fsid", uint64_t,"objid");
+#endif
+ PRE_MEM_READ("fsgetpath(fsid)", ARG3, sizeof(fsid_t));
+ PRE_MEM_WRITE("fsgetpath(buf)", ARG1, ARG2);
+}
+
+POST(fsgetpath)
+{
+ POST_MEM_WRITE(ARG1, RES);
+}
+
+PRE(audit_session_self)
+{
+ PRINT("audit_session_self()");
+}
+POST(audit_session_self)
+{
+ record_named_port(tid, RES, MACH_PORT_RIGHT_SEND, "audit-session-%p");
+ PRINT("audit-session %#lx", RES);
+}
+
+#endif /* DARWIN_VERS >= DARWIN_10_6 */
+
+
+/* ---------------------------------------------------------------------
+ Added for OSX 10.7 (Lion)
+ ------------------------------------------------------------------ */
+
+#if DARWIN_VERS >= DARWIN_10_7
+
PRE(psynch_cvclrprepost)
{
PRINT("psynch_cvclrprepost(BOGUS)");
@@ -9996,13 +10001,10 @@
// _____(__NR_shared_region_map_np),
#if DARWIN_VERS >= DARWIN_10_6
// _____(__NR_vm_pressure_monitor),
-#else
- _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(296)), // old load_shared_file
-#endif
- _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(297)), // old reset_shared_file
- _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(298)), // old new_system_shared_regions
- _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(299)), // old shared_region_map_file_np
- _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(300)), // old shared_region_make_private_np
+// _____(__NR_psynch_rw_longrdlock),
+// _____(__NR_psynch_rw_yieldwrlock),
+// _____(__NR_psynch_rw_downgrade),
+// _____(__NR_psynch_rw_upgrade),
MACXY(__NR_psynch_mutexwait, psynch_mutexwait), // 301
MACXY(__NR_psynch_mutexdrop, psynch_mutexdrop), // 302
MACXY(__NR_psynch_cvbroad, psynch_cvbroad), // 303
@@ -10011,10 +10013,30 @@
MACXY(__NR_psynch_rw_rdlock, psynch_rw_rdlock), // 306
MACXY(__NR_psynch_rw_wrlock, psynch_rw_wrlock), // 307
MACXY(__NR_psynch_rw_unlock, psynch_rw_unlock), // 308
- _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(309)), // ???
+// _____(__NR_psynch_rw_unlock2),
+#else
+ _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(296)), // old load_shared_file
+ _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(297)), // old reset_shared_file
+ _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(298)), // old new_system_shared_regions
+ _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(299)), // old shared_region_map_file_np
+ _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(300)), // old shared_region_make_private_np
+// _____(__NR___pthread_mutex_destroy),
+// _____(__NR___pthread_mutex_init),
+// _____(__NR___pthread_mutex_lock),
+// _____(__NR___pthread_mutex_trylock),
+// _____(__NR___pthread_mutex_unlock),
+// _____(__NR___pthread_cond_init),
+// _____(__NR___pthread_cond_destroy),
+// _____(__NR___pthread_cond_broadcast),
+// _____(__NR___pthread_cond_signal),
+#endif
// _____(__NR_getsid),
// _____(__NR_settid_with_pid),
+#if DARWIN_VERS >= DARWIN_10_7
MACXY(__NR_psynch_cvclrprepost, psynch_cvclrprepost), // 312
+#else
+ _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(308)), // old __pthread_cond_timedwait
+#endif
// _____(__NR_aio_fsync),
MACXY(__NR_aio_return, aio_return),
MACX_(__NR_aio_suspend, aio_suspend),
@@ -10044,9 +10066,7 @@
MACX_(__NR___pthread_canceled, __pthread_canceled),
MACX_(__NR___semwait_signal, __semwait_signal),
_____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(335)), // old utrace
-#if DARWIN_VERS >= DARWIN_10_6
MACXY(__NR_proc_info, proc_info), // 336
-#endif
MACXY(__NR_sendfile, sendfile),
MACXY(__NR_stat64, stat64),
MACXY(__NR_fstat64, fstat64),
@@ -10067,9 +10087,7 @@
// _____(__NR_setauid),
// _____(__NR_getaudit),
// _____(__NR_setaudit),
-#if DARWIN_VERS >= DARWIN_10_7
MACXY(__NR_getaudit_addr, getaudit_addr),
-#endif
// _____(__NR_setaudit_addr),
// _____(__NR_auditctl),
MACXY(__NR_bsdthread_create, bsdthread_create), // 360
Modified: trunk/include/vki/vki-scnums-darwin.h
==============================================================================
--- trunk/include/vki/vki-scnums-darwin.h (original)
+++ trunk/include/vki/vki-scnums-darwin.h Fri Jul 24 11:23:34 2015
@@ -536,25 +536,42 @@
#define __NR_shared_region_map_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(295)
#if DARWIN_VERS >= DARWIN_10_6
#define __NR_vm_pressure_monitor VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(296)
+#define __NR_psynch_rw_longrdlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(297)
+#define __NR_psynch_rw_yieldwrlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(298)
+#define __NR_psynch_rw_downgrade VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(299)
+#define __NR_psynch_rw_upgrade VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(300)
+#define __NR_psynch_mutexwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(301)
+#define __NR_psynch_mutexdrop VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(302)
+#define __NR_psynch_cvbroad VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(303)
+#define __NR_psynch_cvsignal VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(304)
+#define __NR_psynch_cvwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(305)
+#define __NR_psynch_rw_rdlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(306)
+#define __NR_psynch_rw_wrlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(307)
+#define __NR_psynch_rw_unlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(308)
+#define __NR_psynch_rw_unlock2 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(309)
#else
/* 296 old load_shared_file */
-#endif
/* 297 old reset_shared_file */
/* 298 old new_system_shared_regions */
/* 299 old shared_region_map_file_np */
/* 300 old shared_region_make_private_np */
-#define __NR_psynch_mutexwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(301)
-#define __NR_psynch_mutexdrop VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(302)
-#define __NR_psynch_cvbroad VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(303)
-#define __NR_psynch_cvsignal VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(304)
-#define __NR_psynch_cvwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(305)
-#define __NR_psynch_rw_rdlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(306)
-#define __NR_psynch_rw_wrlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(307)
-#define __NR_psynch_rw_unlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(308)
- /* 309 */
+#define __NR___pthread_mutex_destroy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(301)
+#define __NR___pthread_mutex_init VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(302)
+#define __NR___pthread_mutex_lock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(303)
+#define __NR___pthread_mutex_trylock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(304)
+#define __NR___pthread_mutex_unlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(305)
+#define __NR___pthread_cond_init VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(306)
+#define __NR___pthread_cond_destroy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(307)
+#define __NR___pthread_cond_broadcast VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(308)
+#define __NR___pthread_cond_signal VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(309)
+#endif
#define __NR_getsid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(310)
#define __NR_settid_with_pid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(311)
+#if DARWIN_VERS >= DARWIN_10_7
#define __NR_psynch_cvclrprepost VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(312)
+#else
+#define __NR___pthread_cond_timedwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(312)
+#endif
#define __NR_aio_fsync VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(313)
#define __NR_aio_return VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(314)
#define __NR_aio_suspend VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(315)
|
|
From: Matthias S. <zz...@ge...> - 2015-07-23 19:12:37
|
There are two testcases using partial defined bytes (bz2 and heap_pdb4).
Adding larger caches did not enlarge the hit rate, so I implemented only
a one element cache.
Pdb testcases get faster by 2 to 2.9 percent.
The only strange observation is that bz2 gets slower on amd64.
hitrate:
perf/bz2: 8142653/8405577 = 96.9%
perf/heap_pdb4: 6000000/9600000 = 62.5%
x86 performance (--reps=10):
-- bz2 --
bz2 orig :0.42s me:5.08s (12.10x, -----)
bz2 withcache :0.42s me:4.98s (11.86x, 2.0%)
-- heap_pdb4 --
heap_pdb4 orig :0.08s me:7.18s (89.75x, -----)
heap_pdb4 withcache :0.08s me:6.97s (87.12x, 2.9%)
== 2 programs, 4 timings =================
amd64 performance:
-- bz2 --
bz2 orig :0.42s me:4.47s (10.64x, -----)
bz2 withcache :0.42s me:4.54s (10.81x, -1.6%)
-- heap_pdb4 --
heap_pdb4 orig :0.07s me:6.42s (91.71x, -----)
heap_pdb4 withcache :0.07s me:6.29s (89.86x, 2.0%)
== 2 programs, 4 timings =================
---
memcheck/mc_main.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 66 insertions(+), 2 deletions(-)
diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c
index f30460a..ed0b73e 100644
--- a/memcheck/mc_main.c
+++ b/memcheck/mc_main.c
@@ -918,6 +918,53 @@ typedef
}
SecVBitNode;
+// Additional cache of one element.
+// No perf testcase did perform better with a larger cache.
+typedef
+ struct {
+ Addr alignedAddr;
+ SecVBitNode *node;
+ }
+ SecVBitCache;
+static SecVBitCache secVBitCache;
+
+static void SecVBitCacheAdd(Addr aAligned, SecVBitNode * n)
+{
+ DEBUG("SecVBitCacheAdd %#lx %#lx\n", (long)aAligned, (long)n);
+ PROF_EVENT(141, "SecVBitCacheAdd");
+ secVBitCache.alignedAddr = aAligned;
+ secVBitCache.node = n;
+}
+
+static SecVBitNode *SecVBitCacheGet(Addr aAligned)
+{
+ SecVBitNode * n;
+ PROF_EVENT(142, "SecVBitCacheGet");
+ if (LIKELY(secVBitCache.alignedAddr == aAligned))
+ {
+ PROF_EVENT(143, "SecVBitCacheGet_hit");
+ DEBUG("SecVBitCacheGet hit: %#lx %#lx\n", (long)aAligned, (long)secVBitCache.node);
+ return secVBitCache.node;
+ }
+
+ PROF_EVENT(144, "SecVBitCacheGet_miss");
+ n = VG_(OSetGen_Lookup)(secVBitTable, &aAligned);
+ DEBUG("SecVBitCacheGet miss %#lx %#lx\n", (long)aAligned, (long)n);
+
+ // Is unconditionally writing faster than branching?
+ // If the value is NULL, a node will be created irectly after this call.
+ if (LIKELY(n))
+ SecVBitCacheAdd(aAligned, n);
+ return n;
+}
+
+static void SecVBitCacheClear(void)
+{
+ PROF_EVENT(140, "SecVBitCacheClear");
+ DEBUG("SecVBitCacheClear\n");
+ secVBitCache.alignedAddr = 0;
+}
+
static OSet* createSecVBitTable(void)
{
OSet* newSecVBitTable;
@@ -938,6 +985,7 @@ static void gcSecVBitTable(void)
Int i, n_nodes = 0, n_survivors = 0;
GCs_done++;
+ SecVBitCacheClear();
// Create the new table.
secVBitTable2 = createSecVBitTable();
@@ -999,7 +1047,7 @@ static UWord get_sec_vbits8(Addr a)
{
Addr aAligned = VG_ROUNDDN(a, BYTES_PER_SEC_VBIT_NODE);
Int amod = a % BYTES_PER_SEC_VBIT_NODE;
- SecVBitNode* n = VG_(OSetGen_Lookup)(secVBitTable, &aAligned);
+ SecVBitNode* n = SecVBitCacheGet(aAligned);
UChar vbits8;
tl_assert2(n, "get_sec_vbits8: no node for address %p (%p)\n", aAligned, a);
// Shouldn't be fully defined or fully undefined -- those cases shouldn't
@@ -1013,7 +1061,7 @@ static void set_sec_vbits8(Addr a, UWord vbits8)
{
Addr aAligned = VG_ROUNDDN(a, BYTES_PER_SEC_VBIT_NODE);
Int i, amod = a % BYTES_PER_SEC_VBIT_NODE;
- SecVBitNode* n = VG_(OSetGen_Lookup)(secVBitTable, &aAligned);
+ SecVBitNode* n = SecVBitCacheGet(aAligned);
// Shouldn't be fully defined or fully undefined -- those cases shouldn't
// make it to the secondary V bits table.
tl_assert(V_BITS8_DEFINED != vbits8 && V_BITS8_UNDEFINED != vbits8);
@@ -1043,6 +1091,8 @@ static void set_sec_vbits8(Addr a, UWord vbits8)
n_secVBit_nodes = VG_(OSetGen_Size)(secVBitTable);
if (n_secVBit_nodes > max_secVBit_nodes)
max_secVBit_nodes = n_secVBit_nodes;
+
+ SecVBitCacheAdd(aAligned, n);
}
}
@@ -1359,6 +1409,13 @@ ULong mc_LOADVn_slow ( Addr a, SizeT nBits, Bool bigendian )
UChar vbits8;
Bool ok;
+ if ((nBits == 16 && a & 1)
+ || (nBits == 32 && a & 3)
+ || (nBits == 64 && a & 7)
+ )
+ {
+ PROF_EVENT(32, "mc_LOADVn_slow_unaligned");
+ }
tl_assert(nBits == 64 || nBits == 32 || nBits == 16 || nBits == 8);
/* Make up a 64-bit result V word, which contains the loaded data
@@ -1525,6 +1582,13 @@ void mc_STOREVn_slow ( Addr a, SizeT nBits, ULong vbytes, Bool bigendian )
}
/* ------------ END semi-fast cases ------------ */
+ if ((nBits == 16 && a & 1)
+ || (nBits == 32 && a & 3)
+ || (nBits == 64 && a & 7)
+ )
+ {
+ PROF_EVENT(37, "mc_STOREVn_slow_unaligned");
+ }
tl_assert(nBits == 64 || nBits == 32 || nBits == 16 || nBits == 8);
/* Dump vbytes in memory, iterating from least to most significant
--
2.4.5
|
|
From: Matthias S. <zz...@ge...> - 2015-07-23 17:36:47
|
An additional comment to memcheck profiling.
The counter values should be printed unsigned. For same cases it might
even be useful to have 64bit counters instead.
--- a/memcheck/mc_main.c
+++ b/memcheck/mc_main.c
@@ -6363,7 +6363,7 @@ static void done_prof_mem ( void )
}
if (MC_(event_ctr)[i] > 0) {
spaced = False;
- VG_(printf)( "prof mem event %3d: %9d %s\n",
+ VG_(printf)( "prof mem event %3d: %9u %s\n",
i, MC_(event_ctr)[i],
MC_(event_ctr_name)[i]
? MC_(event_ctr_name)[i] : "unnamed");
Regards
Matthias
|
|
From: <sv...@va...> - 2015-07-23 13:25:03
|
Author: florian
Date: Tue Jul 21 22:37:23 2015
New Revision: 15429
Log:
Fix BZ #338606. Basically, the bug was that it was believed that
the interpreter following the #! has to be an absolute path name.
Not so; relative path works just fine.
Added:
trunk/none/tests/scripts/relative1 (with props)
trunk/none/tests/scripts/relative1.stderr.exp
trunk/none/tests/scripts/relative1.stdout.exp
trunk/none/tests/scripts/relative1.vgtest
trunk/none/tests/scripts/relative2 (with props)
trunk/none/tests/scripts/relative2.stderr.exp
trunk/none/tests/scripts/relative2.stdout.exp
trunk/none/tests/scripts/relative2.vgtest
trunk/none/tests/scripts/say-hello.helper (with props)
Modified:
trunk/NEWS
trunk/coregrind/m_ume/script.c
trunk/none/tests/scripts/Makefile.am
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue Jul 21 22:37:23 2015
@@ -128,6 +128,7 @@
== 343175
== 342740
335907 segfault when running wine's ddrawex/tests/surface.c under valgrind
+338606 Strange message for scripts with invalid interpreter
338731 ppc: Fix testuite build for toolchains not supporting -maltivec
338995 shmat with hugepages (SHM_HUGETLB) fails with EINVAL
339045 Getting valgrind to compile and run on OS X Yosemite (10.10)
Modified: trunk/coregrind/m_ume/script.c
==============================================================================
--- trunk/coregrind/m_ume/script.c (original)
+++ trunk/coregrind/m_ume/script.c Tue Jul 21 22:37:23 2015
@@ -1,3 +1,4 @@
+/* -*- mode: C; c-basic-offset: 3; -*- */
/*--------------------------------------------------------------------*/
/*--- User-mode execve() for #! scripts. m_ume_script.c ---*/
@@ -41,35 +42,27 @@
#include "priv_ume.h"
+/* Return true, if the first line begins with #! and contains an
+ interpreter. */
Bool VG_(match_script)(const void *hdr, SizeT len)
{
const HChar* script = hdr;
const HChar* end = script + len;
const HChar* interp = script + 2;
- // len < 4: need '#', '!', plus at least a '/' and one more char
- if (len < 4) return False;
+ if (len < 2) return False;
if (0 != VG_(memcmp)(hdr, "#!", 2)) return False;
- // Find interpreter name, make sure it's an absolute path (starts with
- // '/') and has at least one more char. First, skip over any space
- // between the #! and the start of the interpreter name
+ // Find interpreter name, which may be absolute or relative.
+ // First, skip over any space between the #! and the start of the
+ // interpreter name
while (interp < end && (*interp == ' ' || *interp == '\t')) interp++;
// overrun?
if (interp >= end) return False; // can't find start of interp name
- // interp should now point at the /
- if (*interp != '/') return False; // absolute path only for interpreter
-
- // check for something plausible after the /
- interp++;
- if (interp >= end) return False;
- if (VG_(isspace)(*interp)) return False;
-
- // Here we should get the full interpreter name and check it with
- // check_executable(). See the "EXEC FAILED" failure when running shell
- // for an example.
+ // No interpreter found.
+ if (*interp == '\n') return False;
return True; // looks like a #! script
}
@@ -103,8 +96,6 @@
while (interp < end && (*interp == ' ' || *interp == '\t'))
interp++;
- vg_assert(*interp == '/'); /* absolute path only for interpreter */
-
/* skip over interpreter name */
for (cp = interp; cp < end && !VG_(isspace)(*cp); cp++)
;
Modified: trunk/none/tests/scripts/Makefile.am
==============================================================================
--- trunk/none/tests/scripts/Makefile.am (original)
+++ trunk/none/tests/scripts/Makefile.am Tue Jul 21 22:37:23 2015
@@ -7,7 +7,9 @@
filter_stderr
EXTRA_DIST = \
+ say-hello.helper \
bug231357.vgtest bug231357.stderr.exp bug231357.stdout.exp \
+ bug338606.vgtest bug338606.stderr.exp \
shell shell.vgtest shell.stderr.exp shell.stderr.exp-dash \
shell.stdout.exp shell.stderr.exp-dash2 shell.stderr.exp-illumos \
shell.stderr.exp-solaris shell.stderr.exp-solaris-spawn \
@@ -22,6 +24,8 @@
shell_nointerp3.stdout.exp \
shell_nonexec.vgtest shell_nonexec.stderr.exp \
shell_nosuchfile.vgtest shell_nosuchfile.stderr.exp \
+ relative1 relative1.vgtest relative1.stderr.exp relative1.stdout.exp \
+ relative2 relative2.vgtest relative2.stderr.exp relative2.stdout.exp \
shell_valid1 shell_valid1.vgtest shell_valid1.stderr.exp \
shell_valid4 shell_valid4.vgtest shell_valid4.stderr.exp \
shell_valid4.stdout.exp \
Added: trunk/none/tests/scripts/relative1
==============================================================================
--- trunk/none/tests/scripts/relative1 (added)
+++ trunk/none/tests/scripts/relative1 Tue Jul 21 22:37:23 2015
@@ -0,0 +1 @@
+#!./say-hello.helper
Added: trunk/none/tests/scripts/relative1.stderr.exp
==============================================================================
(empty)
Added: trunk/none/tests/scripts/relative1.stdout.exp
==============================================================================
--- trunk/none/tests/scripts/relative1.stdout.exp (added)
+++ trunk/none/tests/scripts/relative1.stdout.exp Tue Jul 21 22:37:23 2015
@@ -0,0 +1 @@
+hello
Added: trunk/none/tests/scripts/relative1.vgtest
==============================================================================
--- trunk/none/tests/scripts/relative1.vgtest (added)
+++ trunk/none/tests/scripts/relative1.vgtest Tue Jul 21 22:37:23 2015
@@ -0,0 +1,2 @@
+prog: relative1
+vgopts: -q
Added: trunk/none/tests/scripts/relative2
==============================================================================
--- trunk/none/tests/scripts/relative2 (added)
+++ trunk/none/tests/scripts/relative2 Tue Jul 21 22:37:23 2015
@@ -0,0 +1 @@
+#! ../scripts/./say-hello.helper
Added: trunk/none/tests/scripts/relative2.stderr.exp
==============================================================================
(empty)
Added: trunk/none/tests/scripts/relative2.stdout.exp
==============================================================================
--- trunk/none/tests/scripts/relative2.stdout.exp (added)
+++ trunk/none/tests/scripts/relative2.stdout.exp Tue Jul 21 22:37:23 2015
@@ -0,0 +1 @@
+hello
Added: trunk/none/tests/scripts/relative2.vgtest
==============================================================================
--- trunk/none/tests/scripts/relative2.vgtest (added)
+++ trunk/none/tests/scripts/relative2.vgtest Tue Jul 21 22:37:23 2015
@@ -0,0 +1,2 @@
+prog: relative2
+vgopts: -q
Added: trunk/none/tests/scripts/say-hello.helper
==============================================================================
--- trunk/none/tests/scripts/say-hello.helper (added)
+++ trunk/none/tests/scripts/say-hello.helper Tue Jul 21 22:37:23 2015
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo hello
|
|
From: <sv...@va...> - 2015-07-23 13:25:03
|
Author: florian
Date: Tue Jul 21 22:01:40 2015
New Revision: 15428
Log:
Update list of ignored files from solaris port.
Modified:
trunk/coregrind/ (props changed)
trunk/gdbserver_tests/solaris/ (props changed)
trunk/memcheck/tests/amd64-solaris/ (props changed)
trunk/memcheck/tests/solaris/ (props changed)
trunk/memcheck/tests/x86-solaris/ (props changed)
trunk/none/tests/amd64/ (props changed)
trunk/none/tests/amd64-solaris/ (props changed)
trunk/none/tests/solaris/ (props changed)
trunk/none/tests/x86-solaris/ (props changed)
trunk/solaris/ (props changed)
|
|
From: <sv...@va...> - 2015-07-23 13:25:03
|
Author: florian
Date: Tue Jul 21 22:49:06 2015
New Revision: 15431
Log:
Add testcase. Should have been in r15429.
Added:
trunk/none/tests/scripts/bug338606 (with props)
trunk/none/tests/scripts/bug338606.stderr.exp
trunk/none/tests/scripts/bug338606.vgtest
Added: trunk/none/tests/scripts/bug338606
==============================================================================
--- trunk/none/tests/scripts/bug338606 (added)
+++ trunk/none/tests/scripts/bug338606 Tue Jul 21 22:49:06 2015
@@ -0,0 +1,4 @@
+#!usr/bin/perl
+
+print "hello\n";
+exit 0;
Added: trunk/none/tests/scripts/bug338606.stderr.exp
==============================================================================
--- trunk/none/tests/scripts/bug338606.stderr.exp (added)
+++ trunk/none/tests/scripts/bug338606.stderr.exp Tue Jul 21 22:49:06 2015
@@ -0,0 +1 @@
+valgrind: ./bug338606: bad interpreter: No such file or directory
Added: trunk/none/tests/scripts/bug338606.vgtest
==============================================================================
--- trunk/none/tests/scripts/bug338606.vgtest (added)
+++ trunk/none/tests/scripts/bug338606.vgtest Tue Jul 21 22:49:06 2015
@@ -0,0 +1,7 @@
+# This test used to produce a most bizarre message:
+#
+# Warning: unknown mime-type for "hello\n" -- using "application/octet-stream"
+# Error: no such file "hello\n"
+#
+prog: bug338606
+vgopts: -q
|
|
From: <sv...@va...> - 2015-07-23 13:25:03
|
Author: sewardj
Date: Tue Jul 21 16:38:43 2015
New Revision: 15427
Log:
Fix incorrect implementation of LOADV64le that was added in r15418.
Modified:
trunk/memcheck/mc_main.c
Modified: trunk/memcheck/mc_main.c
==============================================================================
--- trunk/memcheck/mc_main.c (original)
+++ trunk/memcheck/mc_main.c Tue Jul 21 16:38:43 2015
@@ -4562,7 +4562,7 @@
" ldr r2, [r3, r2, lsl #2] \n"
" uxth r1, r0 \n" // r1 is 0-(16)-0 X-(13)-X 000
" movw r3, #0xAAAA \n"
-" lsr r1, r1, #3 \n"
+" lsr r1, r1, #2 \n" // r1 is 0-(16)-0 00 X-(13)-X 0
" ldrh r1, [r2, r1] \n"
" cmp r1, r3 \n" // 0xAAAA == VA_BITS16_DEFINED
" bne .LLV64LEc0 \n" // if !all_defined
|
|
From: <sv...@va...> - 2015-07-23 13:23:26
|
Author: florian
Date: Thu Jul 16 22:43:30 2015
New Revision: 15414
Log:
Announce bug fix for BZ #350251
Modified:
trunk/NEWS
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Thu Jul 16 22:43:30 2015
@@ -318,6 +318,7 @@
340807 disInstr(arm): unhandled instruction: 0xEE989B20
340856 disInstr(arm64): unhandled instruction 0x1E634C45 (fcsel)
340922 arm64: unhandled getgroups/setgroups syscalls
+350251 Fix typo in VEX utility program (test_main.c).
n-i-bz DRD and Helgrind: Handle Imbe_CancelReservation (clrex on ARM)
n-i-bz Add missing ]] to terminate CDATA.
n-i-bz Glibc versions prior to 2.5 do not define PTRACE_GETSIGINFO
|
|
From: <sv...@va...> - 2015-07-23 06:21:13
|
Author: rhyskidd
Date: Thu Jul 23 07:21:07 2015
New Revision: 15443
Log:
Resolve makefile consistency error at conclusion of make regtest
Modified:
trunk/none/tests/x86/Makefile.am
Modified: trunk/none/tests/x86/Makefile.am
==============================================================================
--- trunk/none/tests/x86/Makefile.am (original)
+++ trunk/none/tests/x86/Makefile.am Thu Jul 23 07:21:07 2015
@@ -59,6 +59,8 @@
$(addsuffix .stdout.exp,$(INSN_TESTS)) \
$(addsuffix .vgtest,$(INSN_TESTS)) \
insn_fpu.stdout.exp insn_fpu.stderr.exp insn_fpu.vgtest \
+ insn_sse.stdout.exp insn_sse.stderr.exp insn_sse.vgtest \
+ insn_sse2.stdout.exp insn_sse2.stderr.exp insn_sse2.vgtest \
insn_sse3.stdout.exp insn_sse3.stderr.exp insn_sse3.vgtest \
insn_ssse3.stdout.exp insn_ssse3.stderr.exp insn_ssse3.vgtest \
jcxz.stdout.exp jcxz.stderr.exp jcxz.vgtest \
|
|
From: <sv...@va...> - 2015-07-23 05:49:20
|
Author: rhyskidd
Date: Thu Jul 23 06:49:13 2015
New Revision: 15442
Log:
Complete fix for bz#344416 - Fix make regtest does not work cleanly on OS X (3).
Modified:
trunk/NEWS
trunk/docs/internals/3_10_BUGSTATUS.txt
trunk/none/tests/amd64/Makefile.am
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Thu Jul 23 06:49:13 2015
@@ -198,6 +198,7 @@
344314 callgrind_annotate ... warnings about commands containing newlines
344318 socketcall should wrap recvmmsg and sendmmsg
344337 Fix unhandled syscall: mach:41 (_kernelrpc_mach_port_guard_trap)
+344416 Fix âmake regtest' does not work cleanly on OS X
344499 Fix compilation for Linux kernel >= 4. With this, also require
a Linux kernel >= 2.6 as 2.4 is mostly untested and might trigger
obvious and non-obvious issues
Modified: trunk/docs/internals/3_10_BUGSTATUS.txt
==============================================================================
--- trunk/docs/internals/3_10_BUGSTATUS.txt (original)
+++ trunk/docs/internals/3_10_BUGSTATUS.txt Thu Jul 23 06:49:13 2015
@@ -329,7 +329,6 @@
leak regardless of the simplicity of the program.
344416 'make regtest' does not work cleanly on OS X
- meta-bug
348565 unknown warning options on clang/osx:
Wmissing-parameter-type Wold-style-declaration
Modified: trunk/none/tests/amd64/Makefile.am
==============================================================================
--- trunk/none/tests/amd64/Makefile.am (original)
+++ trunk/none/tests/amd64/Makefile.am Thu Jul 23 06:49:13 2015
@@ -116,16 +116,6 @@
pcmpstr64 pcmpxstrx64 sse4-64 crc32 aes \
pcmpstr64w pcmpxstrx64w
endif
-if BUILD_AVX_TESTS
-if BUILD_VPCLMULQDQ_TESTS
- check_PROGRAMS += avx-1
-endif
-endif
-if BUILD_AVX2_TESTS
-if !COMPILER_IS_ICC
- check_PROGRAMS += avx2-1
-endif
-endif
if BUILD_TSX_TESTS
check_PROGRAMS += tm1 xacq_xrel
endif
@@ -157,6 +147,16 @@
if BUILD_MOVBE_TESTS
check_PROGRAMS += movbe
endif
+if BUILD_AVX_TESTS
+if BUILD_VPCLMULQDQ_TESTS
+ check_PROGRAMS += avx-1
+endif
+endif
+if BUILD_AVX2_TESTS
+if !COMPILER_IS_ICC
+ check_PROGRAMS += avx2-1
+endif
+endif
endif
AM_CFLAGS += @FLAG_M64@
|