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
(18) |
2
(1) |
3
(17) |
4
(10) |
5
(18) |
6
(17) |
|
7
(21) |
8
(25) |
9
(16) |
10
(1) |
11
(4) |
12
(27) |
13
(13) |
|
14
(11) |
15
(19) |
16
(18) |
17
(14) |
18
(25) |
19
(23) |
20
(22) |
|
21
(29) |
22
(16) |
23
(17) |
24
(16) |
25
|
26
(4) |
27
(21) |
|
28
(15) |
29
(19) |
30
(15) |
31
(6) |
|
|
|
|
From: <sv...@va...> - 2012-10-04 23:53:11
|
petarj 2012-10-05 00:53:03 +0100 (Fri, 05 Oct 2012)
New Revision: 13022
Log:
Change uname based arch-check to match machine hardware name in sgcheck.
Some hardware platforms will return "unknown" for 'uname -i', so it is more
accurate and common to run 'uname -m' which returns machine hardware name.
This way, some platforms that do not support sgcheck will avoid running tests
for it.
Modified files:
trunk/exp-sgcheck/tests/is_arch_supported
Modified: trunk/exp-sgcheck/tests/is_arch_supported (+3 -3)
===================================================================
--- trunk/exp-sgcheck/tests/is_arch_supported 2012-10-04 22:38:27 +01:00 (rev 13021)
+++ trunk/exp-sgcheck/tests/is_arch_supported 2012-10-05 00:53:03 -23:00 (rev 13022)
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Not all architectures are supported by exp-ptr. Currently, PowerPC, s390x
-# and ARM are not supported and will fail these tests as follows:
+# Not all architectures are supported by exp-ptr. Currently, PowerPC, s390x,
+# MIPS and ARM are not supported and will fail these tests as follows:
# WARNING: exp-ptrcheck on <blah> platforms: stack and global array
# WARNING: checking is not currently supported. Only heap checking is
# WARNING: supported.
@@ -9,7 +9,7 @@
# So we use this script to prevent these tests from running on unsupported
# architectures.
-case `uname -i` in
+case `uname -m` in
ppc*|arm*|s390x|mips*) exit 1;;
*) exit 0;;
esac
|
|
From: Florian K. <br...@ac...> - 2012-10-04 23:46:56
|
Hi Josef,
thanks for the review!
On 10/01/2012 10:40 AM, Josef Weidendorfer wrote:
> Hi Florian,
>
> Am 30.09.2012 19:17, schrieb Florian Krohm:
>> - In cachegrind: Clarify what LL cache should be used when there are
>> more that 3 levels in the cache hierarchy. Update docs.
>
> See other mail (and below).
Yep, noted.
>
>> - Improve cannot-autodetect warnings from cachegrind. They typically
>> read like so:
>>
>> Warning: Cannot auto-detect cache config on MIPS32, using one
>> or more defaults
>>
>> Mentioning an architecture is redundant as we run natively. And
>> "using one or more defaults" is a usability disaster. Why not say
>> *what* default?
>
> I vote for
> "Cannot auto-detect cache config, using defaults (run with -v to see)"
I like that, too.
> +
> + if (ll && ci->num_levels > 2) {
> + VG_(dmsg)("warning: L%u cache found, using its data for the "
> + "L2 simulation.\n", ci->num_levels);
> + }
>
> I think this warning should not talk about L2, but "LL" (last level).
Yes, you're right. I'll change it.
> Do we want to add "vg_assert(ci->num_levels>1);" here?
We could. But it's not needed as it would imply that we have an I/D L1
caches *and* a unified cache at level 1. That cannot be. In fact,
a comment in libvex.h says:
Additionally, if there exists
a unified cache at a particular level then no other cache exists
at that level.
> +static Int
> +Intel_cache_info_aux(Int level, cache_t* I1c, cache_t* D1c, cache_t* LLc)
> ...
>
> I think this should return both L2 and L3 data now.
>
Yes, that needs to be fixed up. I really only copied the code in place
and made minimum changes to fill in VexCacheInfo. I did not want the
patch to become too large. Also, I need to read up on this cpuid beast
first... not familiar with it.
> There is also some code reinterpreting parameters of the
> micro-ops trace cache on Intel P4 for L1. Such kind of using
> auto-detected values in different ways should be in the tool.
> To be able to do the same now, we need another cache kind
> TRACE_CACHE, and cachegrind can check for this if there is
> no info for an L1 INSN_CACHE.
> On the other hand, not sure it's worth it.
I will get back to you on this one once I understand it better.
My plan is to check in what I had posted including your suggestions.
That'll happen this weekend unless there are further comments.
Then get going on the followup patches.
Florian
|
|
From: Florian K. <br...@ac...> - 2012-10-04 23:29:17
|
On 10/04/2012 07:13 PM, Petar Jovanovic wrote: > a) looks better to me too. > > I can invert the check, but somebody needs to tell me all expected values. > I'd say, just run with (a).. I don't know the expected values either. Florian |
|
From: Petar J. <mip...@gm...> - 2012-10-04 23:13:35
|
a) looks better to me too. I can invert the check, but somebody needs to tell me all expected values. Petar On Fri, Oct 5, 2012 at 1:00 AM, Florian Krohm <br...@ac...> wrote: > On 10/04/2012 01:36 PM, Petar Jovanovic wrote: >> Rather trivial question/dilemma: >> >> In exp-sgcheck\tests\is_arch_supported >> >> can we change: >> >> case `uname -i` in >> ppc*|arm*|s390x|mips*) exit 1;; >> *) exit 0;; >> esac >> >> to either >> >> a) >> >> case `uname -m` in >> ppc*|arm*|s390x|mips*) exit 1;; >> *) exit 0;; >> esac >> > > (a) is fine with me. I don't like (b). > We could also invert the test and check for those archs that are > supported.. > > Florian > >> >> or b) >> >> case `uname -i` in >> ppc*|arm*|s390x|mips*|unknown) exit 1;; >> *) exit 0;; >> esac >> >> since on some platforms such as MIPS, "uname -i" will return "unknown". >> >> Regards, >> Petar > |
|
From: Florian K. <br...@ac...> - 2012-10-04 23:00:37
|
On 10/04/2012 01:36 PM, Petar Jovanovic wrote: > Rather trivial question/dilemma: > > In exp-sgcheck\tests\is_arch_supported > > can we change: > > case `uname -i` in > ppc*|arm*|s390x|mips*) exit 1;; > *) exit 0;; > esac > > to either > > a) > > case `uname -m` in > ppc*|arm*|s390x|mips*) exit 1;; > *) exit 0;; > esac > (a) is fine with me. I don't like (b). We could also invert the test and check for those archs that are supported.. Florian > > or b) > > case `uname -i` in > ppc*|arm*|s390x|mips*|unknown) exit 1;; > *) exit 0;; > esac > > since on some platforms such as MIPS, "uname -i" will return "unknown". > > Regards, > Petar |
|
From: <sv...@va...> - 2012-10-04 21:38:35
|
tom 2012-10-04 22:38:27 +0100 (Thu, 04 Oct 2012)
New Revision: 13021
Log:
Allow a null pointer as the second argument to capget.
Patch from Mark Wielaard to fix BZ#307101.
Modified files:
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/memcheck/tests/x86-linux/scalar.c
Modified: trunk/memcheck/tests/x86-linux/scalar.c (+1 -1)
===================================================================
--- trunk/memcheck/tests/x86-linux/scalar.c 2012-10-04 21:41:12 +01:00 (rev 13020)
+++ trunk/memcheck/tests/x86-linux/scalar.c 2012-10-04 22:38:27 +01:00 (rev 13021)
@@ -813,7 +813,7 @@
// __NR_capget 184
GO(__NR_capget, "2s 2m");
- SY(__NR_capget, x0, x0); FAIL;
+ SY(__NR_capget, x0, x0+1); FAIL;
// __NR_capset 185
GO(__NR_capset, "2s 2m");
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c (+3 -2)
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2012-10-04 21:41:12 +01:00 (rev 13020)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2012-10-04 22:38:27 +01:00 (rev 13021)
@@ -2212,8 +2212,9 @@
vki_cap_user_header_t, header, vki_cap_user_data_t, data);
PRE_MEM_READ( "capget(header)", ARG1,
sizeof(struct __vki_user_cap_header_struct) );
- PRE_MEM_WRITE( "capget(data)", ARG2,
- sizeof(struct __vki_user_cap_data_struct) );
+ if (ARG2 != (Addr)NULL)
+ PRE_MEM_WRITE( "capget(data)", ARG2,
+ sizeof(struct __vki_user_cap_data_struct) );
}
POST(sys_capget)
{
|
|
From: <sv...@va...> - 2012-10-04 20:41:19
|
tom 2012-10-04 21:41:12 +0100 (Thu, 04 Oct 2012)
New Revision: 13020
Log:
Filter out memcpy symbol versions from test results.
Patch from Mark Wielaard to fix BZ#307290.
Added files:
trunk/memcheck/tests/filter_memcpy
Modified files:
trunk/memcheck/tests/Makefile.am
trunk/memcheck/tests/overlap.vgtest
Modified: trunk/memcheck/tests/overlap.vgtest (+1 -0)
===================================================================
--- trunk/memcheck/tests/overlap.vgtest 2012-10-04 21:27:38 +01:00 (rev 13019)
+++ trunk/memcheck/tests/overlap.vgtest 2012-10-04 21:41:12 +01:00 (rev 13020)
@@ -1,2 +1,3 @@
prog: overlap
vgopts: -q
+stderr_filter: filter_memcpy
Property changed: trunk/memcheck/tests/filter_memcpy (+0 -0)
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/memcheck/tests/filter_memcpy (+5 -0)
===================================================================
--- trunk/memcheck/tests/filter_memcpy 2012-10-04 21:27:38 +01:00 (rev 13019)
+++ trunk/memcheck/tests/filter_memcpy 2012-10-04 21:41:12 +01:00 (rev 13020)
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+# mc_replace_strmem.c intercepts various memcpy glibc versions.
+./filter_stderr "$@" |
+perl -p -e "s/: memcpy\@\@?GLIBC_[.1-9]+ \(mc_replace_strmem.c:...\)/: memcpy \(mc_replace_strmem.c:...\)/"
Modified: trunk/memcheck/tests/Makefile.am (+2 -1)
===================================================================
--- trunk/memcheck/tests/Makefile.am 2012-10-04 21:27:38 +01:00 (rev 13019)
+++ trunk/memcheck/tests/Makefile.am 2012-10-04 21:41:12 +01:00 (rev 13020)
@@ -44,7 +44,8 @@
filter_leak_cases_possible \
filter_stderr filter_xml \
filter_varinfo3 \
- filter_memcheck
+ filter_memcheck \
+ filter_memcpy
noinst_HEADERS = leak.h
|
|
From: <sv...@va...> - 2012-10-04 20:27:46
|
tom 2012-10-04 21:27:38 +0100 (Thu, 04 Oct 2012)
New Revision: 13019
Log:
Implement a fake /proc/self/auxv file for linux systems.
Patch from Mark Wielaard to fix BZ#253519.
Added files:
trunk/memcheck/tests/linux/proc-auxv.c
trunk/memcheck/tests/linux/proc-auxv.stderr.exp
trunk/memcheck/tests/linux/proc-auxv.vgtest
Modified files:
trunk/coregrind/m_clientstate.c
trunk/coregrind/m_main.c
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/pub_core_clientstate.h
trunk/memcheck/tests/linux/Makefile.am
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c (+16 -0)
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2012-10-04 21:01:50 +01:00 (rev 13018)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2012-10-04 21:27:38 +01:00 (rev 13019)
@@ -3332,6 +3332,22 @@
return;
}
+ /* Do the same for /proc/self/auxv or /proc/<pid>/auxv case. */
+
+ VG_(sprintf)(name, "/proc/%d/auxv", VG_(getpid)());
+ if (ML_(safe_to_deref)( (void*)ARG2, 1 )
+ && (VG_(strcmp)((Char *)ARG2, name) == 0
+ || VG_(strcmp)((Char *)ARG2, "/proc/self/auxv") == 0)) {
+ sres = VG_(dup)( VG_(cl_auxv_fd) );
+ SET_STATUS_from_SysRes( sres );
+ if (!sr_isError(sres)) {
+ OffT off = VG_(lseek)( sr_Res(sres), 0, VKI_SEEK_SET );
+ if (off < 0)
+ SET_STATUS_Failure( VKI_EMFILE );
+ }
+ return;
+ }
+
/* Otherwise handle normally */
*flags |= SfMayBlock;
}
Added: trunk/memcheck/tests/linux/proc-auxv.stderr.exp (+2 -0)
===================================================================
--- trunk/memcheck/tests/linux/proc-auxv.stderr.exp 2012-10-04 21:01:50 +01:00 (rev 13018)
+++ trunk/memcheck/tests/linux/proc-auxv.stderr.exp 2012-10-04 21:27:38 +01:00 (rev 13019)
@@ -0,0 +1,2 @@
+entries OK
+platform OK
Added: trunk/memcheck/tests/linux/proc-auxv.vgtest (+2 -0)
===================================================================
--- trunk/memcheck/tests/linux/proc-auxv.vgtest 2012-10-04 21:01:50 +01:00 (rev 13018)
+++ trunk/memcheck/tests/linux/proc-auxv.vgtest 2012-10-04 21:27:38 +01:00 (rev 13019)
@@ -0,0 +1,2 @@
+prog: proc-auxv
+vgopts: -q
Added: trunk/memcheck/tests/linux/proc-auxv.c (+62 -0)
===================================================================
--- trunk/memcheck/tests/linux/proc-auxv.c 2012-10-04 21:01:50 +01:00 (rev 13018)
+++ trunk/memcheck/tests/linux/proc-auxv.c 2012-10-04 21:27:38 +01:00 (rev 13019)
@@ -0,0 +1,62 @@
+#include <elf.h>
+#include <link.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+int
+main (int argc, char **argv, char **envp)
+{
+ ElfW(auxv_t) auxv;
+ ElfW(auxv_t) *auxv_p;
+
+ void *entry0 = NULL;
+ void *entry1 = NULL;
+
+ char *platform0 = NULL;
+ char *platform1 = NULL;
+
+ // First try the "traditional" way.
+ while (*envp++ != NULL)
+ ; /* Skip, skip, skip... and after finding a NULL we have the auxv. */
+
+ for (auxv_p = (ElfW(auxv_t) *) envp;
+ auxv_p->a_type != AT_NULL;
+ auxv_p++)
+ {
+ if (auxv_p->a_type == AT_ENTRY)
+ entry0 = (void *) auxv_p->a_un.a_val;
+ if (auxv_p->a_type == AT_PLATFORM)
+ platform0 = strdup((char *) auxv_p->a_un.a_val);
+ }
+
+ // Now the /proc way as often used in libraries.
+ int fd = open("/proc/self/auxv", O_RDONLY);
+ if (fd == -1)
+ return -1;
+
+ while (read(fd, &auxv, sizeof(auxv)) == sizeof(auxv))
+ {
+ if (auxv.a_type == AT_ENTRY)
+ entry1 = (void *) auxv.a_un.a_val;
+ if (auxv.a_type == AT_PLATFORM)
+ platform1 = strdup((char *) auxv.a_un.a_val);
+ }
+ close(fd);
+
+ if (entry0 == entry1 && entry0 != NULL)
+ fprintf(stderr, "entries OK\n");
+
+ if (strcmp (platform0, platform1) == 0)
+ fprintf(stderr, "platform OK\n");
+
+ free (platform0);
+ free (platform1);
+
+ return 0;
+}
Modified: trunk/coregrind/pub_core_clientstate.h (+3 -0)
===================================================================
--- trunk/coregrind/pub_core_clientstate.h 2012-10-04 21:01:50 +01:00 (rev 13018)
+++ trunk/coregrind/pub_core_clientstate.h 2012-10-04 21:27:38 +01:00 (rev 13019)
@@ -67,6 +67,9 @@
the file contents alive exactly until the process exits. */
extern Int VG_(cl_cmdline_fd);
+/* Same as above, but for /proc/<pid>/auxv. */
+extern Int VG_(cl_auxv_fd);
+
// Client's original rlimit data and rlimit stack
extern struct vki_rlimit VG_(client_rlimit_data);
extern struct vki_rlimit VG_(client_rlimit_stack);
Modified: trunk/coregrind/m_main.c (+35 -3)
===================================================================
--- trunk/coregrind/m_main.c 2012-10-04 21:01:50 +01:00 (rev 13018)
+++ trunk/coregrind/m_main.c 2012-10-04 21:27:38 +01:00 (rev 13019)
@@ -1871,14 +1871,17 @@
setup_file_descriptors();
//--------------------------------------------------------------
- // create the fake /proc/<pid>/cmdline file and then unlink it,
- // but hold onto the fd, so we can hand it out to the client
- // when it tries to open /proc/<pid>/cmdline for itself.
+ // create fake /proc/<pid>/cmdline and /proc/<pid>/auxv files
+ // and then unlink them, but hold onto the fds, so we can handr
+ // them out to the client when it tries to open
+ // /proc/<pid>/cmdline or /proc/<pid>/auxv for itself.
// p: setup file descriptors
+ // p: ii_create_image for VG_(client_auxv) setup.
//--------------------------------------------------------------
#if !defined(VGO_linux)
// client shouldn't be using /proc!
VG_(cl_cmdline_fd) = -1;
+ VG_(cl_auxv_fd) = -1;
#else
if (!need_help) {
HChar buf[50], buf2[50+64];
@@ -1915,6 +1918,35 @@
VG_(err_config_error)("Can't delete client cmdline file in %s\n", buf2);
VG_(cl_cmdline_fd) = fd;
+
+ VG_(debugLog)(1, "main", "Create fake /proc/<pid>/auxv\n");
+
+ VG_(sprintf)(buf, "proc_%d_auxv", VG_(getpid)());
+ fd = VG_(mkstemp)( buf, buf2 );
+ if (fd == -1)
+ VG_(err_config_error)("Can't create client auxv file in %s\n", buf2);
+
+ UWord *client_auxv = VG_(client_auxv);
+ unsigned int client_auxv_len = 0;
+ while (*client_auxv != 0) {
+ client_auxv++;
+ client_auxv++;
+ client_auxv_len += 2 * sizeof(UWord);
+ }
+ client_auxv_len += 2 * sizeof(UWord);
+
+ VG_(write)(fd, VG_(client_auxv), client_auxv_len);
+
+ /* Don't bother to seek the file back to the start; instead do
+ it every time a copy of it is given out (by PRE(sys_open)).
+ That is probably more robust across fork() etc. */
+
+ /* Now delete it, but hang on to the fd. */
+ r = VG_(unlink)( buf2 );
+ if (r)
+ VG_(err_config_error)("Can't delete client auxv file in %s\n", buf2);
+
+ VG_(cl_auxv_fd) = fd;
}
#endif
Modified: trunk/coregrind/m_clientstate.c (+3 -0)
===================================================================
--- trunk/coregrind/m_clientstate.c 2012-10-04 21:01:50 +01:00 (rev 13018)
+++ trunk/coregrind/m_clientstate.c 2012-10-04 21:27:38 +01:00 (rev 13019)
@@ -64,6 +64,9 @@
/* A fd which refers to the fake /proc/<pid>/cmdline in /tmp. */
Int VG_(cl_cmdline_fd) = -1;
+/* A fd which refers to the fake /proc/<pid>/auxv in /tmp. */
+Int VG_(cl_auxv_fd) = -1;
+
// Command line pieces, after they have been extracted from argv in
// m_main.main(). The payload vectors are allocated in VG_AR_TOOL
// (the default arena). They are never freed.
Modified: trunk/memcheck/tests/linux/Makefile.am (+4 -2)
===================================================================
--- trunk/memcheck/tests/linux/Makefile.am 2012-10-04 21:01:50 +01:00 (rev 13018)
+++ trunk/memcheck/tests/linux/Makefile.am 2012-10-04 21:27:38 +01:00 (rev 13019)
@@ -15,7 +15,8 @@
syscalls-2007.vgtest syscalls-2007.stderr.exp \
syslog-syscall.vgtest syslog-syscall.stderr.exp \
timerfd-syscall.vgtest timerfd-syscall.stderr.exp \
- with-space.stderr.exp with-space.stdout.exp with-space.vgtest
+ with-space.stderr.exp with-space.stdout.exp with-space.vgtest \
+ proc-auxv.vgtest proc-auxv.stderr.exp
check_PROGRAMS = \
brk \
@@ -27,7 +28,8 @@
stack_switch \
syscalls-2007 \
syslog-syscall \
- timerfd-syscall
+ timerfd-syscall \
+ proc-auxv
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c (+25 -0)
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2012-10-04 21:01:50 +01:00 (rev 13018)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2012-10-04 21:27:38 +01:00 (rev 13019)
@@ -3633,6 +3633,31 @@
return;
}
}
+
+ /* Handle the case where the open is of /proc/self/auxv or
+ /proc/<pid>/auxv, and just give it a copy of the fd for the
+ fake file we cooked up at startup (in m_main). Also, seek the
+ cloned fd back to the start. */
+ {
+ HChar name[30];
+ Char* arg1s = (Char*) ARG1;
+ SysRes sres;
+
+ VG_(sprintf)(name, "/proc/%d/auxv", VG_(getpid)());
+ if (ML_(safe_to_deref)( arg1s, 1 ) &&
+ (VG_STREQ(arg1s, name) || VG_STREQ(arg1s, "/proc/self/auxv"))
+ )
+ {
+ sres = VG_(dup)( VG_(cl_auxv_fd) );
+ SET_STATUS_from_SysRes( sres );
+ if (!sr_isError(sres)) {
+ OffT off = VG_(lseek)( sr_Res(sres), 0, VKI_SEEK_SET );
+ if (off < 0)
+ SET_STATUS_Failure( VKI_EMFILE );
+ }
+ return;
+ }
+ }
#endif // defined(VGO_linux)
/* Otherwise handle normally */
|
|
From: <sv...@va...> - 2012-10-04 20:02:05
|
tom 2012-10-04 21:01:50 +0100 (Thu, 04 Oct 2012)
New Revision: 13018
Log:
Fix valt_load_address value in pkgconfig file.
Patch from Mark Wielaard to fix BZ#307729.
Modified files:
trunk/valgrind.pc.in
Modified: trunk/valgrind.pc.in (+1 -1)
===================================================================
--- trunk/valgrind.pc.in 2012-10-02 21:35:21 +01:00 (rev 13017)
+++ trunk/valgrind.pc.in 2012-10-04 21:01:50 +01:00 (rev 13018)
@@ -5,7 +5,7 @@
arch=@VGCONF_ARCH_PRI@
os=@VGCONF_OS@
platform=@VGCONF_ARCH_PRI@-@VGCONF_OS@
-valt_load_address=@VALT_LOAD_ADDRESS@
+valt_load_address=@VALT_LOAD_ADDRESS_PRI@
Name: Valgrind
Description: A dynamic binary instrumentation framework
|
|
From: Petar J. <mip...@gm...> - 2012-10-04 17:36:21
|
Rather trivial question/dilemma: In exp-sgcheck\tests\is_arch_supported can we change: case `uname -i` in ppc*|arm*|s390x|mips*) exit 1;; *) exit 0;; esac to either a) case `uname -m` in ppc*|arm*|s390x|mips*) exit 1;; *) exit 0;; esac or b) case `uname -i` in ppc*|arm*|s390x|mips*|unknown) exit 1;; *) exit 0;; esac since on some platforms such as MIPS, "uname -i" will return "unknown". Regards, Petar |