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
(32) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(39) |
2
(29) |
3
(27) |
4
(50) |
5
(37) |
|
6
(14) |
7
(28) |
8
(44) |
9
(38) |
10
(32) |
11
(49) |
12
(51) |
|
13
(37) |
14
(32) |
15
(70) |
16
(50) |
17
(43) |
18
(56) |
19
(23) |
|
20
(22) |
21
(36) |
22
(12) |
23
(22) |
24
(10) |
25
(13) |
26
(21) |
|
27
(17) |
28
(16) |
29
(33) |
30
(14) |
|
|
|
|
From: Julian S. <js...@ac...> - 2005-11-02 19:13:05
|
Tom,
How about the attached proposal, does that work for you? It should
still attempt to honour nonzero addresses for the interpreter but
ignore zero. This fixes the regtest failures here.
J
(m_ume.c:445):
/* Don't actually reserve the space. Just get an advisory
indicating where it would be allocated, and pass that to
mapelf(), which in turn asks aspacem to do some fixed maps at
the specified address. This is a bit of hack, but it should
work because there should be no intervening transactions with
aspacem which could cause those fixed maps to fail.
Placement policy is:
if the interpreter asks to be loaded at zero
ignore that and put it wherever we like (mappings at zero
are bad news)
else
try and put it where it asks for, but if that doesn't work,
just put it anywhere.
*/
if (interp_addr == 0) {
mreq.rkind = MAny;
mreq.start = 0;
mreq.len = interp_size;
} else {
mreq.rkind = MHint;
mreq.start = interp_addr;
mreq.len = interp_size;
}
advised = VG_(am_get_advisory)( &mreq, True/*client*/, &ok );
if (!ok) {
/* bomb out */
SysRes res = VG_(mk_SysRes_Error)(VKI_EINVAL);
if (0) VG_(printf)("reserve for interp: failed\n");
check_mmap(res, (Addr)interp_addr, interp_size);
/*NOTREACHED*/
}
On Wednesday 02 November 2005 18:29, I wrote:
> Tom, can you outline the background to this? Presumably you found a
> case where the interpreter-loading failed?
>
> What's happened is, this change causes the interpreter to get loaded at
> zero at least for SuSE10(x86) and whatever-Nick's-running(x86), because
> the interpreter specifies a load address of zero for its text segment:
>
> Program Headers:
> Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
> LOAD 0x000000 0x00000000 0x00000000 0x144f8 0x144f8 R E 0x1000
> LOAD 0x014cc0 0x00015cc0 0x00015cc0 0x0079c 0x00854 RW 0x1000
>
> and having any mapping at zero causes some of the regtests to fail
> (badjump2 for one) and doesn't seem a good idea in general.
>
> J
>
> On Tuesday 01 November 2005 19:46, sv...@va... wrote:
> > Author: tom
> > Date: 2005-11-01 19:46:07 +0000 (Tue, 01 Nov 2005)
> > New Revision: 4980
> >
> > Log:
> > Make the request for space for the interpreter into a hint so that we
> > can still proceed if the preferred load address is not available.
> >
> > Modified:
> > trunk/coregrind/m_ume.c
> >
> >
> > Modified: trunk/coregrind/m_ume.c
> > ===================================================================
> > --- trunk/coregrind/m_ume.c 2005-11-01 17:52:34 UTC (rev 4979)
> > +++ trunk/coregrind/m_ume.c 2005-11-01 19:46:07 UTC (rev 4980)
> > @@ -438,6 +438,7 @@
> >
> > if (interp != NULL) {
> > /* reserve a chunk of address space for interpreter */
> > + MapRequest mreq;
> > Addr advised;
> > Bool ok;
> >
> > @@ -447,9 +448,10 @@
> > the specified address. This is a bit of hack, but it should
> > work because there should be no intervening transactions with
> > aspacem which could cause those fixed maps to fail. */
> > - advised = VG_(am_get_advisory_client_simple)(
> > - (Addr)interp_addr, interp_size, &ok
> > - );
> > + mreq.rkind = MHint;
> > + mreq.start = interp_addr;
> > + mreq.len = interp_size;
> > + advised = VG_(am_get_advisory)( &mreq, True/*client*/, &ok );
> > if (!ok) {
> > /* bomb out */
> > SysRes res = VG_(mk_SysRes_Error)(VKI_EINVAL);
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by:
> > Tame your development challenges with Apache's Geronimo App Server.
> > Download it for free - -and be entered to win a 42" plasma tv or your
> > very own Sony(tm)PSP. Click here to play:
> > http://sourceforge.net/geronimo.php
> > _______________________________________________
> > Valgrind-developers mailing list
> > Val...@li...
> > https://lists.sourceforge.net/lists/listinfo/valgrind-developers
|
|
From: Tom H. <to...@co...> - 2005-11-02 19:09:11
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
> Tom, can you outline the background to this? Presumably you found a
> case where the interpreter-loading failed?
I posted about it last night - it was causing random failures on
my FC4 x86 boxes when the syscall page happened to be placed where
the interpreter wanted to go.
> What's happened is, this change causes the interpreter to get loaded at
> zero at least for SuSE10(x86) and whatever-Nick's-running(x86), because
> the interpreter specifies a load address of zero for its text segment:
>
> Program Headers:
> Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
> LOAD 0x000000 0x00000000 0x00000000 0x144f8 0x144f8 R E 0x1000
> LOAD 0x014cc0 0x00015cc0 0x00015cc0 0x0079c 0x00854 RW 0x1000
>
> and having any mapping at zero causes some of the regtests to fail
> (badjump2 for one) and doesn't seem a good idea in general.
Oh, just make it set MAny if interp_addr is zero. That's what the
routine it was calling before does. It's only when prelinking is on
that an address will be set.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Julian S. <js...@ac...> - 2005-11-02 18:26:28
|
Tom, can you outline the background to this? Presumably you found a
case where the interpreter-loading failed?
What's happened is, this change causes the interpreter to get loaded at
zero at least for SuSE10(x86) and whatever-Nick's-running(x86), because
the interpreter specifies a load address of zero for its text segment:
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00000000 0x00000000 0x144f8 0x144f8 R E 0x1000
LOAD 0x014cc0 0x00015cc0 0x00015cc0 0x0079c 0x00854 RW 0x1000
and having any mapping at zero causes some of the regtests to fail
(badjump2 for one) and doesn't seem a good idea in general.
J
On Tuesday 01 November 2005 19:46, sv...@va... wrote:
> Author: tom
> Date: 2005-11-01 19:46:07 +0000 (Tue, 01 Nov 2005)
> New Revision: 4980
>
> Log:
> Make the request for space for the interpreter into a hint so that we
> can still proceed if the preferred load address is not available.
>
> Modified:
> trunk/coregrind/m_ume.c
>
>
> Modified: trunk/coregrind/m_ume.c
> ===================================================================
> --- trunk/coregrind/m_ume.c 2005-11-01 17:52:34 UTC (rev 4979)
> +++ trunk/coregrind/m_ume.c 2005-11-01 19:46:07 UTC (rev 4980)
> @@ -438,6 +438,7 @@
>
> if (interp != NULL) {
> /* reserve a chunk of address space for interpreter */
> + MapRequest mreq;
> Addr advised;
> Bool ok;
>
> @@ -447,9 +448,10 @@
> the specified address. This is a bit of hack, but it should
> work because there should be no intervening transactions with
> aspacem which could cause those fixed maps to fail. */
> - advised = VG_(am_get_advisory_client_simple)(
> - (Addr)interp_addr, interp_size, &ok
> - );
> + mreq.rkind = MHint;
> + mreq.start = interp_addr;
> + mreq.len = interp_size;
> + advised = VG_(am_get_advisory)( &mreq, True/*client*/, &ok );
> if (!ok) {
> /* bomb out */
> SysRes res = VG_(mk_SysRes_Error)(VKI_EINVAL);
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
|
|
From: <sv...@va...> - 2005-11-02 16:15:58
|
Author: tom
Date: 2005-11-02 16:15:55 +0000 (Wed, 02 Nov 2005)
New Revision: 4992
Log:
Split faultstatus into the platform independent tests and those
which are x86 specific. The first three x86 specific ones should
work on amd64 as well so I have added those as amd64 tests.
Note that the x86/amd64 tests will still fail as VEX doesn't
always trigger the right sort of signal for faulting instructions
at the moment.
Added:
trunk/none/tests/amd64/faultstatus.c
trunk/none/tests/amd64/faultstatus.stderr.exp
trunk/none/tests/amd64/faultstatus.vgtest
trunk/none/tests/x86/faultstatus.c
trunk/none/tests/x86/faultstatus.stderr.exp
trunk/none/tests/x86/faultstatus.vgtest
Modified:
trunk/none/tests/amd64/Makefile.am
trunk/none/tests/faultstatus.c
trunk/none/tests/faultstatus.stderr.exp
trunk/none/tests/x86/Makefile.am
Modified: trunk/none/tests/amd64/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/Makefile.am 2005-11-02 15:47:43 UTC (rev 4991)
+++ trunk/none/tests/amd64/Makefile.am 2005-11-02 16:15:55 UTC (rev 4992)
@@ -5,6 +5,7 @@
INSN_TESTS=3Dinsn_mmx insn_sse insn_sse2 insn_fpu
=20
EXTRA_DIST =3D $(noinst_SCRIPTS) \
+ faultstatus.vgtest faultstatus.stderr.exp \
$(addsuffix .stderr.exp,$(INSN_TESTS)) \
$(addsuffix .stdout.exp,$(INSN_TESTS)) \
$(addsuffix .vgtest,$(INSN_TESTS)) \
@@ -13,7 +14,7 @@
smc1.stderr.exp smc1.stdout.exp smc1.vgtest
=20
check_PROGRAMS =3D \
- $(INSN_TESTS) looper jrcxz smc1
+ faultstatus $(INSN_TESTS) looper jrcxz smc1
=20
AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude
AM_CXXFLAGS =3D $(AM_CFLAGS)
Added: trunk/none/tests/amd64/faultstatus.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/faultstatus.c 2005-11-02 15:47:43 UTC (rev 499=
1)
+++ trunk/none/tests/amd64/faultstatus.c 2005-11-02 16:15:55 UTC (rev 499=
2)
@@ -0,0 +1,143 @@
+/*=20
+ Check that a fault signal handler gets the expected info
+ */
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <setjmp.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+struct test {
+ void (*test)(void);
+ int sig;
+ int code;
+ volatile void *addr;
+};
+
+static const struct test *cur_test;
+
+static int zero();
+
+static jmp_buf escape;
+
+#define BADADDR ((int *)0x1234)
+
+#define FILESIZE (16*1024)
+#define MAPSIZE (2*FILESIZE)
+
+static char volatile *volatile mapping;
+
+static int testsig(int sig, int want)
+{
+ if (sig !=3D want) {
+ fprintf(stderr, " FAIL: expected signal %d, not %d\n", want, sig);
+ return 0;
+ }=20
+ return 1;
+}
+
+static int testcode(int code, int want)
+{
+ if (code !=3D want) {
+ fprintf(stderr, " FAIL: expected si_code=3D=3D%d, not %d\n", want, co=
de);
+ return 0;
+ }
+ return 1;
+}
+
+static int testaddr(void *addr, volatile void *want)
+{
+ if (addr !=3D want) {
+ fprintf(stderr, " FAIL: expected si_addr=3D=3D%p, not %p\n", want, ad=
dr);
+ return 0;
+ }
+ return 1;
+
+}
+
+static void handler(int sig, siginfo_t *si, void *uc)
+{
+ int ok =3D 1;
+
+ ok =3D ok && testsig(sig, cur_test->sig);
+ ok =3D ok && testcode(si->si_code, cur_test->code);
+ if (cur_test->addr)
+ ok =3D ok && testaddr(si->si_addr, cur_test->addr);
+
+ if (ok)
+ fprintf(stderr, " PASS\n");
+
+ siglongjmp(escape, ok + 1);
+}
+
+
+extern char test1_ill;
+static void test1()
+{
+ asm volatile("test1_ill: ud2");
+}
+
+static void test2()
+{
+ asm volatile ("int3");
+}
+
+static void test3()
+{
+ asm volatile ("int $0x10");
+}
+
+int main()
+{
+ int fd, i;
+ static const int sigs[] =3D { SIGSEGV, SIGILL, SIGBUS, SIGFPE, SIGTRAP =
};
+ struct sigaction sa;
+
+ sa.sa_sigaction =3D handler;
+ sa.sa_flags =3D SA_SIGINFO;
+ sigfillset(&sa.sa_mask);
+=09
+ for(i =3D 0; i < sizeof(sigs)/sizeof(*sigs); i++)
+ sigaction(sigs[i], &sa, NULL);
+
+ fd =3D open("faultstatus.tmp", O_CREAT|O_TRUNC|O_EXCL, 0600);
+ if (fd =3D=3D -1) {
+ perror("tmpfile");
+ exit(1);
+ }
+ unlink("faultstatus.tmp");
+ ftruncate(fd, FILESIZE);
+
+ mapping =3D mmap(0, MAPSIZE, PROT_READ, MAP_PRIVATE, fd, 0);
+ close(fd);
+
+ {
+ const struct test tests[] =3D {
+#define T(n, sig, code, addr) { test##n, sig, code, addr }
+ T(1, SIGILL, ILL_ILLOPN, &test1_ill),
+
+ T(2, SIGTRAP, 128, 0), /* TRAP_BRKPT? */
+ T(3, SIGSEGV, 128, 0),
+#undef T
+ };
+
+ for(i =3D 0; i < sizeof(tests)/sizeof(*tests); i++) {
+ cur_test =3D &tests[i];
+ =09
+ if (sigsetjmp(escape, 1) =3D=3D 0) {
+ fprintf(stderr, "Test %d: ", i+1);
+ tests[i].test();
+ fprintf(stderr, " FAIL: no fault, or handler returned\n");
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int zero()
+{
+ return 0;
+}
Added: trunk/none/tests/amd64/faultstatus.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/faultstatus.stderr.exp 2005-11-02 15:47:43 UTC=
(rev 4991)
+++ trunk/none/tests/amd64/faultstatus.stderr.exp 2005-11-02 16:15:55 UTC=
(rev 4992)
@@ -0,0 +1,5 @@
+
+Test 1: PASS
+Test 2: PASS
+Test 3: PASS
+
Added: trunk/none/tests/amd64/faultstatus.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/faultstatus.vgtest 2005-11-02 15:47:43 UTC (re=
v 4991)
+++ trunk/none/tests/amd64/faultstatus.vgtest 2005-11-02 16:15:55 UTC (re=
v 4992)
@@ -0,0 +1 @@
+prog: faultstatus
Modified: trunk/none/tests/faultstatus.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/faultstatus.c 2005-11-02 15:47:43 UTC (rev 4991)
+++ trunk/none/tests/faultstatus.c 2005-11-02 16:15:55 UTC (rev 4992)
@@ -95,39 +95,6 @@
(void)v;
}
=20
-#ifdef __i386__
-extern char test5_ill;
-static void test5()
-{
- asm volatile("test5_ill: ud2");
-}
-
-static void test6()
-{
- asm volatile ("int3");
-}
-
-static void test7()
-{
- asm volatile ("int $0x10");
-}
-
-static void test8()
-{
- volatile int a;
- asm volatile ("add $1, %0;"/* set OF */
- "into"
- : "=3Da" (a) : "0" (0x7fffffff) : "cc");
-}
-
-static void test9()
-{
- static int limit[2] =3D { 0, 10 };
-
- asm volatile ("bound %0, %1" : : "r" (11), "m" (limit[0]));
-}
-#endif /* __i386__ */
-
int main()
{
int fd, i;
@@ -159,18 +126,6 @@
T(2, SIGSEGV, SEGV_ACCERR, mapping),
T(3, SIGBUS, BUS_ADRERR, &mapping[FILESIZE+10]),
T(4, SIGFPE, FPE_INTDIV, 0),
-#ifdef __i386__
- T(5, SIGILL, ILL_ILLOPN, &test5_ill),
-
- T(6, SIGTRAP, 128, 0), /* TRAP_BRKPT? */
- T(7, SIGSEGV, 128, 0),
- T(8, SIGSEGV, 128, 0),
-
- /* This is an expected failure - Valgrind
- doesn't implement the BOUND instruction,
- and so issues a SIGILL instead. */
- T(9, SIGSEGV, 128, 0),
-#endif /* __i386__ */
#undef T
};
=20
Modified: trunk/none/tests/faultstatus.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/faultstatus.stderr.exp 2005-11-02 15:47:43 UTC (rev =
4991)
+++ trunk/none/tests/faultstatus.stderr.exp 2005-11-02 16:15:55 UTC (rev =
4992)
@@ -3,11 +3,4 @@
Test 2: PASS
Test 3: PASS
Test 4: PASS
-Test 5: PASS
-Test 6: PASS
-Test 7: PASS
-Test 8: PASS
-Test 9: disInstr: unhandled instruction bytes: 0x........ 0x........ 0x.=
....... 0x........
- at 0x........: test9 (faultstatus.c:127)
- FAIL: expected signal 11, not 4
=20
Modified: trunk/none/tests/x86/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/x86/Makefile.am 2005-11-02 15:47:43 UTC (rev 4991)
+++ trunk/none/tests/x86/Makefile.am 2005-11-02 16:15:55 UTC (rev 4992)
@@ -9,6 +9,7 @@
bt_literal.stderr.exp bt_literal.stdout.exp bt_literal.vgtest \
cpuid.stderr.exp cpuid.stdout.exp cpuid.vgtest \
cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \
+ faultstatus.vgtest faultstatus.stderr.exp \
fpu_lazy_eflags.stderr.exp fpu_lazy_eflags.stdout.exp \
fpu_lazy_eflags.vgtest \
fxtract.stdout.exp fxtract.stderr.exp fxtract.vgtest \
@@ -28,8 +29,8 @@
yield.stderr.exp yield.stdout.exp yield.vgtest
=20
check_PROGRAMS =3D \
- badseg bt_everything bt_literal cmpxchg8b cpuid fpu_lazy_eflags \
- fxtract \
+ badseg bt_everything bt_literal cmpxchg8b cpuid \
+ faultstatus fpu_lazy_eflags fxtract \
getseg incdec_alt $(INSN_TESTS) \
lahf looper int pushpopseg sbbmisc \
seg_override sigcontext smc1 yield
Added: trunk/none/tests/x86/faultstatus.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/x86/faultstatus.c 2005-11-02 15:47:43 UTC (rev 4991)
+++ trunk/none/tests/x86/faultstatus.c 2005-11-02 16:15:55 UTC (rev 4992)
@@ -0,0 +1,164 @@
+/*=20
+ Check that a fault signal handler gets the expected info
+ */
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <setjmp.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+struct test {
+ void (*test)(void);
+ int sig;
+ int code;
+ volatile void *addr;
+};
+
+static const struct test *cur_test;
+
+static int zero();
+
+static jmp_buf escape;
+
+#define BADADDR ((int *)0x1234)
+
+#define FILESIZE (16*1024)
+#define MAPSIZE (2*FILESIZE)
+
+static char volatile *volatile mapping;
+
+static int testsig(int sig, int want)
+{
+ if (sig !=3D want) {
+ fprintf(stderr, " FAIL: expected signal %d, not %d\n", want, sig);
+ return 0;
+ }=20
+ return 1;
+}
+
+static int testcode(int code, int want)
+{
+ if (code !=3D want) {
+ fprintf(stderr, " FAIL: expected si_code=3D=3D%d, not %d\n", want, co=
de);
+ return 0;
+ }
+ return 1;
+}
+
+static int testaddr(void *addr, volatile void *want)
+{
+ if (addr !=3D want) {
+ fprintf(stderr, " FAIL: expected si_addr=3D=3D%p, not %p\n", want, ad=
dr);
+ return 0;
+ }
+ return 1;
+
+}
+
+static void handler(int sig, siginfo_t *si, void *uc)
+{
+ int ok =3D 1;
+
+ ok =3D ok && testsig(sig, cur_test->sig);
+ ok =3D ok && testcode(si->si_code, cur_test->code);
+ if (cur_test->addr)
+ ok =3D ok && testaddr(si->si_addr, cur_test->addr);
+
+ if (ok)
+ fprintf(stderr, " PASS\n");
+
+ siglongjmp(escape, ok + 1);
+}
+
+
+extern char test1_ill;
+static void test1()
+{
+ asm volatile("test1_ill: ud2");
+}
+
+static void test2()
+{
+ asm volatile ("int3");
+}
+
+static void test3()
+{
+ asm volatile ("int $0x10");
+}
+
+static void test4()
+{
+ volatile int a;
+ asm volatile ("add $1, %0;"/* set OF */
+ "into"
+ : "=3Da" (a) : "0" (0x7fffffff) : "cc");
+}
+
+static void test5()
+{
+ static int limit[2] =3D { 0, 10 };
+
+ asm volatile ("bound %0, %1" : : "r" (11), "m" (limit[0]));
+}
+
+int main()
+{
+ int fd, i;
+ static const int sigs[] =3D { SIGSEGV, SIGILL, SIGBUS, SIGFPE, SIGTRAP =
};
+ struct sigaction sa;
+
+ sa.sa_sigaction =3D handler;
+ sa.sa_flags =3D SA_SIGINFO;
+ sigfillset(&sa.sa_mask);
+=09
+ for(i =3D 0; i < sizeof(sigs)/sizeof(*sigs); i++)
+ sigaction(sigs[i], &sa, NULL);
+
+ fd =3D open("faultstatus.tmp", O_CREAT|O_TRUNC|O_EXCL, 0600);
+ if (fd =3D=3D -1) {
+ perror("tmpfile");
+ exit(1);
+ }
+ unlink("faultstatus.tmp");
+ ftruncate(fd, FILESIZE);
+
+ mapping =3D mmap(0, MAPSIZE, PROT_READ, MAP_PRIVATE, fd, 0);
+ close(fd);
+
+ {
+ const struct test tests[] =3D {
+#define T(n, sig, code, addr) { test##n, sig, code, addr }
+ T(1, SIGILL, ILL_ILLOPN, &test1_ill),
+
+ T(2, SIGTRAP, 128, 0), /* TRAP_BRKPT? */
+ T(3, SIGSEGV, 128, 0),
+ T(4, SIGSEGV, 128, 0),
+
+ /* This is an expected failure - Valgrind
+ doesn't implement the BOUND instruction,
+ and so issues a SIGILL instead. */
+ T(5, SIGSEGV, 128, 0),
+#undef T
+ };
+
+ for(i =3D 0; i < sizeof(tests)/sizeof(*tests); i++) {
+ cur_test =3D &tests[i];
+ =09
+ if (sigsetjmp(escape, 1) =3D=3D 0) {
+ fprintf(stderr, "Test %d: ", i+1);
+ tests[i].test();
+ fprintf(stderr, " FAIL: no fault, or handler returned\n");
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int zero()
+{
+ return 0;
+}
Added: trunk/none/tests/x86/faultstatus.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/x86/faultstatus.stderr.exp 2005-11-02 15:47:43 UTC (=
rev 4991)
+++ trunk/none/tests/x86/faultstatus.stderr.exp 2005-11-02 16:15:55 UTC (=
rev 4992)
@@ -0,0 +1,9 @@
+
+Test 1: PASS
+Test 2: PASS
+Test 3: PASS
+Test 4: PASS
+Test 5: disInstr: unhandled instruction bytes: 0x........ 0x........ 0x.=
....... 0x........
+ at 0x........: test9 (faultstatus.c:127)
+ FAIL: expected signal 11, not 4
+
Added: trunk/none/tests/x86/faultstatus.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/x86/faultstatus.vgtest 2005-11-02 15:47:43 UTC (rev =
4991)
+++ trunk/none/tests/x86/faultstatus.vgtest 2005-11-02 16:15:55 UTC (rev =
4992)
@@ -0,0 +1 @@
+prog: faultstatus
|
|
From: <sv...@va...> - 2005-11-02 15:47:48
|
Author: tom
Date: 2005-11-02 15:47:43 +0000 (Wed, 02 Nov 2005)
New Revision: 4991
Log:
Remove the as_mmap and as_shm tests which don't make much sense since
the address space manager was rewritten.
Removed:
trunk/none/tests/as_mmap.c
trunk/none/tests/as_mmap.stderr.exp
trunk/none/tests/as_mmap.stderr.exp2
trunk/none/tests/as_mmap.vgtest
trunk/none/tests/as_shm.c
trunk/none/tests/as_shm.stderr.exp
trunk/none/tests/as_shm.stdout.exp
trunk/none/tests/as_shm.vgtest
trunk/none/tests/filter_as_mmap
Modified:
trunk/none/tests/Makefile.am
Modified: trunk/none/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/Makefile.am 2005-11-02 15:46:07 UTC (rev 4990)
+++ trunk/none/tests/Makefile.am 2005-11-02 15:47:43 UTC (rev 4991)
@@ -2,14 +2,12 @@
DIST_SUBDIRS =3D ${VG_ARCH_ALL} .
=20
noinst_SCRIPTS =3D \
- filter_as_mmap filter_cmdline0 \
+ filter_cmdline0 \
filter_fdleak filter_none_discards filter_stderr
=20
EXTRA_DIST =3D $(noinst_SCRIPTS) \
ansi.stderr.exp ansi.vgtest \
args.stderr.exp args.stdout.exp args.vgtest \
- as_mmap.stderr.exp as_mmap.stderr.exp2 as_mmap.vgtest \
- as_shm.stderr.exp as_shm.stdout.exp as_shm.vgtest \
async-sigs.stderr.exp async-sigs.stdout.exp async-sigs.vgtest \
bitfield1.stderr.exp bitfield1.vgtest \
blockfault.vgtest blockfault.stderr.exp blockfault.stdout.exp \
@@ -113,7 +111,7 @@
vgprintf.stderr.exp vgprintf.stdout.exp vgprintf.vgtest
=20
check_PROGRAMS =3D \
- ansi args as_mmap as_shm \
+ ansi args \
async-sigs bitfield1 blockfault closeall coolo_strlen \
discard exec-sigmask execve faultstatus fcntl_setown \
fdleak_cmsg fdleak_creat fdleak_dup fdleak_dup2 \
Deleted: trunk/none/tests/as_mmap.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/as_mmap.c 2005-11-02 15:46:07 UTC (rev 4990)
+++ trunk/none/tests/as_mmap.c 2005-11-02 15:47:43 UTC (rev 4991)
@@ -1,35 +0,0 @@
-#include <sys/mman.h>
-#include <stdio.h>
-
-int main()
-{
- char local;
- char *top =3D (char *)(((unsigned long)&local + 0x0fffffff) & ~0x0fffff=
ff);
-
- fprintf(stderr, "1\n");
- if (mmap((void *)0x00000000, 0x10000, PROT_READ|PROT_WRITE,=20
- MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0) =3D=3D MAP_FAILED)
- fprintf(stderr, "mmap @ 0x00000000\n");
-
- fprintf(stderr, "2\n");
- if (mmap((void *)0x00010000, 0x10000, PROT_READ|PROT_WRITE,=20
- MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0) =3D=3D MAP_FAILED)
- fprintf(stderr, "mmap @ 0x00010000\n");
-
- fprintf(stderr, "3\n");
- if (mmap((void *)0x50000000, 0x10000, PROT_READ|PROT_WRITE,=20
- MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0) =3D=3D MAP_FAILED)
- fprintf(stderr, "mmap @ 0x50000000\n");
-
- fprintf(stderr, "4\n");
- if (mmap(top, 0x10000, PROT_READ|PROT_WRITE,=20
- MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0) =3D=3D MAP_FAILED)
- fprintf(stderr, "mmap @ top\n");
-
- fprintf(stderr, "5\n");
- if (mmap(top+0x08000000, 0x10000, PROT_READ|PROT_WRITE,=20
- MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0) =3D=3D MAP_FAILED)
- fprintf(stderr, "mmap @ top+.5G\n");
-
- return 0;
-}
Deleted: trunk/none/tests/as_mmap.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/as_mmap.stderr.exp 2005-11-02 15:46:07 UTC (rev 4990=
)
+++ trunk/none/tests/as_mmap.stderr.exp 2005-11-02 15:47:43 UTC (rev 4991=
)
@@ -1,9 +0,0 @@
-
-1
-2
-3
-4
-mmap @ top
-5
-mmap @ top+.5G
-
Deleted: trunk/none/tests/as_mmap.stderr.exp2
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/as_mmap.stderr.exp2 2005-11-02 15:46:07 UTC (rev 499=
0)
+++ trunk/none/tests/as_mmap.stderr.exp2 2005-11-02 15:47:43 UTC (rev 499=
1)
@@ -1,11 +0,0 @@
-
-1
-2
-3
-4
-Warning: client syscall old_mmap tried to modify addresses 0x........-0x=
........
-mmap @ top
-5
-Warning: client syscall old_mmap tried to modify addresses 0x........-0x=
........
-mmap @ top+.5G
-
Deleted: trunk/none/tests/as_mmap.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/as_mmap.vgtest 2005-11-02 15:46:07 UTC (rev 4990)
+++ trunk/none/tests/as_mmap.vgtest 2005-11-02 15:47:43 UTC (rev 4991)
@@ -1,2 +0,0 @@
-prog: as_mmap
-stderr_filter: filter_as_mmap
Deleted: trunk/none/tests/as_shm.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/as_shm.c 2005-11-02 15:46:07 UTC (rev 4990)
+++ trunk/none/tests/as_shm.c 2005-11-02 15:47:43 UTC (rev 4991)
@@ -1,33 +0,0 @@
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <stdio.h>
-
-int main()
-{
- int shmid =3D shmget(IPC_PRIVATE, 0x10000, IPC_CREAT|IPC_EXCL|0777);
- void *addr;
- char local;
- char *top =3D (char *)(((unsigned long)&local + 0x0fffffff) & ~0x0fffff=
ff);
-
- if (shmid =3D=3D -1)
- perror("shmget");
-
- addr =3D shmat(shmid, 0, 0);
-
- if (addr =3D=3D (void *)-1)
- perror("shmat @ 0");
- else
- printf("shmat 0: addr=3D...\n");
-
- addr =3D shmat(shmid, top, 0);
-
- if (addr =3D=3D (void *)-1)
- perror("shmat @ top");
- else
- printf("shmat 2: addr=3D...\n");
-
- shmctl(shmid, IPC_RMID, NULL);
-
- return 0;
-}
Deleted: trunk/none/tests/as_shm.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/as_shm.stderr.exp 2005-11-02 15:46:07 UTC (rev 4990)
+++ trunk/none/tests/as_shm.stderr.exp 2005-11-02 15:47:43 UTC (rev 4991)
@@ -1,3 +0,0 @@
-
-shmat @ top: Cannot allocate memory
-
Deleted: trunk/none/tests/as_shm.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/as_shm.stdout.exp 2005-11-02 15:46:07 UTC (rev 4990)
+++ trunk/none/tests/as_shm.stdout.exp 2005-11-02 15:47:43 UTC (rev 4991)
@@ -1 +0,0 @@
-shmat 0: addr=3D...
Deleted: trunk/none/tests/as_shm.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/as_shm.vgtest 2005-11-02 15:46:07 UTC (rev 4990)
+++ trunk/none/tests/as_shm.vgtest 2005-11-02 15:47:43 UTC (rev 4991)
@@ -1,2 +0,0 @@
-prog: as_shm
-stderr_filter: filter_as_mmap
Deleted: trunk/none/tests/filter_as_mmap
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/filter_as_mmap 2005-11-02 15:46:07 UTC (rev 4990)
+++ trunk/none/tests/filter_as_mmap 2005-11-02 15:47:43 UTC (rev 4991)
@@ -1,8 +0,0 @@
-#! /bin/sh
-
-dir=3D`dirname $0`
-
-./filter_stderr |
-
-# Anonymise addresses
-$dir/../../tests/filter_addresses
|
|
From: <sv...@va...> - 2005-11-02 15:46:10
|
Author: tom
Date: 2005-11-02 15:46:07 +0000 (Wed, 02 Nov 2005)
New Revision: 4990
Log:
The memcheck/tests/sigprocmask test is designed to test that we handle
the old style sigprocmask system call correctly without corrupting
memory when we copy out the new (larger) signal mask into the user
provided old (smaller) signal mask.
It therefore makes no sense to run it on amd64 or any other platform
which only has the newer rt_sigprocmask system call, and indeed it
wasn't working because we weren't passing the extra argument which
that call expects.
Added:
trunk/memcheck/tests/sigprocmask.stderr.exp2
Modified:
trunk/memcheck/tests/Makefile.am
trunk/memcheck/tests/sigprocmask.c
Modified: trunk/memcheck/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/Makefile.am 2005-11-02 15:32:19 UTC (rev 4989)
+++ trunk/memcheck/tests/Makefile.am 2005-11-02 15:46:07 UTC (rev 4990)
@@ -73,7 +73,7 @@
sigaltstack.stderr.exp sigaltstack.vgtest \
sigkill.stderr.exp sigkill.stderr.exp2 sigkill.vgtest \
signal2.stderr.exp signal2.stdout.exp signal2.vgtest \
- sigprocmask.stderr.exp sigprocmask.vgtest \
+ sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \
stack_changes.stderr.exp stack_changes.stdout.exp stack_changes.vgtest =
\
strchr.stderr.exp strchr.stderr.exp2 strchr.vgtest \
str_tester.stderr.exp str_tester.vgtest \
Modified: trunk/memcheck/tests/sigprocmask.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/sigprocmask.c 2005-11-02 15:32:19 UTC (rev 4989)
+++ trunk/memcheck/tests/sigprocmask.c 2005-11-02 15:46:07 UTC (rev 4990)
@@ -9,12 +9,9 @@
=20
int main(void)
{
- int x[6], *s, *os, i, sysno;
+ int x[6], *s, *os, i;
=20
- sysno =3D __NR_rt_sigprocmask;
#ifdef __NR_sigprocmask
- sysno =3D __NR_sigprocmask;
-#endif
=20
x[0] =3D 0x11111111;
x[1] =3D 0x89abcdef;
@@ -30,7 +27,7 @@
// blocked as perl has been known to leave some signals blocked
// when starting child processes which can cause failures in
// this test unless we reset things here.
- syscall(sysno, SIG_SETMASK, os, NULL);
+ syscall(__NR_sigprocmask, SIG_SETMASK, os, NULL);
=20
fprintf(stderr, "before\n");
for (i =3D 0; i < 6; i++) {
@@ -38,7 +35,7 @@
}
fprintf(stderr, "\n");
=20
- syscall(sysno, SIG_BLOCK, s, os);
+ syscall(__NR_sigprocmask, SIG_BLOCK, s, os);
=20
fprintf(stderr, "after1\n");
for (i =3D 0; i < 6; i++) {
@@ -46,13 +43,19 @@
}
fprintf(stderr, "\n");
=20
- syscall(sysno, SIG_BLOCK, s, os);
+ syscall(__NR_sigprocmask, SIG_BLOCK, s, os);
=20
fprintf(stderr, "after2\n");
for (i =3D 0; i < 6; i++) {
fprintf(stderr, "%x ", x[i]);
}
fprintf(stderr, "\n");
- =20
+
+#else
+
+ fprintf(stderr, "__NR_sigprocmask not supported on this platform\n");
+
+#endif
+
return(0);
}
Added: trunk/memcheck/tests/sigprocmask.stderr.exp2
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/sigprocmask.stderr.exp2 2005-11-02 15:32:19 UTC =
(rev 4989)
+++ trunk/memcheck/tests/sigprocmask.stderr.exp2 2005-11-02 15:46:07 UTC =
(rev 4990)
@@ -0,0 +1 @@
+__NR_sigprocmask not supported on this platform
|
|
From: Julian S. <js...@ac...> - 2005-11-02 15:32:58
|
> > Much the same applies to as_shm as well, which is trying to attach a > > shared memory segment at a high address and expecting it to fail. > > Removing both sounds fine to me. Me too. mremap2 is another problem case. I wrote that to test the mremap handling really carefully, but it does assume that kernel and V make the same layout choices when doing mremap. So it's not robust. Problem is I can't think of a way make it robust without weakening the testing it does. J |
|
From: <sv...@va...> - 2005-11-02 15:32:23
|
Author: tom
Date: 2005-11-02 15:32:19 +0000 (Wed, 02 Nov 2005)
New Revision: 4989
Log:
Fix format string in signal mask printing.
Modified:
trunk/coregrind/m_signals.c
Modified: trunk/coregrind/m_signals.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_signals.c 2005-11-02 15:31:21 UTC (rev 4988)
+++ trunk/coregrind/m_signals.c 2005-11-02 15:32:19 UTC (rev 4989)
@@ -725,7 +725,7 @@
*oldset =3D VG_(threads)[tid].sig_mask;
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugExtraMsg,=20
- "\toldset=3D%p %08x%08x",
+ "\toldset=3D%p %s",
oldset, format_sigset(oldset));
}
if (newset) {
|
|
From: <sv...@va...> - 2005-11-02 15:31:29
|
Author: tom
Date: 2005-11-02 15:31:21 +0000 (Wed, 02 Nov 2005)
New Revision: 4988
Log:
Display signal masks correctly when --trace-signals=3Dyes is used
on 64 bit platforms.
Modified:
trunk/coregrind/m_signals.c
Modified: trunk/coregrind/m_signals.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_signals.c 2005-11-02 15:17:43 UTC (rev 4987)
+++ trunk/coregrind/m_signals.c 2005-11-02 15:31:21 UTC (rev 4988)
@@ -675,6 +675,28 @@
}
}
=20
+static
+const Char *format_sigset ( const vki_sigset_t* set )
+{
+ static Char buf[128];
+ int w;
+
+ VG_(strcpy)(buf, "");
+
+ for (w =3D _VKI_NSIG_WORDS - 1; w >=3D 0; w--)
+ {
+#if _VKI_NSIG_BPW =3D=3D 32
+ VG_(sprintf)(buf + VG_(strlen)(buf), "%08lx", set ? set->sig[w] : =
0);
+#elif _VKI_NSIG_BPW =3D=3D 64
+ VG_(sprintf)(buf + VG_(strlen)(buf), "%16lx", set ? set->sig[w] : =
0);
+#else
+#error "Unsupported value for _VKI_NSIG_BPW"
+#endif
+ }
+
+ return buf;
+}
+
/*=20
This updates the thread's signal mask. There's no such thing as a
process-wide signal mask.
@@ -690,13 +712,12 @@
{
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugExtraMsg,=20
- "do_setmask: tid =3D %d how =3D %d (%s), set =3D %p %08x%08x",=20
+ "do_setmask: tid =3D %d how =3D %d (%s), set =3D %p %s",=20
tid, how,
how=3D=3DVKI_SIG_BLOCK ? "SIG_BLOCK" : (
how=3D=3DVKI_SIG_UNBLOCK ? "SIG_UNBLOCK" : (
how=3D=3DVKI_SIG_SETMASK ? "SIG_SETMASK" : "???")),
- newset, newset ? newset->sig[1] : 0, newset ? newset->sig[0] : 0
- );
+ newset, format_sigset(newset));
=20
/* Just do this thread. */
vg_assert(VG_(is_valid_tid)(tid));
@@ -705,7 +726,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugExtraMsg,=20
"\toldset=3D%p %08x%08x",
- oldset, oldset->sig[1], oldset->sig[0]);
+ oldset, format_sigset(oldset));
}
if (newset) {
do_sigprocmask_bitops (how, &VG_(threads)[tid].sig_mask, newset );
|
|
From: Nicholas N. <nj...@cs...> - 2005-11-02 15:26:03
|
On Wed, 2 Nov 2005, Tom Hughes wrote: >> Does the as_mmap test serve any purpose now? >> >> It tries to map a chunk of memory at various fixed addresses in >> memory - presumably the idea was to check that it couldn't map in >> the valgrind areas. Certainly both sets of expected results show >> it failing at the high addresses. >> >> With the address space manager there are no longer any real guarantees >> about which addresses might or might not be available and one of the >> areas that is expected to fail is actually working on amd64. > > Much the same applies to as_shm as well, which is trying to attach a > shared memory segment at a high address and expecting it to fail. Removing both sounds fine to me. Good job with cleaning up the regtests, Tom. A bad test is arguably worse than no test at all. Nick |
|
From: <sv...@va...> - 2005-11-02 15:17:48
|
Author: tom Date: 2005-11-02 15:17:43 +0000 (Wed, 02 Nov 2005) New Revision: 4987 Log: Update EXTRA_DIST to include new results files. Modified: trunk/memcheck/tests/Makefile.am Modified: trunk/memcheck/tests/Makefile.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/memcheck/tests/Makefile.am 2005-11-02 15:03:12 UTC (rev 4986) +++ trunk/memcheck/tests/Makefile.am 2005-11-02 15:17:43 UTC (rev 4987) @@ -75,7 +75,7 @@ signal2.stderr.exp signal2.stdout.exp signal2.vgtest \ sigprocmask.stderr.exp sigprocmask.vgtest \ stack_changes.stderr.exp stack_changes.stdout.exp stack_changes.vgtest = \ - strchr.stderr.exp strchr.vgtest \ + strchr.stderr.exp strchr.stderr.exp2 strchr.vgtest \ str_tester.stderr.exp str_tester.vgtest \ supp_unknown.stderr.exp supp_unknown.vgtest supp_unknown.supp \ supp1.stderr.exp supp1.vgtest \ @@ -87,7 +87,8 @@ metadata.stderr.exp metadata.stdout.exp metadata.vgtest-HIDING \ vgtest_ume.stderr.exp vgtest_ume.disabled \ writev.stderr.exp writev.stderr.exp2 writev.stderr.exp3 writev.vgtest \ - xml1.stderr.exp xml1.stderr.exp2 xml1.stderr.exp64 xml1.stdout.exp \ + xml1.stderr.exp xml1.stderr.exp2 xml1.stderr.exp3 \ + xml1.stderr.exp64 xml1.stderr.exp64_2 xml1.stdout.exp \ xml1.vgtest \ zeropage.stderr.exp zeropage.stderr.exp2 zeropage.stdout.exp \ zeropage.vgtest |
|
From: <sv...@va...> - 2005-11-02 15:03:15
|
Author: tom Date: 2005-11-02 15:03:12 +0000 (Wed, 02 Nov 2005) New Revision: 4986 Log: Add alternate results for memcheck/tests/strchr on amd64. Added: trunk/memcheck/tests/strchr.stderr.exp2 Added: trunk/memcheck/tests/strchr.stderr.exp2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/memcheck/tests/strchr.stderr.exp2 2005-11-02 14:42:39 UTC (rev = 4985) +++ trunk/memcheck/tests/strchr.stderr.exp2 2005-11-02 15:03:12 UTC (rev = 4986) @@ -0,0 +1,11 @@ +Conditional jump or move depends on uninitialised value(s) + at 0x........: index (mac_replace_strmem.c:...) + by 0x........: main (strchr.c:15) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: index (mac_replace_strmem.c:...) + by 0x........: main (strchr.c:15) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: rindex (mac_replace_strmem.c:...) + by 0x........: main (strchr.c:16) |
|
From: Tom H. <to...@co...> - 2005-11-02 14:57:20
|
In message <yek...@de...>
Tom Hughes <to...@co...> wrote:
> Does the as_mmap test serve any purpose now?
>
> It tries to map a chunk of memory at various fixed addresses in
> memory - presumably the idea was to check that it couldn't map in
> the valgrind areas. Certainly both sets of expected results show
> it failing at the high addresses.
>
> With the address space manager there are no longer any real guarantees
> about which addresses might or might not be available and one of the
> areas that is expected to fail is actually working on amd64.
Much the same applies to as_shm as well, which is trying to attach a
shared memory segment at a high address and expecting it to fail.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Tom H. <to...@co...> - 2005-11-02 14:52:08
|
Does the as_mmap test serve any purpose now? It tries to map a chunk of memory at various fixed addresses in memory - presumably the idea was to check that it couldn't map in the valgrind areas. Certainly both sets of expected results show it failing at the high addresses. With the address space manager there are no longer any real guarantees about which addresses might or might not be available and one of the areas that is expected to fail is actually working on amd64. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: <sv...@va...> - 2005-11-02 14:42:55
|
Author: tom
Date: 2005-11-02 14:42:39 +0000 (Wed, 02 Nov 2005)
New Revision: 4985
Log:
The sloppyRXcheck logic in the sync checker was not correct - it was=20
simply treating R and X as equivalent but the real problem is that=20
mappings can appear to have X permission entirely indepenent of anything
else with recent x86 kernels.
If a mapping is inside the (deliberately constrained) code segment then
it will appear to have X permission regardless of whether R or X was aske=
d
for when it was mapped, so what we really need to do is allow the kernel
to add X to any mapping but not to take it away if we were expecting it.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-11-02 13:58:39 UTC (rev =
4984)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-11-02 14:42:39 UTC (rev =
4985)
@@ -1072,7 +1072,7 @@
const UChar* filename )
{
Int iLo, iHi, i;
- Bool sloppyRXcheck;
+ Bool sloppyXcheck;
=20
/* If a problem has already been detected, don't continue comparing
segments, so as to avoid flooding the output with error
@@ -1097,22 +1097,22 @@
aspacem_assert(nsegments[iHi].end >=3D addr + len - 1 );
=20
/* x86 doesn't differentiate 'x' and 'r' (at least, all except the
- most recent NX-bit enabled CPUs) and so recent kernels mark most
- readable sections also as executable (in the /proc/self/maps
- they give out), which makes checking fail. When sloppyRXcheck
- is True, the checker therefore regards R and X as
- interchangeable. */
- sloppyRXcheck =3D False;
+ most recent NX-bit enabled CPUs) and so recent kernels attempt
+ to provide execute protection by placing all executable mappings
+ low down in the address space and then reducing the size of the
+ code segment to prevent code at higher addresses being executed.
+
+ These kernels report which mappings are really executable in
+ the /proc/self/maps output rather than mirroring what was asked
+ for when each mapping was created. In order to cope with this we
+ have a slopyXcheck mode which we enable on x86 - in this mode we
+ allow the kernel to report execute permission when we weren't
+ expecting it but not vice versa. */
+ sloppyXcheck =3D False;
# if defined(VGA_x86)
- sloppyRXcheck =3D True;
+ sloppyXcheck =3D True;
# endif
=20
- if (sloppyRXcheck) {
- /* If either bit is set, ensure both are set. */
- if (prot & (VKI_PROT_READ|VKI_PROT_EXEC))
- prot |=3D (VKI_PROT_READ|VKI_PROT_EXEC);
- }
-
/* NSegments iLo .. iHi inclusive should agree with the presented
data. */
for (i =3D iLo; i <=3D iHi; i++) {
@@ -1144,10 +1144,13 @@
if (filename && 0=3D=3DVG_(strcmp)(filename, "/dev/zero (deleted)"=
))
cmp_devino =3D False;
=20
- if (sloppyRXcheck) {
- /* If either bit is set, ensure both are set. */
- if (seg_prot & (VKI_PROT_READ|VKI_PROT_EXEC))
- seg_prot |=3D (VKI_PROT_READ|VKI_PROT_EXEC);
+ /* If we are doing sloppy execute permission checks then we
+ allow segment to have X permission when we weren't expecting
+ it (but not vice versa) so if the kernel reported execute
+ permission then pretend that this segment has it regardless
+ of what we were expecting. */
+ if (sloppyXcheck && (prot & VKI_PROT_EXEC) !=3D 0) {
+ seg_prot |=3D VKI_PROT_EXEC;
}
=20
same =3D same
|
|
From: <sv...@va...> - 2005-11-02 13:58:44
|
Author: tom
Date: 2005-11-02 13:58:39 +0000 (Wed, 02 Nov 2005)
New Revision: 4984
Log:
Removed memcheck/tests/weirdioctl as it is badly broken and seems
to serve no useful purpose.
Removed:
trunk/memcheck/tests/weirdioctl.c
trunk/memcheck/tests/weirdioctl.stderr.exp
trunk/memcheck/tests/weirdioctl.stdout.exp
trunk/memcheck/tests/weirdioctl.vgtest
Modified:
trunk/memcheck/tests/Makefile.am
Modified: trunk/memcheck/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/Makefile.am 2005-11-02 13:02:40 UTC (rev 4983)
+++ trunk/memcheck/tests/Makefile.am 2005-11-02 13:58:39 UTC (rev 4984)
@@ -84,7 +84,6 @@
suppfree.stderr.exp suppfree.vgtest \
toobig-allocs.stderr.exp toobig-allocs.vgtest \
trivialleak.stderr.exp trivialleak.vgtest \
- weirdioctl.stderr.exp weirdioctl.stdout.exp weirdioctl.vgtest \
metadata.stderr.exp metadata.stdout.exp metadata.vgtest-HIDING \
vgtest_ume.stderr.exp vgtest_ume.disabled \
writev.stderr.exp writev.stderr.exp2 writev.stderr.exp3 writev.vgtest \
@@ -114,7 +113,7 @@
realloc1 realloc2 realloc3 \
sigaltstack signal2 sigprocmask sigkill \
stack_changes strchr str_tester supp_unknown supp1 supp2 suppfree \
- trivialleak weirdioctl \
+ trivialleak \
mismatches new_override metadata \
xml1 \
writev zeropage
Deleted: trunk/memcheck/tests/weirdioctl.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/weirdioctl.c 2005-11-02 13:02:40 UTC (rev 4983)
+++ trunk/memcheck/tests/weirdioctl.c 2005-11-02 13:58:39 UTC (rev 4984)
@@ -1,47 +0,0 @@
-
-/* A program which sets a readable fd to have a timeout, and therefore
- needs --simulation-hints=3Dioctl-VTIME in order to run without
- blocking.=20
-
- [Nb: no longer true, since the ioctl-VTIME hack no longer exists]
-*/
-
-#include <stdio.h>
-#include <sys/ioctl.h>
-#include <termio.h>
-
-int main ( void )
-{
- int c, i;
- int res;
- struct termio tty, oldtty;
-
- /**
- ** Save the old tty settings, and get rid of echo
- ** for the new tty settings
- **/
- ioctl(0, TCGETA, &oldtty);
- tty =3D oldtty;
- tty.c_lflag &=3D ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL);
- tty.c_cc[VMIN] =3D 0;
- tty.c_cc[VTIME] =3D 5;
- res =3D ioctl(0, TCSETA, &tty);
- printf("first ioctl returned %d\n", res);
-
- /**
- ** Now do whatever stuff you want non-echoed
- **/
- i =3D 0;
- while (i++ < 50) {
- c =3D getchar();
- printf("got %d\n", c);
- }
-
- /**
- ** Now reset the old settings
- **/
- res =3D ioctl(0, TCSETA, &oldtty);
- printf("second ioctl returned %d\n", res);
-
-return 0;
-}
Deleted: trunk/memcheck/tests/weirdioctl.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/weirdioctl.stderr.exp 2005-11-02 13:02:40 UTC (r=
ev 4983)
+++ trunk/memcheck/tests/weirdioctl.stderr.exp 2005-11-02 13:58:39 UTC (r=
ev 4984)
@@ -1,5 +0,0 @@
-Syscall param ioctl(TCSET{A,AW,AF}) points to uninitialised byte(s)
- at 0x........: ioctl (in /...libc...)
- by 0x........: __libc_start_main (in /...libc...)
- by 0x........: ...
- Address 0x........ is on thread 1's stack
Deleted: trunk/memcheck/tests/weirdioctl.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/weirdioctl.stdout.exp 2005-11-02 13:02:40 UTC (r=
ev 4983)
+++ trunk/memcheck/tests/weirdioctl.stdout.exp 2005-11-02 13:58:39 UTC (r=
ev 4984)
@@ -1,52 +0,0 @@
-first ioctl returned -1
-got 10
-got 47
-got 42
-got 32
-got 65
-got 32
-got 112
-got 114
-got 111
-got 103
-got 114
-got 97
-got 109
-got 32
-got 119
-got 104
-got 105
-got 99
-got 104
-got 32
-got 115
-got 101
-got 116
-got 115
-got 32
-got 97
-got 32
-got 114
-got 101
-got 97
-got 100
-got 97
-got 98
-got 108
-got 101
-got 32
-got 102
-got 100
-got 32
-got 116
-got 111
-got 32
-got 104
-got 97
-got 118
-got 101
-got 32
-got 97
-got 32
-got 116
-second ioctl returned -1
Deleted: trunk/memcheck/tests/weirdioctl.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/weirdioctl.vgtest 2005-11-02 13:02:40 UTC (rev 4=
983)
+++ trunk/memcheck/tests/weirdioctl.vgtest 2005-11-02 13:58:39 UTC (rev 4=
984)
@@ -1,3 +0,0 @@
-prog: weirdioctl
-vgopts: -q
-args: < weirdioctl.c
|
|
From: Julian S. <js...@ac...> - 2005-11-02 13:20:55
|
I think it harks back to the 1.0.X days where some kind of strange hang happened due to the poor threading support back then. I agree (1) it's nonsensical and (2) it fails on N different machines here too. I think we should remove it. J On Wednesday 02 November 2005 09:31, Tom Hughes wrote: > Does anybody know what memcheck/tests/weirdioctl is trying to > accomplish? It looks like whatever it was trying to test is now > defunct anyway and the test itself is nonsense. > > It fetches the terminal attributes for standard input, modifies > them and does some stuff and then restores them. > > The problem is that standard input is not a terminal as the vgtest > file provides a file as standard input, so none of the terminal ioctls > actually does anything (they all fail) and you just get warnings from > memcheck about passing uninitialised data to TCSETA. > > For some reason the results only have one warning but all my machines > seem to print two as expected (there are two calls to TCSETA and both > have undefined arguments because the TCGETA failed). > > Tom |
|
From: Julian S. <js...@ac...> - 2005-11-02 13:03:23
|
Fixed; how tiresome. The repos (databases) are always OK, but something writes a file with unexpected permissions in the db dir and svnserve gets spooked. I'll make enquiries. J On Tuesday 01 November 2005 23:54, Tom Hughes wrote: > The repository has fallen over again: > > dunsmere [~/src/valgrind-3] % svn update > svn: Berkeley DB error for filesystem /home/svn/repos/valgrind/db while > opening environment: DB_RUNRECOVERY: Fatal error, run database recovery > svn: bdb: PANIC: fatal region error detected; run recovery > > Rom |
|
From: <sv...@va...> - 2005-11-02 13:02:42
|
Author: tom
Date: 2005-11-02 13:02:40 +0000 (Wed, 02 Nov 2005)
New Revision: 4983
Log:
Don't give the heap execute permission - the linux kernel doesn't
normally give execute permission to memory allocated from the heap
with sbrk.
This also required fixing the smc1 test for amd64 to use mmap to
allocate memory so that it can have execute permission.
Modified:
trunk/coregrind/m_main.c
trunk/none/tests/amd64/smc1.c
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2005-11-02 13:00:41 UTC (rev 4982)
+++ trunk/coregrind/m_main.c 2005-11-02 13:02:40 UTC (rev 4983)
@@ -669,7 +669,7 @@
sres =3D VG_(am_mmap_anon_fixed_client)(=20
anon_start,=20
anon_size,=20
- VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC=20
+ VKI_PROT_READ|VKI_PROT_WRITE
);
vg_assert(!sres.isError);
vg_assert(sres.val =3D=3D anon_start);
Modified: trunk/none/tests/amd64/smc1.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/smc1.c 2005-11-02 13:00:41 UTC (rev 4982)
+++ trunk/none/tests/amd64/smc1.c 2005-11-02 13:02:40 UTC (rev 4983)
@@ -31,7 +31,7 @@
=20
#include <stdio.h>
#include <assert.h>
-#include <malloc.h>
+#include <sys/mman.h>
=20
typedef unsigned long long int Addr;
typedef unsigned char UChar;
@@ -100,8 +100,9 @@
int main ( void )
{
int i;
- code =3D malloc(20);
- assert(code);
+ code =3D mmap(NULL, 20, PROT_READ|PROT_WRITE|PROT_EXEC,
+ MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
+ assert(code !=3D MAP_FAILED);
for (i =3D 0; i < 10; i +=3D 2) {
set_dest ( (Addr)&p );
// diversion();
@@ -110,5 +111,6 @@
// diversion();
aa(i+1);
}
+ munmap(code, 20);
return 0;
}
|
|
From: <sv...@va...> - 2005-11-02 13:00:44
|
Author: tom Date: 2005-11-02 13:00:41 +0000 (Wed, 02 Nov 2005) New Revision: 4982 Log: Update memcheck/tests/xml1 results. Added: trunk/memcheck/tests/xml1.stderr.exp3 Added: trunk/memcheck/tests/xml1.stderr.exp3 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/memcheck/tests/xml1.stderr.exp3 2005-11-02 13:00:03 UTC (rev 49= 81) +++ trunk/memcheck/tests/xml1.stderr.exp3 2005-11-02 13:00:41 UTC (rev 49= 82) @@ -0,0 +1,449 @@ +<?xml version=3D"1.0"?> + +<valgrindoutput> + +<protocolversion>1</protocolversion> + +<preamble> + <line>...</line> + <line>...</line> + <line>...</line> + <line>...</line> + <line>...</line> + <line>...</line> +</preamble> + +<pid>...</pid> +<ppid>...</ppid> +<tool>memcheck</tool> + +<args> + <vargv>...</vargv> + <argv> + <exe>./xml1</exe> + </argv> +</args> + +<status> + <state>RUNNING</state> + <time>...</time> +</status> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>InvalidRead</kind> + <what>Invalid read of size 4</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> + <auxwhat>Address 0x........ is 0 bytes after a block of size 40 alloc'= d</auxwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>malloc</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>UninitCondition</kind> + <what>Conditional jump or move depends on uninitialised value(s)</what= > + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>UninitValue</kind> + <what>Use of uninitialised value of size 4</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>InvalidFree</kind> + <what>Invalid free() / delete / delete[]</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>free</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> + <auxwhat>Address 0x........ is 0 bytes inside a block of size 40 free'= d</auxwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>free</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>InvalidFree</kind> + <what>Invalid free() / delete / delete[]</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>free</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> + <auxwhat>Address 0x........ is on thread 1's stack</auxwhat> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>SyscallParam</kind> + <what>Syscall param exit_group(exit_code) contains uninitialised byte(= s)</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>_Exit</fn> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>__libc_start_main</fn> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + </frame> + </stack> +</error> + +<errorcounts> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> +</errorcounts> + +<status> + <state>FINISHED</state> + <time>...</time> +</status> + +<suppcounts>...</suppcounts> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>Leak_DefinitelyLost</kind> + <what>396 bytes in 1 blocks are definitely lost in loss record 1 of 1<= /what> + <leakedbytes>396</leakedbytes> + <leakedblocks>1</leakedblocks> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>malloc</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> +</error> + +</valgrindoutput> + |
|
From: <sv...@va...> - 2005-11-02 13:00:11
|
Author: tom Date: 2005-11-02 13:00:03 +0000 (Wed, 02 Nov 2005) New Revision: 4981 Log: Update memcheck/tests/xml1 results. Added: trunk/memcheck/tests/xml1.stderr.exp64_2 Modified: trunk/memcheck/tests/xml1.stderr.exp64 Modified: trunk/memcheck/tests/xml1.stderr.exp64 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/memcheck/tests/xml1.stderr.exp64 2005-11-01 19:46:07 UTC (rev 4= 980) +++ trunk/memcheck/tests/xml1.stderr.exp64 2005-11-02 13:00:03 UTC (rev 4= 981) @@ -24,7 +24,10 @@ </argv> </args> =20 -<status> <state>RUNNING</state> <time>...</time> </status> +<status> + <state>RUNNING</state> + <time>...</time> +</status> =20 <error> <unique>0x........</unique> @@ -366,15 +369,36 @@ </error> =20 <errorcounts> - <pair> <count>...</count> <unique>0x........</unique> </pair> - <pair> <count>...</count> <unique>0x........</unique> </pair> - <pair> <count>...</count> <unique>0x........</unique> </pair> - <pair> <count>...</count> <unique>0x........</unique> </pair> - <pair> <count>...</count> <unique>0x........</unique> </pair> - <pair> <count>...</count> <unique>0x........</unique> </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> </errorcounts> =20 -<status> <state>FINISHED</state> <time>...</time> </status> +<status> + <state>FINISHED</state> + <time>...</time> +</status> =20 <suppcounts>...</suppcounts> =20 Added: trunk/memcheck/tests/xml1.stderr.exp64_2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/memcheck/tests/xml1.stderr.exp64_2 2005-11-01 19:46:07 UTC (rev= 4980) +++ trunk/memcheck/tests/xml1.stderr.exp64_2 2005-11-02 13:00:03 UTC (rev= 4981) @@ -0,0 +1,454 @@ +<?xml version=3D"1.0"?> + +<valgrindoutput> + +<protocolversion>1</protocolversion> + +<preamble> + <line>...</line> + <line>...</line> + <line>...</line> + <line>...</line> + <line>...</line> + <line>...</line> +</preamble> + +<pid>...</pid> +<ppid>...</ppid> +<tool>memcheck</tool> + +<args> + <vargv>...</vargv> + <argv> + <exe>./xml1</exe> + </argv> +</args> + +<status> + <state>RUNNING</state> + <time>...</time> +</status> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>InvalidRead</kind> + <what>Invalid read of size 4</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> + <auxwhat>Address 0x........ is 0 bytes after a block of size 40 alloc'= d</auxwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>malloc</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>UninitCondition</kind> + <what>Conditional jump or move depends on uninitialised value(s)</what= > + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>UninitValue</kind> + <what>Use of uninitialised value of size 8</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>InvalidFree</kind> + <what>Invalid free() / delete / delete[]</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>free</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> + <auxwhat>Address 0x........ is 0 bytes inside a block of size 40 free'= d</auxwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>free</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>InvalidFree</kind> + <what>Invalid free() / delete / delete[]</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>free</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> + <auxwhat>Address 0x........ is on thread 1's stack</auxwhat> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>SyscallParam</kind> + <what>Syscall param exit_group(exit_code) contains uninitialised byte(= s)</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>_Exit</fn> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>exit</fn> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>__libc_start_main</fn> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + </frame> + </stack> +</error> + +<errorcounts> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> + <pair> + <count>...</count> + <unique>0x........</unique> + </pair> +</errorcounts> + +<status> + <state>FINISHED</state> + <time>...</time> +</status> + +<suppcounts>...</suppcounts> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>Leak_DefinitelyLost</kind> + <what>396 bytes in 1 blocks are definitely lost in loss record 1 of 1<= /what> + <leakedbytes>396</leakedbytes> + <leakedblocks>1</leakedblocks> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>malloc</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame3</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame2</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>frame1</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>xml1.c</file> + <line>...</line> + </frame> + </stack> +</error> + +</valgrindoutput> + |
|
From: Tom H. <to...@co...> - 2005-11-02 09:31:27
|
Does anybody know what memcheck/tests/weirdioctl is trying to accomplish? It looks like whatever it was trying to test is now defunct anyway and the test itself is nonsense. It fetches the terminal attributes for standard input, modifies them and does some stuff and then restores them. The problem is that standard input is not a terminal as the vgtest file provides a file as standard input, so none of the terminal ioctls actually does anything (they all fail) and you just get warnings from memcheck about passing uninitialised data to TCSETA. For some reason the results only have one warning but all my machines seem to print two as expected (there are two calls to TCSETA and both have undefined arguments because the TCGETA failed). Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Josef W. <Jos...@gm...> - 2005-11-02 09:04:15
|
On Wednesday 02 November 2005 06:50, Yao Qi wrote: > Hello,all, > > I am reading lackey/lk_main.c and I want to add some features to > lackey. One thing I want to do is to get the name of the specified > program in lackey, for example, > > ./coregrind/valgrind --tool=lackey hello > > How could lackey get the program name "hello"? I think stage1 and > stage2 could do that, but I am not sure how to do that in a valgrind > tool. Maybe someone of you could clarify for me. Thanks in advance. When writing a tool, you need to use functions/global variables defined in valgrinds tool API. For VG 3.x, the API is defined in the header files $prefix/include/valgrind/pub_tool_* For VG 2.x, it was $prefix/include/valgrind/vg_tool.h The concrete function (more exact: global variable) you ask for changed from VG 3.0.x to VG 3.1.x. For VG 3.0.x, it is VG_(client_argv)[0], defined in pub_tool_libcproc.h. For VG 3.1.x, it is VG_(args_the_exename), defined in pub_tool_clientstate.h. Josef |
|
From: Yao Qi <qiy...@cn...> - 2005-11-02 05:50:23
|
Hello,all, I am reading lackey/lk_main.c and I want to add some features to lackey. One thing I want to do is to get the name of the specified program in lackey, for example, ./coregrind/valgrind --tool=lackey hello How could lackey get the program name "hello"? I think stage1 and stage2 could do that, but I am not sure how to do that in a valgrind tool. Maybe someone of you could clarify for me. Thanks in advance. -- Regards, Yao Yao Qi |
|
From: <js...@ac...> - 2005-11-02 03:40:10
|
Nightly build on g5 ( YDL 4.0, ppc970 ) started at 2005-11-02 04:40:00 CET Checking out vex source tree ... failed Last 20 lines of log.verbose follow Nightly build on g5 ( YDL 4.0, ppc970 ) started at 2005-11-02 04:40:00 CET svn: Berkeley DB error for filesystem /home/svn/repos/vex/db while opening environment: DB_RUNRECOVERY: Fatal error, run database recovery svn: bdb: PANIC: fatal region error detected; run recovery |