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
(13) |
2
(33) |
3
(25) |
4
(22) |
5
(22) |
6
(21) |
7
(19) |
|
8
(29) |
9
(34) |
10
(29) |
11
(37) |
12
(36) |
13
(28) |
14
(25) |
|
15
(28) |
16
(23) |
17
(36) |
18
(21) |
19
(12) |
20
(14) |
21
(10) |
|
22
(7) |
23
(15) |
24
(41) |
25
(15) |
26
(9) |
27
(7) |
28
(6) |
|
29
(16) |
30
(24) |
31
(22) |
|
|
|
|
|
From: <sv...@va...> - 2005-05-15 23:36:55
|
Author: njn
Date: 2005-05-16 00:36:12 +0100 (Mon, 16 May 2005)
New Revision: 3729
Modified:
trunk/coregrind/amd64/core_arch.h
trunk/coregrind/vg_mylibc.c
trunk/coregrind/x86/core_arch.h
Log:
Move VGA_GET_REAL_{STACK,FRAME}_PTR into vg_symtab2.c.
Modified: trunk/coregrind/amd64/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/amd64/core_arch.h 2005-05-15 21:09:40 UTC (rev 3728)
+++ trunk/coregrind/amd64/core_arch.h 2005-05-15 23:36:12 UTC (rev 3729)
@@ -65,16 +65,6 @@
#define VGA_STACK_FRAME_RET(rbp) (((UWord*)rbp)[1])
#define VGA_STACK_FRAME_NEXT(rbp) (((UWord*)rbp)[0])
=20
-// Get stack pointer and frame pointer
-#define VGA_GET_REAL_STACK_PTR(lval) do { \
- asm("movq %%rsp, %0" : "=3Dr" (lval)); \
-} while (0)
-
-#define VGA_GET_REAL_FRAME_PTR(lval) do { \
- asm("movq %%rbp, %0" : "=3Dr" (lval)); \
-} while (0)
-
-
/* ---------------------------------------------------------------------
Architecture-specific part of a ThreadState
------------------------------------------------------------------ */
Modified: trunk/coregrind/vg_mylibc.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/vg_mylibc.c 2005-05-15 21:09:40 UTC (rev 3728)
+++ trunk/coregrind/vg_mylibc.c 2005-05-15 23:36:12 UTC (rev 3729)
@@ -906,6 +906,23 @@
Assertery.
------------------------------------------------------------------ */
=20
+#if defined(VGP_x86_linux)
+# define GET_REAL_SP_AND_FP(sp, fp) \
+ asm("movl %%esp, %0;" \
+ "movl %%ebp, %1;" \
+ : "=3Dr" (sp),\
+ "=3Dr" (fp));
+#elif defined(VGP_amd64_linux)
+# define GET_REAL_SP_AND_FP(sp, fp) \
+ asm("movq %%rsp, %0;" \
+ "movl %%rbp, %1;" \
+ : "=3Dr" (sp),\
+ "=3Dr" (fp));
+#else
+# error Unknown platform
+#endif
+
+
/* Fake up an ExeContext which is of our actual real CPU state, so we
can print a stack trace. This isn't terribly useful in the case
where we were killed by a signal, since we just get a backtrace
@@ -920,8 +937,7 @@
ThreadId tid =3D VG_(get_lwp_tid)(VG_(gettid)());
ThreadState *tst =3D VG_(get_ThreadState)(tid);
=20
- VGA_GET_REAL_STACK_PTR(sp);
- VGA_GET_REAL_FRAME_PTR(fp);
+ GET_REAL_SP_AND_FP(sp, fp);
=20
stacktop =3D tst->os_state.valgrind_stack_base +=20
tst->os_state.valgrind_stack_szB;
Modified: trunk/coregrind/x86/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/x86/core_arch.h 2005-05-15 21:09:40 UTC (rev 3728)
+++ trunk/coregrind/x86/core_arch.h 2005-05-15 23:36:12 UTC (rev 3729)
@@ -65,15 +65,6 @@
#define VGA_STACK_FRAME_RET(ebp) (((UInt*)ebp)[1])
#define VGA_STACK_FRAME_NEXT(ebp) (((UInt*)ebp)[0])
=20
-// Get stack pointer and frame pointer
-#define VGA_GET_REAL_STACK_PTR(esp) do { \
- asm("movl %%esp, %0" : "=3Dr" (esp)); \
-} while (0)
-
-#define VGA_GET_REAL_FRAME_PTR(ebp) do { \
- asm("movl %%ebp, %0" : "=3Dr" (ebp)); \
-} while (0)
-
//extern const Char VG_(helper_wrapper_before)[]; /* in dispatch.S */
//extern const Char VG_(helper_wrapper_return)[]; /* in dispatch.S */
=20
|
|
From: <sv...@va...> - 2005-05-15 21:09:48
|
Author: njn
Date: 2005-05-15 22:09:40 +0100 (Sun, 15 May 2005)
New Revision: 3728
Modified:
trunk/coregrind/m_errormgr.c
Log:
bugfix: don't print bogus "obj:" lines when generating suppressions. =20
Thanks to Julian for spotting and diagnosing it.
Modified: trunk/coregrind/m_errormgr.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_errormgr.c 2005-05-15 21:03:42 UTC (rev 3727)
+++ trunk/coregrind/m_errormgr.c 2005-05-15 21:09:40 UTC (rev 3728)
@@ -351,7 +351,7 @@
=20
if ( VG_(get_fnname_nodemangle) (ip, buf, VG_ERRTXT_LEN) ) {
VG_(printf)(" fun:%s\n", buf);
- } else if ( VG_(get_objname)(ip, buf+7, VG_ERRTXT_LEN-7) ) {
+ } else if ( VG_(get_objname)(ip, buf, VG_ERRTXT_LEN) ) {
VG_(printf)(" obj:%s\n", buf);
} else {
VG_(printf)(" ???:??? "
|
|
From: <sv...@va...> - 2005-05-15 21:03:45
|
Author: njn
Date: 2005-05-15 22:03:42 +0100 (Sun, 15 May 2005)
New Revision: 3727
Modified:
trunk/coregrind/amd64/core_arch.h
trunk/coregrind/arm/core_arch.h
trunk/coregrind/vg_main.c
trunk/coregrind/x86/core_arch.h
Log:
Let's assume the client's address space starts at 0 until we port
to a platform for which that's not true.
Modified: trunk/coregrind/amd64/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/amd64/core_arch.h 2005-05-15 20:52:04 UTC (rev 3726)
+++ trunk/coregrind/amd64/core_arch.h 2005-05-15 21:03:42 UTC (rev 3727)
@@ -108,10 +108,6 @@
// Valgrind's stack size, in words.
#define VGA_STACK_SIZE_W 16384
=20
-// Base address of client address space.
-#define VGA_CLIENT_BASE 0x0ul
-
-
#endif // __AMD64_CORE_ARCH_H
=20
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/arm/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/arm/core_arch.h 2005-05-15 20:52:04 UTC (rev 3726)
+++ trunk/coregrind/arm/core_arch.h 2005-05-15 21:03:42 UTC (rev 3727)
@@ -106,9 +106,6 @@
Miscellaneous constants
------------------------------------------------------------------ */
=20
-// Base address of client address space.
-#define VGA_CLIENT_BASE 0x0ul
-
#endif // __ARM_CORE_ARCH_H
=20
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/vg_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/vg_main.c 2005-05-15 20:52:04 UTC (rev 3726)
+++ trunk/coregrind/vg_main.c 2005-05-15 21:03:42 UTC (rev 3727)
@@ -392,7 +392,7 @@
// taking into account the tool's shadow needs.
client_size =3D ROUNDDN((VG_(valgrind_base)-REDZONE_SIZE) / (=
1.+ratio),
CLIENT_SIZE_MULTIPLE);
- VG_(client_base) =3D VGA_CLIENT_BASE;
+ VG_(client_base) =3D 0;
VG_(client_end) =3D VG_(client_base) + client_size;
/* where !FIXED mmap goes */
VG_(client_mapbase) =3D VG_(client_base) +
@@ -2386,7 +2386,7 @@
=20
The memory map it creates is:
=20
- VGA_CLIENT_BASE +-------------------------+
+ client_base +-------------------------+
| client address space |
: :
: :
Modified: trunk/coregrind/x86/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/x86/core_arch.h 2005-05-15 20:52:04 UTC (rev 3726)
+++ trunk/coregrind/x86/core_arch.h 2005-05-15 21:03:42 UTC (rev 3727)
@@ -112,10 +112,6 @@
// Valgrind's stack size, in words.
#define VGA_STACK_SIZE_W 16384
=20
-// Base address of client address space.
-#define VGA_CLIENT_BASE 0x0ul
-
-
#endif // __X86_CORE_ARCH_H
=20
/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2005-05-15 20:52:11
|
Author: njn
Date: 2005-05-15 21:52:04 +0100 (Sun, 15 May 2005)
New Revision: 3726
Removed:
trunk/coregrind/amd64-linux/ldt.c
trunk/coregrind/amd64/amd64_private.h
trunk/coregrind/x86-linux/ldt.c
trunk/coregrind/x86/x86_private.h
Modified:
trunk/coregrind/amd64-linux/Makefile.am
trunk/coregrind/amd64-linux/core_platform.h
trunk/coregrind/amd64/Makefile.am
trunk/coregrind/amd64/state.c
trunk/coregrind/core.h
trunk/coregrind/m_syscalls/syscalls-amd64-linux.c
trunk/coregrind/m_syscalls/syscalls-x86-linux.c
trunk/coregrind/pub_core_syscalls.h
trunk/coregrind/vg_scheduler.c
trunk/coregrind/vg_signals.c
trunk/coregrind/x86-linux/Makefile.am
trunk/coregrind/x86-linux/core_platform.h
trunk/coregrind/x86/Makefile.am
trunk/coregrind/x86/state.c
Log:
Improved structure of LDT-related code:
- one declarations from core.h removed, one moved to within m_syscalls.
- all the x86 LDT stuff made local to m_syscalls. x86-linux/ldt.c remove=
d
as a result. x86/state.c slimmed down, too. x86/x86_private.h removed
too.
- all the AMD64 LDT stuff was deleted, since it was all commented out. I=
t
can be added back in later in the appropriate places if necessary.
Thus amd64-linux/ldt.c and amd64/amd64_private.h were removed.
- other minor naming changes
I hope I didn't break AMD64 compilation.
Modified: trunk/coregrind/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/coregrind/amd64/Makefile.am 2005-05-15 18:51:47 UTC (rev 3725)
+++ trunk/coregrind/amd64/Makefile.am 2005-05-15 20:52:04 UTC (rev 3726)
@@ -5,8 +5,7 @@
=20
noinst_HEADERS =3D \
core_arch.h \
- core_arch_asm.h \
- amd64_private.h
+ core_arch_asm.h
=20
noinst_LIBRARIES =3D libarch.a
=20
Deleted: trunk/coregrind/amd64/amd64_private.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/amd64/amd64_private.h 2005-05-15 18:51:47 UTC (rev 37=
25)
+++ trunk/coregrind/amd64/amd64_private.h 2005-05-15 20:52:04 UTC (rev 37=
26)
@@ -1,46 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Private arch-specific header. amd64/amd64_private.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Nicholas Nethercote
- nj...@va...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#ifndef __AMD64_PRIVATE_H
-#define __AMD64_PRIVATE_H
-
-#include "core_arch_asm.h" // arch-specific asm stuff
-#include "tool_arch.h" // arch-specific tool stuff
-
-/* ---------------------------------------------------------------------
- Exports of state.c that are not core-visible
- ------------------------------------------------------------------ */
-
-
-#endif // __AMD64_PRIVATE_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/amd64/state.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/amd64/state.c 2005-05-15 18:51:47 UTC (rev 3725)
+++ trunk/coregrind/amd64/state.c 2005-05-15 20:52:04 UTC (rev 3726)
@@ -30,7 +30,6 @@
=20
#include "core.h"
#include "pub_core_tooliface.h"
-#include "amd64_private.h"
#include <sys/ptrace.h>
=20
#include "libvex_guest_amd64.h"
@@ -87,36 +86,6 @@
/*--- Thread stuff ---*/
/*------------------------------------------------------------*/
=20
-void VGA_(cleanup_thread) ( ThreadArchState *arch )
-{ =20
- /* TODO: deallocate the thread's LDT / GDT ? */
-} =20
-
-
-void VGA_(setup_child) ( /*OUT*/ ThreadArchState *child,=20
- /*IN*/ ThreadArchState *parent )
-{ =20
- /* We inherit our parent's guest state. */
- child->vex =3D parent->vex;
- child->vex_shadow =3D parent->vex_shadow;
-#if 0
- /* TODO: inherit the thread's LDT / GDT ? */
- /* We inherit our parent's LDT. */
- if (parent->vex.guest_LDT =3D=3D (HWord)NULL) {
- /* We hope this is the common case. */
- child->vex.guest_LDT =3D (HWord)NULL;
- } else {
- /* No luck .. we have to take a copy of the parent's. */
- child->vex.guest_LDT =3D (HWord)VG_(alloc_zeroed_x86_LDT)();
- copy_LDT_from_to( (VexGuestX86SegDescr*)parent->vex.guest_LDT,=20
- (VexGuestX86SegDescr*)child->vex.guest_LDT );
- }
-
- /* We need an empty GDT. */
- child->vex.guest_GDT =3D (HWord)NULL;
-#endif
-} =20
-
void VGA_(mark_from_registers)(ThreadId tid, void (*marker)(Addr))
{
ThreadState *tst =3D VG_(get_ThreadState)(tid);
Modified: trunk/coregrind/amd64-linux/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/coregrind/amd64-linux/Makefile.am 2005-05-15 18:51:47 UTC (rev =
3725)
+++ trunk/coregrind/amd64-linux/Makefile.am 2005-05-15 20:52:04 UTC (rev =
3726)
@@ -11,8 +11,7 @@
=20
=20
libplatform_a_SOURCES =3D \
- core_platform.c \
- ldt.c
+ core_platform.c
=20
if USE_PIE
libplatform_a_CFLAGS =3D $(AM_CFLAGS) -fpie
Modified: trunk/coregrind/amd64-linux/core_platform.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/amd64-linux/core_platform.h 2005-05-15 18:51:47 UTC (=
rev 3725)
+++ trunk/coregrind/amd64-linux/core_platform.h 2005-05-15 20:52:04 UTC (=
rev 3726)
@@ -36,29 +36,6 @@
//#include "platform_arch.h" // platform-specific tool stuff
=20
/* ---------------------------------------------------------------------
- Exports of vg_ldt.c
- ------------------------------------------------------------------ */
-
-// XXX: eventually all these should be x86-private, and not visible to t=
he
-// core (except maybe do_useseg()?)
-
-#if 0
-/* Simulate the modify_ldt syscall. */
-extern Int VG_(sys_modify_ldt) ( ThreadId tid,
- Int func, void* ptr, UInt bytecount );
-
-/* Simulate the {get,set}_thread_area syscalls. */
-extern Int VG_(sys_set_thread_area) ( ThreadId tid,
- vki_modify_ldt_t* info );
-extern Int VG_(sys_get_thread_area) ( ThreadId tid,
- vki_modify_ldt_t* info );
-
-/* Called from generated code. Given a segment selector and a virtual
- address, return a linear address, and do limit checks too. */
-extern Addr VG_(do_useseg) ( UInt seg_selector, Addr virtual_addr );
-#endif
-
-/* ---------------------------------------------------------------------
ucontext stuff
------------------------------------------------------------------ */
=20
Deleted: trunk/coregrind/amd64-linux/ldt.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/amd64-linux/ldt.c 2005-05-15 18:51:47 UTC (rev 3725)
+++ trunk/coregrind/amd64-linux/ldt.c 2005-05-15 20:52:04 UTC (rev 3726)
@@ -1,495 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Simulation of Local Descriptor Tables amd64-linux/ldt.c ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Julian Seward=20
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-// XXX: this is copied straight from the x86 code... perhaps they should=
be
-// shared. (Are AMD64 LDTs the same as x86 LDTs? Don't know. --njn)
-
-/* Details of the LDT simulation
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- =20
- When a program runs natively, the linux kernel allows each *thread*
- in it to have its own LDT. Almost all programs never do this --
- it's wildly unportable, after all -- and so the kernel never
- allocates the structure, which is just as well as an LDT occupies
- 64k of memory (8192 entries of size 8 bytes).
-
- A thread may choose to modify its LDT entries, by doing the
- __NR_modify_ldt syscall. In such a situation the kernel will then
- allocate an LDT structure for it. Each LDT entry is basically a
- (base, limit) pair. A virtual address in a specific segment is
- translated to a linear address by adding the segment's base value.
- In addition, the virtual address must not exceed the limit value.
-
- To use an LDT entry, a thread loads one of the segment registers
- (%cs, %ss, %ds, %es, %fs, %gs) with the index of the LDT entry (0
- .. 8191) it wants to use. In fact, the required value is (index <<
- 3) + 7, but that's not important right now. Any normal instruction
- which includes an addressing mode can then be made relative to that
- LDT entry by prefixing the insn with a so-called segment-override
- prefix, a byte which indicates which of the 6 segment registers
- holds the LDT index.
-
- Now, a key constraint is that valgrind's address checks operate in
- terms of linear addresses. So we have to explicitly translate
- virtual addrs into linear addrs, and that means doing a complete
- LDT simulation.
-
- Calls to modify_ldt are intercepted. For each thread, we maintain
- an LDT (with the same normally-never-allocated optimisation that
- the kernel does). This is updated as expected via calls to
- modify_ldt.
-
- When a thread does an amode calculation involving a segment
- override prefix, the relevant LDT entry for the thread is
- consulted. It all works.
-
- There is a conceptual problem, which appears when switching back to
- native execution, either temporarily to pass syscalls to the
- kernel, or permanently, when debugging V. Problem at such points
- is that it's pretty pointless to copy the simulated machine's
- segment registers to the real machine, because we'd also need to
- copy the simulated LDT into the real one, and that's prohibitively
- expensive.
-
- Fortunately it looks like no syscalls rely on the segment regs or
- LDT being correct, so we can get away with it. Apart from that the
- simulation is pretty straightforward. All 6 segment registers are
- tracked, although only %ds, %es, %fs and %gs are allowed as
- prefixes. Perhaps it could be restricted even more than that -- I
- am not sure what is and isn't allowed in user-mode.
-*/
-
-#include "core.h"
-
-#if 0
-/* Maximum number of LDT entries supported (by the x86). */
-#define VG_M_LDT_ENTRIES 8192
-/* The size of each LDT entry =3D=3D sizeof(VgLdtEntry) */
-#define VG_LDT_ENTRY_SIZE 8
-
-/* Allocate and deallocate LDTs for threads. */
-
-/* Create an LDT. If the parent_ldt is NULL, zero out the
- new one. If non-NULL, copy the parent. */
-VgLdtEntry* VG_(allocate_LDT_for_thread) ( VgLdtEntry* parent_ldt )
-{
- UInt nbytes, i;
- VgLdtEntry* ldt;
-
- if (0)
- VG_(printf)("allocate_LDT_for_thread: parent =3D %p\n", parent_ldt=
);
- vg_assert(VG_LDT_ENTRY_SIZE =3D=3D sizeof(VgLdtEntry));
- nbytes =3D VG_M_LDT_ENTRIES * VG_LDT_ENTRY_SIZE;
-=20
- if (parent_ldt =3D=3D NULL) {
- /* Allocate a new zeroed-out one. */
- ldt =3D (VgLdtEntry*)VG_(arena_calloc)(VG_AR_CORE, nbytes, 1);
- } else {
- ldt =3D (VgLdtEntry*)VG_(arena_malloc)(VG_AR_CORE, nbytes);
- for (i =3D 0; i < VG_M_LDT_ENTRIES; i++)
- ldt[i] =3D parent_ldt[i];
- }
-
- return ldt;
-}
-
-/* Free an LDT created by the above function. */
-void VG_(deallocate_LDT_for_thread) ( VgLdtEntry* ldt )
-{
- if (0)
- VG_(printf)("deallocate_LDT_for_thread: ldt =3D %p\n", ldt );
- if (ldt !=3D NULL)
- VG_(arena_free)(VG_AR_CORE, ldt);
-}
-
-
-/* Clear a TLS array. */
-void VG_(clear_TLS_for_thread) ( VgLdtEntry* tls )
-{
- VgLdtEntry* tlsp;
-
- if (0)
- VG_(printf)("clear_TLS_for_thread\n" );
-
- for (tlsp =3D tls; tlsp < tls + VKI_GDT_ENTRY_TLS_ENTRIES; tlsp++) {
- tlsp->LdtEnt.Words.word1 =3D 0;
- tlsp->LdtEnt.Words.word2 =3D 0;
- }
-
- return;
-}
-
-
-/* Fish the base field out of an VgLdtEntry. This is the only part we
- are particularly interested in. */
-
-static=20
-void *wine_ldt_get_base( const VgLdtEntry *ent )
-{
- return (void *)(ent->LdtEnt.Bits.BaseLow |
- ((unsigned long)ent->LdtEnt.Bits.BaseMid) << 16 |
- ((unsigned long)ent->LdtEnt.Bits.BaseHi) << 24);
-}
-
-static=20
-unsigned int wine_ldt_get_limit( const VgLdtEntry *ent )
-{
- unsigned int limit =3D ent->LdtEnt.Bits.LimitLow=20
- | (ent->LdtEnt.Bits.LimitHi << 16);
- if (ent->LdtEnt.Bits.Granularity) limit =3D (limit << 12) | 0xfff;
- return limit;
-}
-
-
-#if 0
-/* Actually _DO_ the segment translation. This is the whole entire
- point of this accursed, overcomplicated, baroque, pointless
- segment-override-and-LDT/GDT garbage foisted upon us all by Intel,
- in its infinite wisdom.=20
-
- THIS IS CALLED FROM GENERATED CODE (AND SO RUNS ON REAL CPU).=20
-*/
-Addr VG_(do_useseg) ( UInt seg_selector, Addr virtual_addr )
-{
- UInt table;
- Addr base;
- UInt limit;
-
- if (0)=20
- VG_(printf)("do_useseg: seg_selector =3D %p, vaddr =3D %p\n",=20
- seg_selector, virtual_addr);
-
- seg_selector &=3D 0x0000FFFF;
- =20
- /* Sanity check the segment selector. Ensure that RPL=3D11b (least
- privilege). This forms the bottom 2 bits of the selector. */
- if ((seg_selector & 3) !=3D 3) {
- VG_(synth_fault)(VG_(get_current_tid)());
- return 0;
- }
-
- /* Extract the table number */
- table =3D (seg_selector & 4) >> 2;
-
- /* Convert the segment selector onto a table index */
- seg_selector >>=3D 3;
-
- if (table =3D=3D 0) {
- VgLdtEntry* the_tls;
-
- vg_assert(seg_selector >=3D VKI_GDT_ENTRY_TLS_MIN && seg_selector =
<=3D VKI_GDT_ENTRY_TLS_MAX);
-
- /* Come up with a suitable GDT entry. We look at the thread's TLS
- array, which is pointed to by a VG_(baseBlock) entry. */
- the_tls =3D (VgLdtEntry*)VG_(baseBlock)[VGOFF_(tls_ptr)];
- base =3D (Addr)wine_ldt_get_base ( &the_tls[seg_selector-VKI_GDT_E=
NTRY_TLS_MIN] );
- limit =3D (UInt)wine_ldt_get_limit ( &the_tls[seg_selector-VKI_GDT=
_ENTRY_TLS_MIN] );
- } else {
- VgLdtEntry* the_ldt;
-
- vg_assert(seg_selector >=3D 0 && seg_selector < 8192);
-
- /* Come up with a suitable LDT entry. We look at the thread's LDT=
,
- which is pointed to by a VG_(baseBlock) entry. If null, we will
- use an implied zero-entry -- although this usually implies the
- program is in deep trouble, since it is using LDT entries which
- it probably hasn't set up. */
- the_ldt =3D (VgLdtEntry*)VG_(baseBlock)[VGOFF_(ldt)];
- if (the_ldt =3D=3D NULL) {
- base =3D 0;
- limit =3D 0;
- VG_(message)(
- Vg_UserMsg,
- "Warning: segment-override prefix encountered, but thread has no LD=
T"
- );
- } else {
- base =3D (Addr)wine_ldt_get_base ( &the_ldt[seg_selector] );
- limit =3D (UInt)wine_ldt_get_limit ( &the_ldt[seg_selector] );
- }
- }
-
- /* Note, this check is just slightly too slack. Really it should
- be "if (virtual_addr + size - 1 >=3D limit)," but we don't have the
- size info to hand. Getting it could be significantly complex. */
- if (virtual_addr >=3D limit) {
- VG_(message)(
- Vg_UserMsg,
- "Warning: segment access: virtual addr %d exceeds segment limit=
of %d",
- virtual_addr, limit
- );
- }
-
- if (0)=20
- VG_(printf)("do_useseg: base =3D %p, addr =3D %p\n",=20
- base, base + virtual_addr);
-
- return base + virtual_addr;
-}
-#endif
-
-/* Translate a struct modify_ldt_ldt_s to an VgLdtEntry, using the
- Linux kernel's logic (cut-n-paste of code in linux/kernel/ldt.c). */
-
-static
-void translate_to_hw_format ( /* IN */ vki_modify_ldt_t* inn,
- /* OUT */ VgLdtEntry* out,
- Int oldmode )
-{
- UInt entry_1, entry_2;
-
- if (0)
- VG_(printf)("translate_to_hw_format: base %p, limit %d\n",=20
- inn->base_addr, inn->limit );
-
- /* Allow LDTs to be cleared by the user. */
- if (inn->base_addr =3D=3D 0 && inn->limit =3D=3D 0) {
- if (oldmode ||
- (inn->contents =3D=3D 0 &&
- inn->read_exec_only =3D=3D 1 &&
- inn->seg_32bit =3D=3D 0 &&
- inn->limit_in_pages =3D=3D 0 &&
- inn->seg_not_present =3D=3D 1 &&
- inn->useable =3D=3D 0 )) {
- entry_1 =3D 0;
- entry_2 =3D 0;
- goto install;
- }
- }
-
- entry_1 =3D ((inn->base_addr & 0x0000ffff) << 16) |
- (inn->limit & 0x0ffff);
- entry_2 =3D (inn->base_addr & 0xff000000) |
- ((inn->base_addr & 0x00ff0000) >> 16) |
- (inn->limit & 0xf0000) |
- ((inn->read_exec_only ^ 1) << 9) |
- (inn->contents << 10) |
- ((inn->seg_not_present ^ 1) << 15) |
- (inn->seg_32bit << 22) |
- (inn->limit_in_pages << 23) |
- 0x7000;
- if (!oldmode)
- entry_2 |=3D (inn->useable << 20);
-
- /* Install the new entry ... */
- install:
- out->LdtEnt.Words.word1 =3D entry_1;
- out->LdtEnt.Words.word2 =3D entry_2;
-}
-
-
-/*
- * linux/kernel/ldt.c
- *
- * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
- * Copyright (C) 1999 Ingo Molnar <mi...@re...>
- */
-
-/*
- * read_ldt() is not really atomic - this is not a problem since
- * synchronization of reads and writes done to the LDT has to be
- * assured by user-space anyway. Writes are atomic, to protect
- * the security checks done on new descriptors.
- */
-static
-Int read_ldt ( ThreadId tid, UChar* ptr, UInt bytecount )
-{
- Int err;
- UInt i, size;
- Char* ldt;
-
- if (0)
- VG_(printf)("read_ldt: tid =3D %d, ptr =3D %p, bytecount =3D %d\n"=
,
- tid, ptr, bytecount );
-
- ldt =3D (Char*)(VG_(threads)[tid].arch.ldt);
- err =3D 0;
- if (ldt =3D=3D NULL)
- /* LDT not allocated, meaning all entries are null */
- goto out;
-
- size =3D VG_M_LDT_ENTRIES * VG_LDT_ENTRY_SIZE;
- if (size > bytecount)
- size =3D bytecount;
-
- err =3D size;
- for (i =3D 0; i < size; i++)
- ptr[i] =3D ldt[i];
-
- out:
- return err;
-}
-
-
-static
-Int write_ldt ( ThreadId tid, void* ptr, UInt bytecount, Int oldmode )
-{
- Int error;
- VgLdtEntry* ldt;
- vki_modify_ldt_t* ldt_info;=20
-
- if (0)
- VG_(printf)("write_ldt: tid =3D %d, ptr =3D %p, "
- "bytecount =3D %d, oldmode =3D %d\n",
- tid, ptr, bytecount, oldmode );
-
- ldt =3D VG_(threads)[tid].arch.ldt;
- ldt_info =3D (vki_modify_ldt_t*)ptr;
-
- error =3D -VKI_EINVAL;
- if (bytecount !=3D sizeof(vki_modify_ldt_t))
- goto out;
-
- error =3D -VKI_EINVAL;
- if (ldt_info->entry_number >=3D VG_M_LDT_ENTRIES)
- goto out;
- if (ldt_info->contents =3D=3D 3) {
- if (oldmode)
- goto out;
- if (ldt_info->seg_not_present =3D=3D 0)
- goto out;
- }
-
- /* If this thread doesn't have an LDT, we'd better allocate it
- now. */
- if (ldt =3D=3D NULL) {
- ldt =3D VG_(allocate_LDT_for_thread)( NULL );
- VG_(threads)[tid].arch.ldt =3D ldt;
- }
-
- /* Install the new entry ... */
- translate_to_hw_format ( ldt_info, &ldt[ldt_info->entry_number], oldm=
ode );
- error =3D 0;
-
- out:
- return error;
-}
-
-
-Int VG_(sys_modify_ldt) ( ThreadId tid,
- Int func, void* ptr, UInt bytecount )
-{
- Int ret =3D -VKI_ENOSYS;
-
- switch (func) {
- case 0:
- ret =3D read_ldt(tid, ptr, bytecount);
- break;
- case 1:
- ret =3D write_ldt(tid, ptr, bytecount, 1);
- break;
- case 2:
- VG_(unimplemented)("sys_modify_ldt: func =3D=3D 2");
- /* god knows what this is about */
- /* ret =3D read_default_ldt(ptr, bytecount); */
- /*UNREACHED*/
- break;
- case 0x11:
- ret =3D write_ldt(tid, ptr, bytecount, 0);
- break;
- }
- return ret;
-}
-
-
-Int VG_(sys_set_thread_area) ( ThreadId tid,
- vki_modify_ldt_t* info )
-{
- Int idx;
-
- if (info =3D=3D NULL)
- return -VKI_EFAULT;
-
- idx =3D info->entry_number;
-
- if (idx =3D=3D -1) {
- for (idx =3D 0; idx < VKI_GDT_ENTRY_TLS_ENTRIES; idx++) {
- VgLdtEntry* tls =3D VG_(threads)[tid].arch.tls + idx;
-
- if (tls->LdtEnt.Words.word1 =3D=3D 0 && tls->LdtEnt.Words.word2=
=3D=3D 0)
- break;
- }
-
- if (idx =3D=3D VKI_GDT_ENTRY_TLS_ENTRIES)
- return -VKI_ESRCH;
- } else if (idx < VKI_GDT_ENTRY_TLS_MIN || idx > VKI_GDT_ENTRY_TLS_MAX=
) {
- return -VKI_EINVAL;
- } else {
- idx =3D info->entry_number - VKI_GDT_ENTRY_TLS_MIN;
- }
-
- translate_to_hw_format(info, VG_(threads)[tid].arch.tls + idx, 0);
-
- VG_TRACK( pre_mem_write, Vg_CoreSysCall, tid,
- "set_thread_area(info->entry)",
- (Addr) & info->entry_number, sizeof(unsigned int) );
- info->entry_number =3D idx + VKI_GDT_ENTRY_TLS_MIN;
- VG_TRACK( post_mem_write, Vg_CoreSysCall, tid,
- (Addr) & info->entry_number, sizeof(unsigned int) );
-
- return 0;
-}
-
-
-Int VG_(sys_get_thread_area) ( ThreadId tid,
- vki_modify_ldt_t* info )
-{
- Int idx;
- VgLdtEntry* tls;
-
- if (info =3D=3D NULL)
- return -VKI_EFAULT;
-
- idx =3D info->entry_number;
-
- if (idx < VKI_GDT_ENTRY_TLS_MIN || idx > VKI_GDT_ENTRY_TLS_MAX)
- return -VKI_EINVAL;
-
- tls =3D VG_(threads)[tid].arch.tls + idx - VKI_GDT_ENTRY_TLS_MIN;
-
- info->base_addr =3D ( tls->LdtEnt.Bits.BaseHi << 24 ) |
- ( tls->LdtEnt.Bits.BaseMid << 16 ) |
- tls->LdtEnt.Bits.BaseLow;
- info->limit =3D ( tls->LdtEnt.Bits.LimitHi << 16 ) |
- tls->LdtEnt.Bits.LimitLow;
- info->seg_32bit =3D tls->LdtEnt.Bits.Default_Big;
- info->contents =3D ( tls->LdtEnt.Bits.Type >> 2 ) & 0x3;
- info->read_exec_only =3D ( tls->LdtEnt.Bits.Type & 0x1 ) ^ 0x1;
- info->limit_in_pages =3D tls->LdtEnt.Bits.Granularity;
- info->seg_not_present =3D tls->LdtEnt.Bits.Pres ^ 0x1;
- info->useable =3D tls->LdtEnt.Bits.Sys;
- info->reserved =3D 0;
-
- return 0;
-}
-#endif
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/core.h 2005-05-15 18:51:47 UTC (rev 3725)
+++ trunk/coregrind/core.h 2005-05-15 20:52:04 UTC (rev 3726)
@@ -805,10 +805,6 @@
Addr esp_at_startup,
/*MOD*/ ThreadArchState* arch );
=20
-// Thread stuff
-extern void VGA_(cleanup_thread) ( ThreadArchState* );
-extern void VGA_(setup_child) ( ThreadArchState*, ThreadArchState* );
-
// OS/Platform-specific thread clear (after thread exit)
extern void VGA_(os_state_clear)(ThreadState *);
=20
Modified: trunk/coregrind/m_syscalls/syscalls-amd64-linux.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_syscalls/syscalls-amd64-linux.c 2005-05-15 18:51:47=
UTC (rev 3725)
+++ trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-05-15 20:52:04=
UTC (rev 3726)
@@ -45,7 +45,7 @@
=20
=20
/* ---------------------------------------------------------------------
- Stacks, thread wrappers, clone
+ Stacks, thread wrappers
Note. Why is this stuff here?
------------------------------------------------------------------ */
=20
@@ -107,7 +107,7 @@
get called multiple times.
*/
/* NB: this is identical to the x86 version */
-void VGA_(interrupted_syscall)(ThreadId tid,=20
+void VGP_(interrupted_syscall)(ThreadId tid,=20
struct vki_ucontext *uc,
Bool restart)
{
@@ -301,9 +301,14 @@
VG_(core_panic)("Thread exit failed?\n");
}
=20
-/*=20
+/* ---------------------------------------------------------------------
clone() handling
+ ------------------------------------------------------------------ */
=20
+// forward declaration
+static void setup_child ( ThreadArchState*, ThreadArchState* );
+
+/*=20
When a client clones, we need to keep track of the new thread. This =
means:
1. allocate a ThreadId+ThreadState+stack for the the thread
=20
@@ -348,7 +353,7 @@
If the clone call specifies a NULL rsp for the new thread, then
it actually gets a copy of the parent's rsp.
*/
- VGA_(setup_child)( &ctst->arch, &ptst->arch );
+ setup_child( &ctst->arch, &ptst->arch );
=20
VGP_SET_SYSCALL_RESULT(ctst->arch, 0);
if (rsp !=3D 0)
@@ -401,7 +406,7 @@
=20
if (ret < 0) {
/* clone failed */
- VGA_(cleanup_thread)(&ctst->arch);
+ VGP_(cleanup_thread)(&ctst->arch);
ctst->status =3D VgTs_Empty;
}
=20
@@ -451,6 +456,22 @@
}
=20
/* ---------------------------------------------------------------------
+ More thread stuff
+ ------------------------------------------------------------------ */
+
+void VGP_(cleanup_thread) ( ThreadArchState *arch )
+{ =20
+} =20
+
+void setup_child ( /*OUT*/ ThreadArchState *child,=20
+ /*IN*/ ThreadArchState *parent )
+{ =20
+ /* We inherit our parent's guest state. */
+ child->vex =3D parent->vex;
+ child->vex_shadow =3D parent->vex_shadow;
+} =20
+
+/* ---------------------------------------------------------------------
PRE/POST wrappers for AMD64/Linux-specific syscalls
------------------------------------------------------------------ */
=20
Modified: trunk/coregrind/m_syscalls/syscalls-x86-linux.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_syscalls/syscalls-x86-linux.c 2005-05-15 18:51:47 U=
TC (rev 3725)
+++ trunk/coregrind/m_syscalls/syscalls-x86-linux.c 2005-05-15 20:52:04 U=
TC (rev 3726)
@@ -43,7 +43,7 @@
=20
=20
/* ---------------------------------------------------------------------
- Stacks, thread wrappers, clone
+ Stacks, thread wrappers
Note. Why is this stuff here?
------------------------------------------------------------------ */
=20
@@ -105,7 +105,7 @@
get called multiple times.
*/
/* NB: this is identical to the amd64 version */
-void VGA_(interrupted_syscall)(ThreadId tid,=20
+void VGP_(interrupted_syscall)(ThreadId tid,=20
struct vki_ucontext *uc,
Bool restart)
{
@@ -299,9 +299,15 @@
VG_(core_panic)("Thread exit failed?\n");
}
=20
-/*=20
+/* ---------------------------------------------------------------------
clone() handling
+ ------------------------------------------------------------------ */
=20
+// forward declarations
+static void setup_child ( ThreadArchState*, ThreadArchState* );
+static Int sys_set_thread_area ( ThreadId, vki_modify_ldt_t* );
+
+/*=20
When a client clones, we need to keep track of the new thread. This =
means:
1. allocate a ThreadId+ThreadState+stack for the the thread
=20
@@ -346,7 +352,7 @@
If the clone call specifies a NULL esp for the new thread, then
it actually gets a copy of the parent's esp.
*/
- VGA_(setup_child)( &ctst->arch, &ptst->arch );
+ setup_child( &ctst->arch, &ptst->arch );
=20
VGP_SET_SYSCALL_RESULT(ctst->arch, 0);
if (esp !=3D 0)
@@ -386,7 +392,7 @@
tlsinfo, tlsinfo->entry_number, tlsinfo->base_addr, tlsinfo->limi=
t,
ptst->arch.vex.guest_ESP,
ctst->arch.vex.guest_FS, ctst->arch.vex.guest_GS);
- ret =3D VG_(sys_set_thread_area)(ctid, tlsinfo);
+ ret =3D sys_set_thread_area(ctid, tlsinfo);
=20
if (ret !=3D 0)
goto out;
@@ -406,7 +412,7 @@
out:
if (ret < 0) {
/* clone failed */
- VGA_(cleanup_thread)(&ctst->arch);
+ VGP_(cleanup_thread)(&ctst->arch);
ctst->status =3D VgTs_Empty;
}
=20
@@ -456,6 +462,411 @@
}
=20
/* ---------------------------------------------------------------------
+ LDT/GDT simulation
+ ------------------------------------------------------------------ */
+
+/* Details of the LDT simulation
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ =20
+ When a program runs natively, the linux kernel allows each *thread*
+ in it to have its own LDT. Almost all programs never do this --
+ it's wildly unportable, after all -- and so the kernel never
+ allocates the structure, which is just as well as an LDT occupies
+ 64k of memory (8192 entries of size 8 bytes).
+
+ A thread may choose to modify its LDT entries, by doing the
+ __NR_modify_ldt syscall. In such a situation the kernel will then
+ allocate an LDT structure for it. Each LDT entry is basically a
+ (base, limit) pair. A virtual address in a specific segment is
+ translated to a linear address by adding the segment's base value.
+ In addition, the virtual address must not exceed the limit value.
+
+ To use an LDT entry, a thread loads one of the segment registers
+ (%cs, %ss, %ds, %es, %fs, %gs) with the index of the LDT entry (0
+ .. 8191) it wants to use. In fact, the required value is (index <<
+ 3) + 7, but that's not important right now. Any normal instruction
+ which includes an addressing mode can then be made relative to that
+ LDT entry by prefixing the insn with a so-called segment-override
+ prefix, a byte which indicates which of the 6 segment registers
+ holds the LDT index.
+
+ Now, a key constraint is that valgrind's address checks operate in
+ terms of linear addresses. So we have to explicitly translate
+ virtual addrs into linear addrs, and that means doing a complete
+ LDT simulation.
+
+ Calls to modify_ldt are intercepted. For each thread, we maintain
+ an LDT (with the same normally-never-allocated optimisation that
+ the kernel does). This is updated as expected via calls to
+ modify_ldt.
+
+ When a thread does an amode calculation involving a segment
+ override prefix, the relevant LDT entry for the thread is
+ consulted. It all works.
+
+ There is a conceptual problem, which appears when switching back to
+ native execution, either temporarily to pass syscalls to the
+ kernel, or permanently, when debugging V. Problem at such points
+ is that it's pretty pointless to copy the simulated machine's
+ segment registers to the real machine, because we'd also need to
+ copy the simulated LDT into the real one, and that's prohibitively
+ expensive.
+
+ Fortunately it looks like no syscalls rely on the segment regs or
+ LDT being correct, so we can get away with it. Apart from that the
+ simulation is pretty straightforward. All 6 segment registers are
+ tracked, although only %ds, %es, %fs and %gs are allowed as
+ prefixes. Perhaps it could be restricted even more than that -- I
+ am not sure what is and isn't allowed in user-mode.
+*/
+
+/* Translate a struct modify_ldt_ldt_s to a VexGuestX86SegDescr, using
+ the Linux kernel's logic (cut-n-paste of code in
+ linux/kernel/ldt.c). */
+
+static
+void translate_to_hw_format ( /* IN */ vki_modify_ldt_t* inn,
+ /* OUT */ VexGuestX86SegDescr* out,
+ Int oldmode )
+{
+ UInt entry_1, entry_2;
+ vg_assert(8 =3D=3D sizeof(VexGuestX86SegDescr));
+
+ if (0)
+ VG_(printf)("translate_to_hw_format: base %p, limit %d\n",=20
+ inn->base_addr, inn->limit );
+
+ /* Allow LDTs to be cleared by the user. */
+ if (inn->base_addr =3D=3D 0 && inn->limit =3D=3D 0) {
+ if (oldmode ||
+ (inn->contents =3D=3D 0 &&
+ inn->read_exec_only =3D=3D 1 &&
+ inn->seg_32bit =3D=3D 0 &&
+ inn->limit_in_pages =3D=3D 0 &&
+ inn->seg_not_present =3D=3D 1 &&
+ inn->useable =3D=3D 0 )) {
+ entry_1 =3D 0;
+ entry_2 =3D 0;
+ goto install;
+ }
+ }
+
+ entry_1 =3D ((inn->base_addr & 0x0000ffff) << 16) |
+ (inn->limit & 0x0ffff);
+ entry_2 =3D (inn->base_addr & 0xff000000) |
+ ((inn->base_addr & 0x00ff0000) >> 16) |
+ (inn->limit & 0xf0000) |
+ ((inn->read_exec_only ^ 1) << 9) |
+ (inn->contents << 10) |
+ ((inn->seg_not_present ^ 1) << 15) |
+ (inn->seg_32bit << 22) |
+ (inn->limit_in_pages << 23) |
+ 0x7000;
+ if (!oldmode)
+ entry_2 |=3D (inn->useable << 20);
+
+ /* Install the new entry ... */
+ install:
+ out->LdtEnt.Words.word1 =3D entry_1;
+ out->LdtEnt.Words.word2 =3D entry_2;
+}
+
+/* Create a zeroed-out GDT. */
+static VexGuestX86SegDescr* alloc_zeroed_x86_GDT ( void )
+{
+ Int nbytes =3D VEX_GUEST_X86_GDT_NENT * sizeof(VexGuestX86SegDescr);
+ return VG_(arena_calloc)(VG_AR_CORE, nbytes, 1);
+}
+
+/* Create a zeroed-out LDT. */
+static VexGuestX86SegDescr* alloc_zeroed_x86_LDT ( void )
+{
+ Int nbytes =3D VEX_GUEST_X86_LDT_NENT * sizeof(VexGuestX86SegDescr);
+ return VG_(arena_calloc)(VG_AR_CORE, nbytes, 1);
+}
+
+/* Free up an LDT or GDT allocated by the above fns. */
+static void free_LDT_or_GDT ( VexGuestX86SegDescr* dt )
+{
+ vg_assert(dt);
+ VG_(arena_free)(VG_AR_CORE, (void*)dt);
+}
+
+/* Copy contents between two existing LDTs. */
+static void copy_LDT_from_to ( VexGuestX86SegDescr* src,
+ VexGuestX86SegDescr* dst )
+{
+ Int i;
+ vg_assert(src);
+ vg_assert(dst);
+ for (i =3D 0; i < VEX_GUEST_X86_LDT_NENT; i++)
+ dst[i] =3D src[i];
+}
+
+/* Free this thread's DTs, if it has any. */
+static void deallocate_LGDTs_for_thread ( VexGuestX86State* vex )
+{
+ vg_assert(sizeof(HWord) =3D=3D sizeof(void*));
+
+ if (0)
+ VG_(printf)("deallocate_LGDTs_for_thread: "
+ "ldt =3D 0x%x, gdt =3D 0x%x\n",=20
+ vex->guest_LDT, vex->guest_GDT );
+
+ if (vex->guest_LDT !=3D (HWord)NULL) {
+ free_LDT_or_GDT( (VexGuestX86SegDescr*)vex->guest_LDT );
+ vex->guest_LDT =3D (HWord)NULL;
+ }
+
+ if (vex->guest_GDT !=3D (HWord)NULL) {
+ free_LDT_or_GDT( (VexGuestX86SegDescr*)vex->guest_GDT );
+ vex->guest_GDT =3D (HWord)NULL;
+ }
+}
+
+
+/*
+ * linux/kernel/ldt.c
+ *
+ * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
+ * Copyright (C) 1999 Ingo Molnar <mi...@re...>
+ */
+
+/*
+ * read_ldt() is not really atomic - this is not a problem since
+ * synchronization of reads and writes done to the LDT has to be
+ * assured by user-space anyway. Writes are atomic, to protect
+ * the security checks done on new descriptors.
+ */
+static
+Int read_ldt ( ThreadId tid, UChar* ptr, UInt bytecount )
+{
+ Int err;
+ UInt i, size;
+ UChar* ldt;
+
+ if (0)
+ VG_(printf)("read_ldt: tid =3D %d, ptr =3D %p, bytecount =3D %d\n"=
,
+ tid, ptr, bytecount );
+
+ vg_assert(sizeof(HWord) =3D=3D sizeof(VexGuestX86SegDescr*));
+ vg_assert(8 =3D=3D sizeof(VexGuestX86SegDescr));
+
+ ldt =3D (Char*)(VG_(threads)[tid].arch.vex.guest_LDT);
+ err =3D 0;
+ if (ldt =3D=3D NULL)
+ /* LDT not allocated, meaning all entries are null */
+ goto out;
+
+ size =3D VEX_GUEST_X86_LDT_NENT * sizeof(VexGuestX86SegDescr);
+ if (size > bytecount)
+ size =3D bytecount;
+
+ err =3D size;
+ for (i =3D 0; i < size; i++)
+ ptr[i] =3D ldt[i];
+
+ out:
+ return err;
+}
+
+
+static
+Int write_ldt ( ThreadId tid, void* ptr, UInt bytecount, Int oldmode )
+{
+ Int error;
+ VexGuestX86SegDescr* ldt;
+ vki_modify_ldt_t* ldt_info;=20
+
+ if (0)
+ VG_(printf)("write_ldt: tid =3D %d, ptr =3D %p, "
+ "bytecount =3D %d, oldmode =3D %d\n",
+ tid, ptr, bytecount, oldmode );
+
+ vg_assert(8 =3D=3D sizeof(VexGuestX86SegDescr));
+ vg_assert(sizeof(HWord) =3D=3D sizeof(VexGuestX86SegDescr*));
+
+ ldt =3D (VexGuestX86SegDescr*)VG_(threads)[tid].arch.vex.guest_L=
DT;
+ ldt_info =3D (vki_modify_ldt_t*)ptr;
+
+ error =3D -VKI_EINVAL;
+ if (bytecount !=3D sizeof(vki_modify_ldt_t))
+ goto out;
+
+ error =3D -VKI_EINVAL;
+ if (ldt_info->entry_number >=3D VEX_GUEST_X86_LDT_NENT)
+ goto out;
+ if (ldt_info->contents =3D=3D 3) {
+ if (oldmode)
+ goto out;
+ if (ldt_info->seg_not_present =3D=3D 0)
+ goto out;
+ }
+
+ /* If this thread doesn't have an LDT, we'd better allocate it
+ now. */
+ if (ldt =3D=3D (HWord)NULL) {
+ ldt =3D alloc_zeroed_x86_LDT();
+ VG_(threads)[tid].arch.vex.guest_LDT =3D (HWord)ldt;
+ }
+
+ /* Install the new entry ... */
+ translate_to_hw_format ( ldt_info, &ldt[ldt_info->entry_number], oldm=
ode );
+ error =3D 0;
+
+ out:
+ return error;
+}
+
+
+static Int sys_modify_ldt ( ThreadId tid,
+ Int func, void* ptr, UInt bytecount )
+{
+ Int ret =3D -VKI_ENOSYS;
+
+ switch (func) {
+ case 0:
+ ret =3D read_ldt(tid, ptr, bytecount);
+ break;
+ case 1:
+ ret =3D write_ldt(tid, ptr, bytecount, 1);
+ break;
+ case 2:
+ VG_(unimplemented)("sys_modify_ldt: func =3D=3D 2");
+ /* god knows what this is about */
+ /* ret =3D read_default_ldt(ptr, bytecount); */
+ /*UNREACHED*/
+ break;
+ case 0x11:
+ ret =3D write_ldt(tid, ptr, bytecount, 0);
+ break;
+ }
+ return ret;
+}
+
+
+static Int sys_set_thread_area ( ThreadId tid, vki_modify_ldt_t* info )
+{
+ Int idx;
+ VexGuestX86SegDescr* gdt;
+
+ vg_assert(8 =3D=3D sizeof(VexGuestX86SegDescr));
+ vg_assert(sizeof(HWord) =3D=3D sizeof(VexGuestX86SegDescr*));
+
+ if (info =3D=3D NULL)
+ return -VKI_EFAULT;
+
+ gdt =3D (VexGuestX86SegDescr*)VG_(threads)[tid].arch.vex.guest_GDT;
+
+ /* If the thread doesn't have a GDT, allocate it now. */
+ if (!gdt) {
+ gdt =3D alloc_zeroed_x86_GDT();
+ VG_(threads)[tid].arch.vex.guest_GDT =3D (HWord)gdt;
+ }
+
+ idx =3D info->entry_number;
+
+ if (idx =3D=3D -1) {
+ /* Find and use the first free entry. */
+ for (idx =3D 0; idx < VEX_GUEST_X86_GDT_NENT; idx++) {
+ if (gdt[idx].LdtEnt.Words.word1 =3D=3D 0=20
+ && gdt[idx].LdtEnt.Words.word2 =3D=3D 0)
+ break;
+ }
+
+ if (idx =3D=3D VEX_GUEST_X86_GDT_NENT)
+ return -VKI_ESRCH;
+ } else if (idx < 0 || idx >=3D VEX_GUEST_X86_GDT_NENT) {
+ return -VKI_EINVAL;
+ }
+
+ translate_to_hw_format(info, &gdt[idx], 0);
+
+ VG_TRACK( pre_mem_write, Vg_CoreSysCall, tid,
+ "set_thread_area(info->entry)",
+ (Addr) & info->entry_number, sizeof(unsigned int) );
+ info->entry_number =3D idx;
+ VG_TRACK( post_mem_write, Vg_CoreSysCall, tid,
+ (Addr) & info->entry_number, sizeof(unsigned int) );
+
+ return 0;
+}
+
+
+static Int sys_get_thread_area ( ThreadId tid, vki_modify_ldt_t* info )
+{
+ Int idx;
+ VexGuestX86SegDescr* gdt;
+
+ vg_assert(sizeof(HWord) =3D=3D sizeof(VexGuestX86SegDescr*));
+ vg_assert(8 =3D=3D sizeof(VexGuestX86SegDescr));
+
+ if (info =3D=3D NULL)
+ return -VKI_EFAULT;
+
+ idx =3D info->entry_number;
+
+ if (idx < 0 || idx >=3D VEX_GUEST_X86_GDT_NENT)
+ return -VKI_EINVAL;
+
+ gdt =3D (VexGuestX86SegDescr*)VG_(threads)[tid].arch.vex.guest_GDT;
+
+ /* If the thread doesn't have a GDT, allocate it now. */
+ if (!gdt) {
+ gdt =3D alloc_zeroed_x86_GDT();
+ VG_(threads)[tid].arch.vex.guest_GDT =3D (HWord)gdt;
+ }
+
+ info->base_addr =3D ( gdt[idx].LdtEnt.Bits.BaseHi << 24 ) |
+ ( gdt[idx].LdtEnt.Bits.BaseMid << 16 ) |
+ gdt[idx].LdtEnt.Bits.BaseLow;
+ info->limit =3D ( gdt[idx].LdtEnt.Bits.LimitHi << 16 ) |
+ gdt[idx].LdtEnt.Bits.LimitLow;
+ info->seg_32bit =3D gdt[idx].LdtEnt.Bits.Default_Big;
+ info->contents =3D ( gdt[idx].LdtEnt.Bits.Type >> 2 ) & 0x3;
+ info->read_exec_only =3D ( gdt[idx].LdtEnt.Bits.Type & 0x1 ) ^ 0x1;
+ info->limit_in_pages =3D gdt[idx].LdtEnt.Bits.Granularity;
+ info->seg_not_present =3D gdt[idx].LdtEnt.Bits.Pres ^ 0x1;
+ info->useable =3D gdt[idx].LdtEnt.Bits.Sys;
+ info->reserved =3D 0;
+
+ return 0;
+}
+
+/* ---------------------------------------------------------------------
+ More thread stuff
+ ------------------------------------------------------------------ */
+
+void VGP_(cleanup_thread) ( ThreadArchState* arch )
+{
+ /* Release arch-specific resources held by this thread. */
+ /* On x86, we have to dump the LDT and GDT. */
+ deallocate_LGDTs_for_thread( &arch->vex );
+} =20
+
+
+static void setup_child ( /*OUT*/ ThreadArchState *child,=20
+ /*IN*/ ThreadArchState *parent )
+{
+ /* We inherit our parent's guest state. */
+ child->vex =3D parent->vex;
+ child->vex_shadow =3D parent->vex_shadow;
+ /* We inherit our parent's LDT. */
+ if (parent->vex.guest_LDT =3D=3D (HWord)NULL) {
+ /* We hope this is the common case. */
+ child->vex.guest_LDT =3D (HWord)NULL;
+ } else {
+ /* No luck .. we have to take a copy of the parent's. */
+ child->vex.guest_LDT =3D (HWord)alloc_zeroed_x86_LDT();
+ copy_LDT_from_to( (VexGuestX86SegDescr*)parent->vex.guest_LDT,=20
+ (VexGuestX86SegDescr*)child->vex.guest_LDT );
+ }
+
+ /* We need an empty GDT. */
+ child->vex.guest_GDT =3D (HWord)NULL;
+} =20
+
+/* ---------------------------------------------------------------------
PRE/POST wrappers for x86/Linux-specific syscalls
------------------------------------------------------------------ */
=20
@@ -640,7 +1051,7 @@
PRE_MEM_READ( "modify_ldt(ptr)", ARG2, sizeof(vki_modify_ldt_t) );
}
/* "do" the syscall ourselves; the kernel never sees it */
- SET_RESULT( VG_(sys_modify_ldt)( tid, ARG1, (void*)ARG2, ARG3 ) );
+ SET_RESULT( sys_modify_ldt( tid, ARG1, (void*)ARG2, ARG3 ) );
=20
if (ARG1 =3D=3D 0 && !VG_(is_kerror)(RES) && RES > 0) {
POST_MEM_WRITE( ARG2, RES );
@@ -654,7 +1065,7 @@
PRE_MEM_READ( "set_thread_area(u_info)", ARG1, sizeof(vki_modify_ldt_=
t) );
=20
/* "do" the syscall ourselves; the kernel never sees it */
- SET_RESULT( VG_(sys_set_thread_area)( tid, (void *)ARG1 ) );
+ SET_RESULT( sys_set_thread_area( tid, (void *)ARG1 ) );
}
=20
PRE(sys_get_thread_area, Special)
@@ -664,7 +1075,7 @@
PRE_MEM_WRITE( "get_thread_area(u_info)", ARG1, sizeof(vki_modify_ldt=
_t) );
=20
/* "do" the syscall ourselves; the kernel never sees it */
- SET_RESULT( VG_(sys_get_thread_area)( tid, (void *)ARG1 ) );
+ SET_RESULT( sys_get_thread_area( tid, (void *)ARG1 ) );
=20
if (!VG_(is_kerror)(RES)) {
POST_MEM_WRITE( ARG1, sizeof(vki_modify_ldt_t) );
Modified: trunk/coregrind/pub_core_syscalls.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/pub_core_syscalls.h 2005-05-15 18:51:47 UTC (rev 3725=
)
+++ trunk/coregrind/pub_core_syscalls.h 2005-05-15 20:52:04 UTC (rev 3726=
)
@@ -47,10 +47,13 @@
// interrupted with a signal. Returns True if the syscall completed
// (either interrupted or finished normally), or False if it was
// restarted (or the signal didn't actually interrupt a syscall).
-extern void VGA_(interrupted_syscall)(ThreadId tid,
+extern void VGP_(interrupted_syscall)(ThreadId tid,
struct vki_ucontext *uc,
Bool restart);
=20
+// Release resources held by this thread
+extern void VGP_(cleanup_thread) ( ThreadArchState* );
+
extern Bool VG_(is_kerror) ( Word res );
=20
/* Internal atfork handlers */
Modified: trunk/coregrind/vg_scheduler.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/vg_scheduler.c 2005-05-15 18:51:47 UTC (rev 3725)
+++ trunk/coregrind/vg_scheduler.c 2005-05-15 20:52:04 UTC (rev 3726)
@@ -551,7 +551,7 @@
vki_sigset_t savedmask;
=20
vg_assert(tid >=3D 0 && tid < VG_N_THREADS);
- VGA_(cleanup_thread)(&VG_(threads)[tid].arch);
+ VGP_(cleanup_thread)(&VG_(threads)[tid].arch);
VG_(threads)[tid].tid =3D tid;
=20
/* Leave the thread in Zombie, so that it doesn't get reallocated
Modified: trunk/coregrind/vg_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/vg_signals.c 2005-05-15 18:51:47 UTC (rev 3725)
+++ trunk/coregrind/vg_signals.c 2005-05-15 20:52:04 UTC (rev 3726)
@@ -1651,7 +1651,7 @@
sigNo, tid, info->si_code);
=20
/* Update thread state properly */
- VGA_(interrupted_syscall)(tid, uc,=20
+ VGP_(interrupted_syscall)(tid, uc,=20
!!(scss.scss_per_sig[sigNo].scss_flags & VKI_SA_RESTART));
=20
/* Set up the thread's state to deliver a signal */
Modified: trunk/coregrind/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/coregrind/x86/Makefile.am 2005-05-15 18:51:47 UTC (rev 3725)
+++ trunk/coregrind/x86/Makefile.am 2005-05-15 20:52:04 UTC (rev 3726)
@@ -5,8 +5,7 @@
=20
noinst_HEADERS =3D \
core_arch.h \
- core_arch_asm.h \
- x86_private.h
+ core_arch_asm.h
=20
noinst_LIBRARIES =3D libarch.a
=20
Modified: trunk/coregrind/x86/state.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/x86/state.c 2005-05-15 18:51:47 UTC (rev 3725)
+++ trunk/coregrind/x86/state.c 2005-05-15 20:52:04 UTC (rev 3726)
@@ -30,7 +30,6 @@
=20
#include "core.h"
#include "pub_core_tooliface.h"
-#include "x86_private.h"
#include "vki_unistd.h"
#include <sys/ptrace.h>
=20
@@ -141,104 +140,10 @@
sizeof(VexGuestArchState));
}
=20
-
/*------------------------------------------------------------*/
-/*--- LDT/GDT stuff ---*/
-/*------------------------------------------------------------*/
-
-/* Create a zeroed-out GDT. */
-
-VexGuestX86SegDescr* VG_(alloc_zeroed_x86_GDT) ( void )
-{
- Int nbytes =3D VEX_GUEST_X86_GDT_NENT * sizeof(VexGuestX86SegDescr);
- return VG_(arena_calloc)(VG_AR_CORE, nbytes, 1);
-}
-
-/* Create a zeroed-out LDT. */
-
-VexGuestX86SegDescr* VG_(alloc_zeroed_x86_LDT) ( void )
-{
- Int nbytes =3D VEX_GUEST_X86_LDT_NENT * sizeof(VexGuestX86SegDescr);
- return VG_(arena_calloc)(VG_AR_CORE, nbytes, 1);
-}
-
-/* Free up an LDT or GDT allocated by the above fns. */
-
-static void free_LDT_or_GDT ( VexGuestX86SegDescr* dt )
-{
- vg_assert(dt);
- VG_(arena_free)(VG_AR_CORE, (void*)dt);
-}
-
-/* Copy contents between two existing LDTs. */
-
-static void copy_LDT_from_to ( VexGuestX86SegDescr* src,
- VexGuestX86SegDescr* dst )
-{
- Int i;
- vg_assert(src);
- vg_assert(dst);
- for (i =3D 0; i < VEX_GUEST_X86_LDT_NENT; i++)
- dst[i] =3D src[i];
-}
-
-/* Free this thread's DTs, if it has any. */
-
-static void deallocate_LGDTs_for_thread ( VexGuestX86State* vex )
-{
- vg_assert(sizeof(HWord) =3D=3D sizeof(void*));
-
- if (0)
- VG_(printf)("deallocate_LGDTs_for_thread: "
- "ldt =3D 0x%x, gdt =3D 0x%x\n",=20
- vex->guest_LDT, vex->guest_GDT );
-
- if (vex->guest_LDT !=3D (HWord)NULL) {
- free_LDT_or_GDT( (VexGuestX86SegDescr*)vex->guest_LDT );
- vex->guest_LDT =3D (HWord)NULL;
- }
-
- if (vex->guest_GDT !=3D (HWord)NULL) {
- free_LDT_or_GDT( (VexGuestX86SegDescr*)vex->guest_GDT );
- vex->guest_GDT =3D (HWord)NULL;
- }
-}
-
-
-/*------------------------------------------------------------*/
/*--- Thread stuff ---*/
/*------------------------------------------------------------*/
=20
-void VGA_(cleanup_thread) ( ThreadArchState* arch )
-{
- /* Release arch-specific resources held by this thread. */
- /* On x86, we have to dump the LDT and GDT. */
- deallocate_LGDTs_for_thread( &arch->vex );
-} =20
-
-
-void VGA_(setup_child) ( /*OUT*/ ThreadArchState *child,=20
- /*IN*/ ThreadArchState *parent )
-{
- /* We inherit our parent's guest state. */
- child->vex =3D parent->vex;
- child->vex_shadow =3D parent->vex_shadow;
- /* We inherit our parent's LDT. */
- if (parent->vex.guest_LDT =3D=3D (HWord)NULL) {
- /* We hope this is the common case. */
- child->vex.guest_LDT =3D (HWord)NULL;
- } else {
- /* No luck .. we have to take a copy of the parent's. */
- child->vex.guest_LDT =3D (HWord)VG_(alloc_zeroed_x86_LDT)();
- copy_LDT_from_to( (VexGuestX86SegDescr*)parent->vex.guest_LDT,=20
- (VexGuestX86SegDescr*)child->vex.guest_LDT );
- }
-
- /* We need an empty GDT. */
- child->vex.guest_GDT =3D (HWord)NULL;
-} =20
-
-
void VGA_(mark_from_registers)(ThreadId tid, void (*marker)(Addr))
{
ThreadState *tst =3D VG_(get_ThreadState)(tid);
Deleted: trunk/coregrind/x86/x86_private.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/x86/x86_private.h 2005-05-15 18:51:47 UTC (rev 3725)
+++ trunk/coregrind/x86/x86_private.h 2005-05-15 20:52:04 UTC (rev 3726)
@@ -1,52 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Private arch-specific header. x86/x86_private.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Nicholas Nethercote
- nj...@va...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#ifndef __X86_PRIVATE_H
-#define __X86_PRIVATE_H
-
-#include "core_arch_asm.h" // arch-specific asm stuff
-#include "tool_arch.h" // arch-specific tool stuff
-
-#include "libvex_guest_x86.h" // for VexGuestX86SegDescr
-
-/* ---------------------------------------------------------------------
- Exports of state.c that are not core-visible
- ------------------------------------------------------------------ */
-
-/* Create LDT/GDT arrays, as specified in libvex_guest_x86.h. */
-extern VexGuestX86SegDescr* VG_(alloc_zeroed_x86_GDT) ( void );
-extern VexGuestX86SegDescr* VG_(alloc_zeroed_x86_LDT) ( void );
-
-
-#endif // __X86_PRIVATE_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/x86-linux/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/coregrind/x86-linux/Makefile.am 2005-05-15 18:51:47 UTC (rev 37=
25)
+++ trunk/coregrind/x86-linux/Makefile.am 2005-05-15 20:52:04 UTC (rev 37=
26)
@@ -11,8 +11,7 @@
=20
=20
libplatform_a_SOURCES =3D \
- core_platform.c \
- ldt.c
+ core_platform.c
=20
if USE_PIE
libplatform_a_CFLAGS =3D $(AM_CFLAGS) -fpie
Modified: trunk/coregrind/x86-linux/core_platform.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/x86-linux/core_platform.h 2005-05-15 18:51:47 UTC (re=
v 3725)
+++ trunk/coregrind/x86-linux/core_platform.h 2005-05-15 20:52:04 UTC (re=
v 3726)
@@ -36,27 +36,6 @@
//#include "platform_arch.h" // platform-specific tool stuff
=20
/* ---------------------------------------------------------------------
- Exports of vg_ldt.c
- ------------------------------------------------------------------ */
-
-// XXX: eventually all these should be x86-private, and not visible to t=
he
-// core (except maybe do_useseg()?)
-
-/* Simulate the modify_ldt syscall. */
-extern Int VG_(sys_modify_ldt) ( ThreadId tid,
- Int func, void* ptr, UInt bytecount );
-
-/* Simulate the {get,set}_thread_area syscalls. */
-extern Int VG_(sys_set_thread_area) ( ThreadId tid,
- vki_modify_ldt_t* info );
-extern Int VG_(sys_get_thread_area) ( ThreadId tid,
- vki_modify_ldt_t* info );
-
-/* Called from generated code. Given a segment selector and a virtual
- address, return a linear address, and do limit checks too. */
-extern Addr VG_(do_useseg) ( UInt seg_selector, Addr virtual_addr );
-
-/* ---------------------------------------------------------------------
ucontext stuff
------------------------------------------------------------------ */
=20
Deleted: trunk/coregrind/x86-linux/ldt.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/x86-linux/ldt.c 2005-05-15 18:51:47 UTC (rev 3725)
+++ trunk/coregrind/x86-linux/ldt.c 2005-05-15 20:52:04 UTC (rev 3726)
@@ -1,357 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Simulation of Local Descriptor Tables x86-linux/ldt.c ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Julian Seward=20
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-/* Details of the LDT simulation
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- =20
- When a program runs natively, the linux kernel allows each *thread*
- in it to have its own LDT. Almost all programs never do this --
- it's wildly unportable, after all -- and so the kernel never
- allocates the structure, which is just as well as an LDT occupies
- 64k of memory (8192 entries of size 8 bytes).
-
- A thread may choose to modify its LDT entries, by doing the
- __NR_modify_ldt syscall. In such a situation the kernel will then
- allocate an LDT structure for it. Each LDT entry is basically a
- (base, limit) pair. A virtual address in a specific segment is
- translated to a linear address by adding the segment's base value.
- In addition, the virtual address must not exceed the limit value.
-
- To use an LDT entry, a thread loads one of the segment registers
- (%cs, %ss, %ds, %es, %fs, %gs) with the index of the LDT entry (0
- .. 8191) it wants to use. In fact, the required value is (index <<
- 3) + 7, but that's not important right now. Any normal instruction
- which includes an addressing mode can then be made relative to that
- LDT entry by prefixing the insn with a so-called segment-override
- prefix, a byte which indicates which of the 6 segment registers
- holds the LDT index.
-
- Now, a key constraint is that valgrind's address checks operate in
- terms of linear addresses. So we have to explicitly translate
- virtual addrs into linear addrs, and that means doing a complete
- LDT simulation.
-
- Calls to modify_ldt are intercepted. For each thread, we maintain
- an LDT (with the same normally-never-allocated optimisation that
- the kernel does). This is updated as expected via calls to
- modify_ldt.
-
- When a thread does an amode calculation involving a segment
- override prefix, the relevant LDT entry for the thread is
- consulted. It all works.
-
- There is a conceptual problem, which a...
[truncated message content] |
|
From: <sv...@va...> - 2005-05-15 18:51:50
|
Author: njn Date: 2005-05-15 19:51:47 +0100 (Sun, 15 May 2005) New Revision: 3725 Modified: trunk/coregrind/vg_dwarf.c Log: Cover the unknown-platform case. Modified: trunk/coregrind/vg_dwarf.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/vg_dwarf.c 2005-05-15 17:38:56 UTC (rev 3724) +++ trunk/coregrind/vg_dwarf.c 2005-05-15 18:51:47 UTC (rev 3725) @@ -918,13 +918,15 @@ /* --------------- Decls --------------- */ =20 #if defined(VGP_x86_linux) -#define FP_REG 5 -#define SP_REG 4 -#define RA_REG_DEFAULT 8 +# define FP_REG 5 +# define SP_REG 4 +# define RA_REG_DEFAULT 8 #elif defined(VGP_amd64_linux) -#define FP_REG 6 -#define SP_REG 7 -#define RA_REG_DEFAULT 16 +# define FP_REG 6 +# define SP_REG 7 +# define RA_REG_DEFAULT 16 +#else +# error Unknown platform #endif =20 /* the number of regs we are prepared to unwind */ |
|
From: <sv...@va...> - 2005-05-15 17:39:31
|
Author: njn
Date: 2005-05-15 18:38:56 +0100 (Sun, 15 May 2005)
New Revision: 3724
Modified:
trunk/coregrind/amd64/core_arch.h
trunk/coregrind/arm/core_arch.h
trunk/coregrind/x86/core_arch.h
Log:
Remove dead constant.
Modified: trunk/coregrind/amd64/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/amd64/core_arch.h 2005-05-15 17:28:26 UTC (rev 3723)
+++ trunk/coregrind/amd64/core_arch.h 2005-05-15 17:38:56 UTC (rev 3724)
@@ -105,9 +105,6 @@
Miscellaneous constants
------------------------------------------------------------------ */
=20
-// Valgrind's signal stack size, in words.
-#define VGA_SIGSTACK_SIZE_W 10000
-
// Valgrind's stack size, in words.
#define VGA_STACK_SIZE_W 16384
=20
Modified: trunk/coregrind/arm/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/arm/core_arch.h 2005-05-15 17:28:26 UTC (rev 3723)
+++ trunk/coregrind/arm/core_arch.h 2005-05-15 17:38:56 UTC (rev 3724)
@@ -106,9 +106,6 @@
Miscellaneous constants
------------------------------------------------------------------ */
=20
-// Valgrind's signal stack size, in words.
-#define VGA_SIGSTACK_SIZE_W 10000
-
// Base address of client address space.
#define VGA_CLIENT_BASE 0x0ul
=20
Modified: trunk/coregrind/x86/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/x86/core_arch.h 2005-05-15 17:28:26 UTC (rev 3723)
+++ trunk/coregrind/x86/core_arch.h 2005-05-15 17:38:56 UTC (rev 3724)
@@ -109,9 +109,6 @@
Miscellaneous constants
------------------------------------------------------------------ */
=20
-// Valgrind's signal stack size, in words.
-#define VGA_SIGSTACK_SIZE_W 10000
-
// Valgrind's stack size, in words.
#define VGA_STACK_SIZE_W 16384
=20
|
|
From: <sv...@va...> - 2005-05-15 17:18:42
|
Author: sewardj
Date: 2005-05-15 18:18:40 +0100 (Sun, 15 May 2005)
New Revision: 3722
Modified:
trunk/glibc-2.3.supp
Log:
glibc-2.3.5 fix (FC4)
Modified: trunk/glibc-2.3.supp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/glibc-2.3.supp 2005-05-15 17:14:28 UTC (rev 3721)
+++ trunk/glibc-2.3.supp 2005-05-15 17:18:40 UTC (rev 3722)
@@ -382,6 +382,17 @@
obj:/lib64/tls/libpthread*.so*
}
=20
+##----------------------------------------------------------------------=
##
+## glibc-2.3.5 on FC4
+## Assumes that sysctl returns \0-terminated strings in is_smp_system
+{
+ Unterminated strstr string in is_smp_system() (NPTL)
+ Memcheck:Cond
+ fun:strstr
+ fun:__pthread_initialize_minimal
+ obj:*/libpthread-2.3.5.so
+ obj:*/libpthread-2.3.5.so
+}
=20
=20
##----------------------------------------------------------------------=
##
|
|
From: <sv...@va...> - 2005-05-15 17:14:52
|
Author: sewardj
Date: 2005-05-15 18:14:28 +0100 (Sun, 15 May 2005)
New Revision: 3721
Modified:
trunk/coregrind/vg_dwarf.c
Log:
CFI reader: handle DW_CFA_def_cfa_offset_sf -- FC4 needs it
Modified: trunk/coregrind/vg_dwarf.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/vg_dwarf.c 2005-05-15 16:22:58 UTC (rev 3720)
+++ trunk/coregrind/vg_dwarf.c 2005-05-15 17:14:28 UTC (rev 3721)
@@ -957,6 +957,7 @@
DW_CFA_def_cfa_register =3D 0x0d,
DW_CFA_def_cfa_offset =3D 0x0e,
DW_CFA_offset_extended_sf =3D 0x11, /* DWARF3 only */
+ DW_CFA_def_cfa_offset_sf =3D 0x13, /* DWARF3 only */
DW_CFA_lo_user =3D 0x1c,
DW_CFA_GNU_args_size =3D 0x2e,
DW_CFA_hi_user =3D 0x3f
@@ -1458,6 +1459,12 @@
ctx->cfa_offset =3D off;
break;
=20
+ case DW_CFA_def_cfa_offset_sf:
+ off =3D read_leb128( &instr[i], &nleb, 1);
+ i +=3D nleb;
+ ctx->cfa_offset =3D off * ctx->data_a_f;
+ break;
+
case DW_CFA_GNU_args_size:
/* No idea what is supposed to happen. gdb-6.3 simply
ignores these. */
|
|
From: Nicholas N. <nj...@cs...> - 2005-05-15 16:25:27
|
On Tue, 10 May 2005, Nicholas Nethercote wrote: > In vg_main.c:process_cmd_line_options(), around line 1856, there's a switch > on VG_(clo_log_to). In the File/FileExactly cases, VG_(safe_fd)() > is called on the resulting file descriptors. In the Socket case, it's not > called. > > Then around line 1957, 7 lines of code are executed that moves fd into a safe > range. This looks almost identical to what VG_(safe_fd)() is doing. One > difference is that it doesn't close the fd if the DUPFD operation fails. > (VG_(safe_fd)() does close it in that case). However, the close() is pretty > pointless since VG_(safe_fd)() asserts shortly after in the failure case, > whereas the 7 lines don't. > > So, some questions: > > - can the VG_(safe_fd)() calls be removed from the switch, since the > post-switch 7 linrd do basically the same thing? > > - about VG_(safe_fd)() itself: is it appropriate that if the DUPFD ever > fails it will die with an assertion failure? > > - can we call VG_(safe_fd)() in the post-switch code rather than having > those 7 lines? Currently those lines just print out a warning and > continue if the DUPFD fails -- perhaps aborting would be better? I just committed a change that affects CLOs, but I preserved the current behaviour, even though I'm not convinced it's appropriate. If anyone has any further comments I'd appreciate it. N |
|
From: <sv...@va...> - 2005-05-15 16:23:02
|
Author: njn
Date: 2005-05-15 17:22:58 +0100 (Sun, 15 May 2005)
New Revision: 3720
Modified:
trunk/coregrind/core.h
trunk/coregrind/vg_main.c
trunk/coregrind/vg_mylibc.c
Log:
Cleaned up the logging command-line option variables:
- renamed VG_(logging_to_filedes) as VG_(logging_to_socket), which is
clearer
- no longer exporting clo_log_to, which avoids the confusion about whethe=
r
it or VG_(logging_to_socket) actually controls where output goes
- couple of other minor cleanups
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/core.h 2005-05-15 14:49:24 UTC (rev 3719)
+++ trunk/coregrind/core.h 2005-05-15 16:22:58 UTC (rev 3720)
@@ -151,15 +151,6 @@
/* The max number of suppression files. */
#define VG_CLO_MAX_SFILES 10
=20
-/* Describes where logging output is to be sent. */
-typedef
- enum {
- VgLogTo_Fd,
- VgLogTo_File,
- VgLogTo_FileExactly,
- VgLogTo_Socket
- } VgLogTo;
-
/* Application-visible file descriptor limits */
extern Int VG_(fd_soft_limit);
extern Int VG_(fd_hard_limit);
@@ -184,22 +175,22 @@
=20
/* Where logging output is to be sent to.
=20
- When log_to =3D=3D VgLogTo_Fd, clo_log_fd holds the file id, and is
- taken from the command line. clo_log_name is irrelevant.
+ With --log-fd (and by default), clo_log_fd holds the file id, and is
+ taken from the command line. (fd 2, stderr, is the default.)
+ clo_log_name is irrelevant.
=20
- When log_to =3D=3D VgLogTo_File, clo_log_name holds the log-file
+ With --log-file/--log-file-exactly, clo_log_name holds the log-file
name, and is taken from the command line. clo_log_fd is then
made to hold the relevant file id, by opening clo_log_name
(concatenated with the process ID) for writing.
=20
- When log_to =3D=3D VgLogTo_Socket, clo_log_name holds the
- hostname:portnumber pair, and is taken from the command line.
- clo_log_fd is then made to hold the relevant file handle, by
- opening a connection to said hostname:portnumber pair.=20
+ With --log-socket, clo_log_name holds the hostname:portnumber pair,
+ and is taken from the command line. clo_log_fd is then made to hold
+ the relevant file handle, by opening a connection to that
+ hostname:portnumber pair.=20
=20
Global default is to set log_to =3D=3D VgLogTo_Fd and log_fd =3D=3D 2
(stderr). */
-extern VgLogTo VG_(clo_log_to);
extern Int VG_(clo_log_fd);
extern Char* VG_(clo_log_name);
=20
@@ -698,7 +689,7 @@
=20
/* Tell the logging mechanism whether we are logging to a file
descriptor or a socket descriptor. */
-extern Bool VG_(logging_to_filedes);
+extern Bool VG_(logging_to_socket);
=20
/* Sanity checks which may be done at any time. The scheduler decides w=
hen. */
extern void VG_(sanity_check_general) ( Bool force_expensive );
Modified: trunk/coregrind/vg_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/vg_main.c 2005-05-15 14:49:24 UTC (rev 3719)
+++ trunk/coregrind/vg_main.c 2005-05-15 16:22:58 UTC (rev 3720)
@@ -164,7 +164,7 @@
=20
/* Tell the logging mechanism whether we are logging to a file
descriptor or a socket descriptor. */
-Bool VG_(logging_to_filedes) =3D True;
+Bool VG_(logging_to_socket) =3D False;
=20
=20
/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
@@ -1256,15 +1256,15 @@
/*=3D=3D=3D Command line errors =
=3D=3D=3D*/
/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
=20
-static void abort_msg ( void )
+static void revert_to_stderr ( void )
{
- VG_(clo_log_to) =3D VgLogTo_Fd;
+ vg_assert( !VG_(logging_to_socket) );
VG_(clo_log_fd) =3D 2; /* stderr */
}
=20
void VG_(bad_option) ( Char* opt )
{
- abort_msg();
+ revert_to_stderr();
VG_(printf)("valgrind: Bad option `%s'; aborting.\n", opt);
VG_(printf)("valgrind: Use --help for more information.\n");
VG_(exit)(1);
@@ -1272,7 +1272,7 @@
=20
static void missing_prog ( void )
{
- abort_msg();
+ revert_to_stderr();
VG_(printf)("valgrind: no program specified\n");
VG_(printf)("valgrind: Use --help for more information.\n");
VG_(exit)(1);
@@ -1280,7 +1280,7 @@
=20
static void config_error ( Char* msg )
{
- abort_msg();
+ revert_to_stderr();
VG_(printf)("valgrind: Startup or configuration error:\n %s\n", msg=
);
VG_(printf)("valgrind: Unable to start up properly. Giving up.\n");
VG_(exit)(1);
@@ -1410,11 +1410,8 @@
Bool VG_(clo_demangle) =3D True;
Bool VG_(clo_trace_children) =3D False;
=20
-/* See big comment in core.h for meaning of these three.
- fd is initially stdout, for --help, but gets moved to stderr by defau=
lt
- immediately afterwards. */
-VgLogTo VG_(clo_log_to) =3D VgLogTo_Fd;
-Int VG_(clo_log_fd) =3D 1;
+/* See big comment in core.h for meaning of these two. */
+Int VG_(clo_log_fd) =3D 2;
Char* VG_(clo_log_name) =3D NULL;
=20
Bool VG_(clo_time_stamp) =3D False;
@@ -1546,6 +1543,10 @@
" tool's start-up message for more information.\n"
"\n";
=20
+ // Ensure the message goes to stdout
+ VG_(clo_log_fd) =3D 1;
+ vg_assert( !VG_(logging_to_socket) );
+
VG_(printf)(usage1);
if (VG_(details).name) {
VG_(printf)(" user options for %s:\n", VG_(details).name);
@@ -1604,6 +1605,12 @@
{
Int i, eventually_log_fd;
Int toolname_len =3D VG_(strlen)(toolname);
+ enum {
+ VgLogTo_Fd,
+ VgLogTo_File,
+ VgLogTo_FileExactly,
+ VgLogTo_Socket
+ } log_to =3D VgLogTo_Fd; // Where is logging output to be sent?
=20
/* log to stderr by default, but usage message goes to stdout */
eventually_log_fd =3D 2;=20
@@ -1721,23 +1728,23 @@
VG_(clo_vex_control).guest_chase_thresh, 0, 99)
=20
else if (VG_CLO_STREQN(9, arg, "--log-fd=3D")) {
- VG_(clo_log_to) =3D VgLogTo_Fd;
+ log_to =3D VgLogTo_Fd;
VG_(clo_log_name) =3D NULL;
eventually_log_fd =3D (Int)VG_(atoll)(&arg[9]);
}
=20
else if (VG_CLO_STREQN(11, arg, "--log-file=3D")) {
- VG_(clo_log_to) =3D VgLogTo_File;
+ log_to =3D VgLogTo_File;
VG_(clo_log_name) =3D &arg[11];
}
=20
else if (VG_CLO_STREQN(19, arg, "--log-file-exactly=3D")) {
- VG_(clo_log_to) =3D VgLogTo_FileExactly;
+ log_to =3D VgLogTo_FileExactly;
VG_(clo_log_name) =3D &arg[19];
}
=20
else if (VG_CLO_STREQN(13, arg, "--log-socket=3D")) {
- VG_(clo_log_to) =3D VgLogTo_Socket;
+ log_to =3D VgLogTo_Socket;
VG_(clo_log_name) =3D &arg[13];
}
=20
@@ -1836,18 +1843,31 @@
VG_(bad_option)("--db-attach=3Dyes and --trace-children=3Dyes");
}
=20
- /* Set up logging now. After this is done, VG_(clo_log_fd)
+ if (VG_(clo_gen_suppressions) > 0 &&=20
+ !VG_(needs).core_errors && !VG_(needs).tool_errors) {
+ VG_(message)(Vg_UserMsg,=20
+ "Can't use --gen-suppressions=3D with this tool,");
+ VG_(message)(Vg_UserMsg,=20
+ "as it doesn't generate errors.");
+ VG_(bad_option)("--gen-suppressions=3D");
+ }
+
+ /* All non-logging-related options have been checked. If the logging
+ option specified is ok, we can switch to it, as we know we won't
+ have to generate any other command-line-related error messages.
+ (So far we should be still attached to stderr, so we can show on
+ the terminal any problems to do with processing command line
+ opts.)
+ =20
+ So set up logging now. After this is done, VG_(clo_log_fd)
should be connected to whatever sink has been selected, and we
indiscriminately chuck stuff into it without worrying what the
nature of it is. Oh the wonder of Unix streams. */
=20
- /* So far we should be still attached to stdout, so we can show on
- the terminal any problems to do with processing command line
- opts. */
- vg_assert(VG_(clo_log_fd) =3D=3D 1 /* stdout */);
- vg_assert(VG_(logging_to_filedes) =3D=3D True);
+ vg_assert(VG_(clo_log_fd) =3D=3D 2 /* stderr */);
+ vg_assert(VG_(logging_to_socket) =3D=3D False);
=20
- switch (VG_(clo_log_to)) {
+ switch (log_to) {
=20
case VgLogTo_Fd:=20
vg_assert(VG_(clo_log_name) =3D=3D NULL);
@@ -1871,6 +1891,7 @@
VG_(clo_log_name), pid, seq );
seq++;
=20
+ // EXCL: it will fail with EEXIST if the file already exists=
.
eventually_log_fd=20
=3D VG_(open)(logfilename,=20
VKI_O_CREAT|VKI_O_WRONLY|VKI_O_EXCL|VKI_O_TRUNC,=20
@@ -1879,13 +1900,15 @@
VG_(clo_log_fd) =3D VG_(safe_fd)(eventually_log_fd);
break; /* for (;;) */
} else {
+ // If the file already existed, we try the next name. If=
it
+ // was some other file error, we give up.
if (eventually_log_fd !=3D -VKI_EEXIST) {
VG_(message)(Vg_UserMsg,=20
"Can't create/open log file `%s.pid%d'; giving up!",=20
VG_(clo_log_name), pid);
VG_(bad_option)(
"--log-file=3D<file> (didn't work out for some reason.)");
- break; /* for (;;) */
+ /*NOTREACHED*/
}
}
}
@@ -1893,20 +1916,16 @@
}
=20
case VgLogTo_FileExactly: {
- Char logfilename[1000];
-
vg_assert(VG_(clo_log_name) !=3D NULL);
vg_assert(VG_(strlen)(VG_(clo_log_name)) <=3D 900); /* paranoia=
*/
- VG_(sprintf)(logfilename, "%s", VG_(clo_log_name));
=20
eventually_log_fd=20
- =3D VG_(open)(logfilename,=20
+ =3D VG_(open)(VG_(clo_log_name),
VKI_O_CREAT|VKI_O_WRONLY|VKI_O_TRUNC,=20
VKI_S_IRUSR|VKI_S_IWUSR);
if (eventually_log_fd >=3D 0) {
VG_(clo_log_fd) =3D VG_(safe_fd)(eventually_log_fd);
- }=20
- else if (eventually_log_fd !=3D -VKI_EEXIST) {
+ } else {
VG_(message)(Vg_UserMsg,=20
"Can't create/open log file `%s'; giving up!",=20
VG_(clo_log_name));
@@ -1928,6 +1947,7 @@
"of `%s'; giving up!", VG_(clo_log_name) );
VG_(bad_option)(
"--log-socket=3D");
+ /*NOTREACHED*/
}
if (eventually_log_fd =3D=3D -2) {
VG_(message)(Vg_UserMsg,=20
@@ -1938,17 +1958,21 @@
VG_(message)(Vg_UserMsg,=20
"" );
/* We don't change anything here. */
+ vg_assert(VG_(clo_log_fd) =3D=3D 2);
} else {
vg_assert(eventually_log_fd > 0);
VG_(clo_log_fd) =3D eventually_log_fd;
- VG_(logging_to_filedes) =3D False;
+ VG_(logging_to_socket) =3D True;
}
break;
}
-
}
=20
- /* Move log_fd into the safe range, so it doesn't conflict with any a=
pp fds */
+ // Move log_fd into the safe range, so it doesn't conflict with any a=
pp fds.
+ // XXX: this is more or less duplicating the behaviour of the calls t=
o
+ // VG_(safe_fd)() above, although this does not close the original fd=
.
+ // Perhaps the VG_(safe_fd)() calls above should be removed, and this
+ // code should be replaced with a call to VG_(safe_fd)(). --njn
eventually_log_fd =3D VG_(fcntl)(VG_(clo_log_fd), VKI_F_DUPFD, VG_(fd=
_hard_limit));
if (eventually_log_fd < 0)
VG_(message)(Vg_UserMsg, "valgrind: failed to move logfile fd into=
safe range");
@@ -1985,7 +2009,7 @@
"Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al=
.");
}
=20
- if (VG_(clo_verbosity) > 0 && VG_(clo_log_to) !=3D VgLogTo_Fd) {
+ if (VG_(clo_verbosity) > 0 && log_to !=3D VgLogTo_Fd) {
VG_(message)(Vg_UserMsg, "");
VG_(message)(Vg_UserMsg,=20
"My PID =3D %d, parent PID =3D %d. Prog and args are:",
@@ -1996,7 +2020,7 @@
=20
if (VG_(clo_verbosity) > 1) {
Int fd;
- if (VG_(clo_log_to) !=3D VgLogTo_Fd)
+ if (log_to !=3D VgLogTo_Fd)
VG_(message)(Vg_DebugMsg, "");
VG_(message)(Vg_DebugMsg, "Valgrind library directory: %s", VG_(li=
bdir));
VG_(message)(Vg_DebugMsg, "Command line");
@@ -2016,7 +2040,7 @@
#define BUF_LEN 256
Char version_buf[BUF_LEN];
Int n =3D VG_(read) ( fd, version_buf, BUF_LEN );
- vg_assert(n <=3D 256);
+ vg_assert(n <=3D BUF_LEN);
if (n > 0) {
version_buf[n-1] =3D '\0';
VG_(message)(Vg_DebugMsg, " %s", version_buf);
@@ -2039,15 +2063,6 @@
VG_(clo_suppressions)[VG_(clo_n_suppressions)] =3D buf;
VG_(clo_n_suppressions)++;
}
-
- if (VG_(clo_gen_suppressions) > 0 &&=20
- !VG_(needs).core_errors && !VG_(needs).tool_errors) {
- VG_(message)(Vg_UserMsg,=20
- "Can't use --gen-suppressions=3D with this tool,");
- VG_(message)(Vg_UserMsg,=20
- "as it doesn't generate errors.");
- VG_(bad_option)("--gen-suppressions=3D");
- }
}
=20
// Build the string for VALGRINDCLO.
Modified: trunk/coregrind/vg_mylibc.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/vg_mylibc.c 2005-05-15 14:49:24 UTC (rev 3719)
+++ trunk/coregrind/vg_mylibc.c 2005-05-15 16:22:58 UTC (rev 3720)
@@ -395,14 +395,13 @@
/* Do the low-level send of a message to the logging sink. */
static void send_bytes_to_logging_sink ( Char* msg, Int nbytes )
{
- if (VG_(logging_to_filedes)) {
+ if (!VG_(logging_to_socket)) {
VG_(write)( VG_(clo_log_fd), msg, nbytes );
} else {
Int rc =3D VG_(write_socket)( VG_(clo_log_fd), msg, nbytes );
if (rc =3D=3D -1) {
// For example, the listener process died. Switch back to stde=
rr.
- VG_(logging_to_filedes) =3D True;
- VG_(clo_log_to) =3D VgLogTo_Fd;
+ VG_(logging_to_socket) =3D False;
VG_(clo_log_fd) =3D 2;
VG_(write)( VG_(clo_log_fd), msg, nbytes );
}
|
|
From: <sv...@va...> - 2005-05-15 14:50:09
|
Author: njn
Date: 2005-05-15 15:50:05 +0100 (Sun, 15 May 2005)
New Revision: 118
Modified:
trunk/docs/FAQ/faq.unexpected.html
Log:
Add note to FAQ about unloaded shared objects and leak errors.
Modified: trunk/docs/FAQ/faq.unexpected.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/docs/FAQ/faq.unexpected.html 2005-05-12 13:46:24 UTC (rev 117)
+++ trunk/docs/FAQ/faq.unexpected.html 2005-05-15 14:50:05 UTC (rev 118)
@@ -171,6 +171,11 @@
And don't strip symbol tables (programs should be unstripped
unless you run 'strip' on them; some libraries ship
stripped).</p>
+<p>Also, for leak reports involving shared objects, if the shared object=
is
+ unloaded before the program terminates, Valgrind will discard the debu=
g
+ information and the error message will be full of
+ <tt class=3D"literal">???</tt> entries. The workaround here is to avo=
id
+ calling <tt class=3D"literal">dlclose()</tt> on these shared objects.<=
/p>
<p>Also, <tt class=3D"literal">-fomit-frame-pointer</tt> and
<tt class=3D"literal">-fstack-check</tt> can make stack traces
worse.</p>
@@ -202,6 +207,15 @@
by 0x42015703: __libc_start_main (in /lib/tls/libc-2.3.2.so)
by 0x80482CC: ??? (start.S:81)
</pre>
+<p>A leak error message involving an unloaded shared object:</p>
+<pre class=3D"programlisting">
+84 bytes in 1 blocks are possibly lost in loss record 488 of 713
+ at 0x1B9036DA: operator new(unsigned) (vg_replace_malloc.c:132)
+ by 0x1DB63EEB: ???
+ by 0x1DB4B800: ???
+ by 0x1D65E007: ???
+ by 0x8049EE6: main (main.cpp:24)
+</pre>
</td>
</tr>
<tr><td colspan=3D"2">=A0</td></tr>
|
|
From: <sv...@va...> - 2005-05-15 14:49:42
|
Author: njn
Date: 2005-05-15 15:49:24 +0100 (Sun, 15 May 2005)
New Revision: 3719
Modified:
trunk/FAQ.txt
trunk/docs/xml/FAQ.xml
Log:
Add note to FAQ about unloaded shared objects and leak errors.
Modified: trunk/FAQ.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/FAQ.txt 2005-05-15 03:56:26 UTC (rev 3718)
+++ trunk/FAQ.txt 2005-05-15 14:49:24 UTC (rev 3719)
@@ -200,6 +200,11 @@
debug information. And don't strip symbol tables (programs should be
unstripped unless you run 'strip' on them; some libraries ship stripped=
).
=20
+Also, for leak reports involving shared objects, if the shared object is
+unloaded before the program terminates, Valgrind will discard the debug
+information and the error message will be full of "???" entries. The
+workaround here is to avoid calling dlclose() on these shared objects.
+
Also, -fomit-frame-pointer and -fstack-check can make stack traces worse=
.
=20
Some example sub-traces:
@@ -231,6 +236,15 @@
by 0x42015703: __libc_start_main (in /lib/tls/libc-2.3.2.so)
by 0x80482CC: ??? (start.S:81)
=20
+ A leak error message involving an unloaded shared object:
+
+ 84 bytes in 1 blocks are possibly lost in loss record 488 of 713
+ at 0x1B9036DA: operator new(unsigned) (vg_replace_malloc.c:132)
+ by 0x1DB63EEB: ???
+ by 0x1DB4B800: ???
+ by 0x1D65E007: ???
+ by 0x8049EE6: main (main.cpp:24)
+
-----------------------------------------------------------------
5. Memcheck doesn't find my bug
-----------------------------------------------------------------
Modified: trunk/docs/xml/FAQ.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/docs/xml/FAQ.xml 2005-05-15 03:56:26 UTC (rev 3718)
+++ trunk/docs/xml/FAQ.xml 2005-05-15 14:49:24 UTC (rev 3719)
@@ -284,6 +284,13 @@
unless you run 'strip' on them; some libraries ship
stripped).</para>
=20
+ <para>Also, for leak reports involving shared objects, if the shared
+ object is unloaded before the program terminates, Valgrind will discar=
d
+ the debug information and the error message will be full of
+ <literal>???</literal> entries. The workaround here is to avoid calli=
ng
+ dlclose() on these shared objects.
+ </para>
+
<para>Also, <literal>-fomit-frame-pointer</literal> and
<literal>-fstack-check</literal> can make stack traces
worse.</para>
@@ -321,6 +328,17 @@
by 0x80482CC: ??? (start.S:81)
</programlisting>
=20
+ <para>A leak error message involving an unloaded shared object:</para>
+
+<programlisting>
+84 bytes in 1 blocks are possibly lost in loss record 488 of 713
+ at 0x1B9036DA: operator new(unsigned) (vg_replace_malloc.c:132)
+ by 0x1DB63EEB: ???
+ by 0x1DB4B800: ???
+ by 0x1D65E007: ???
+ by 0x8049EE6: main (main.cpp:24)
+</programlisting>
+
</answer>
</qandaentry>
=20
|
|
From: <sv...@va...> - 2005-05-15 03:57:12
|
Author: njn
Date: 2005-05-15 04:56:26 +0100 (Sun, 15 May 2005)
New Revision: 3718
Modified:
trunk/coregrind/amd64/core_arch.h
trunk/coregrind/arm/core_arch.h
trunk/coregrind/vg_symtab2.c
trunk/coregrind/x86/core_arch.h
Log:
Remove VGA_WORD_SIZE; we already have VG_WORDSIZE.
Modified: trunk/coregrind/amd64/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/amd64/core_arch.h 2005-05-15 03:52:40 UTC (rev 3717)
+++ trunk/coregrind/amd64/core_arch.h 2005-05-15 03:56:26 UTC (rev 3718)
@@ -44,8 +44,6 @@
#define VGA_ELF_MACHINE EM_X86_64
#define VGA_ELF_CLASS ELFCLASS64
=20
-#define VGA_WORD_SIZE 8
-
/* ---------------------------------------------------------------------
Interesting registers
------------------------------------------------------------------ */
Modified: trunk/coregrind/arm/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/arm/core_arch.h 2005-05-15 03:52:40 UTC (rev 3717)
+++ trunk/coregrind/arm/core_arch.h 2005-05-15 03:56:26 UTC (rev 3718)
@@ -45,8 +45,6 @@
#define VGA_ELF_MACHINE EM_ARM
#define VGA_ELF_CLASS ELFCLASS32
=20
-#define VGA_WORD_SIZE 4
-
/* ---------------------------------------------------------------------
Interesting registers
------------------------------------------------------------------ */
Modified: trunk/coregrind/vg_symtab2.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/vg_symtab2.c 2005-05-15 03:52:40 UTC (rev 3717)
+++ trunk/coregrind/vg_symtab2.c 2005-05-15 03:56:26 UTC (rev 3718)
@@ -50,7 +50,7 @@
an 'XX' name. Then use the 'XX' variant consistently in
the rest of this file.=20
*/
-#if VGA_WORD_SIZE =3D=3D 4
+#if VG_WORDSIZE =3D=3D 4
# define ElfXX_Ehdr Elf32_Ehdr
# define ElfXX_Shdr Elf32_Shdr
# define ElfXX_Phdr Elf32_Phdr
@@ -61,7 +61,7 @@
# define ELFXX_ST_BIND ELF32_ST_BIND
# define ELFXX_ST_TYPE ELF32_ST_TYPE
=20
-#elif VGA_WORD_SIZE =3D=3D 8
+#elif VG_WORDSIZE =3D=3D 8
# define ElfXX_Ehdr Elf64_Ehdr
# define ElfXX_Shdr Elf64_Shdr
# define ElfXX_Phdr Elf64_Phdr
@@ -73,7 +73,7 @@
# define ELFXX_ST_TYPE ELF64_ST_TYPE
=20
#else
-# error "VGA_WORD_SIZE should be 4 or 8"
+# error "VG_WORDSIZE should be 4 or 8"
#endif
=20
=20
Modified: trunk/coregrind/x86/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/x86/core_arch.h 2005-05-15 03:52:40 UTC (rev 3717)
+++ trunk/coregrind/x86/core_arch.h 2005-05-15 03:56:26 UTC (rev 3718)
@@ -44,8 +44,6 @@
#define VGA_ELF_MACHINE EM_386
#define VGA_ELF_CLASS ELFCLASS32
=20
-#define VGA_WORD_SIZE 4
-
/* ---------------------------------------------------------------------
Interesting registers
------------------------------------------------------------------ */
|
|
From: <sv...@va...> - 2005-05-15 03:53:11
|
Author: njn
Date: 2005-05-15 04:52:40 +0100 (Sun, 15 May 2005)
New Revision: 3717
Modified:
trunk/coregrind/core.h
trunk/coregrind/m_mallocfree.c
trunk/coregrind/vg_messages.c
Log:
fixup headers a bit
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/core.h 2005-05-15 03:38:53 UTC (rev 3716)
+++ trunk/coregrind/core.h 2005-05-15 03:52:40 UTC (rev 3717)
@@ -83,7 +83,6 @@
*/
=20
#include "tool.h" // tool stuff
-#include "core_asm.h"
#include "core_arch.h" // arch-specific stuff, eg. x86/core_arch.h
=20
// Ugly: this is needed by linux/core_os.h
@@ -96,8 +95,6 @@
#include "pub_core_mallocfree.h" // for type 'ArenaId'
#include "pub_core_stacktrace.h" // for type 'StackTrace'
=20
-#include "valgrind.h"
-
/* ---------------------------------------------------------------------
Global macros.
------------------------------------------------------------------ */
Modified: trunk/coregrind/m_mallocfree.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_mallocfree.c 2005-05-15 03:38:53 UTC (rev 3716)
+++ trunk/coregrind/m_mallocfree.c 2005-05-15 03:52:40 UTC (rev 3717)
@@ -32,6 +32,7 @@
=20
#include "core.h"
#include "pub_core_aspacemgr.h"
+#include "valgrind.h"
=20
//zz#include "memcheck/memcheck.h"
=20
Modified: trunk/coregrind/vg_messages.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/vg_messages.c 2005-05-15 03:38:53 UTC (rev 3716)
+++ trunk/coregrind/vg_messages.c 2005-05-15 03:52:40 UTC (rev 3717)
@@ -30,6 +30,7 @@
*/
=20
#include "core.h"
+#include "valgrind.h"
=20
#include <time.h>
#include <sys/time.h>
|
|
From: <sv...@va...> - 2005-05-15 03:38:55
|
Author: njn
Date: 2005-05-15 04:38:53 +0100 (Sun, 15 May 2005)
New Revision: 3716
Modified:
trunk/coregrind/vg_symtab2.c
Log:
Move the symbol table reading closer to the debug info reading.
Modified: trunk/coregrind/vg_symtab2.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/vg_symtab2.c 2005-05-15 03:30:56 UTC (rev 3715)
+++ trunk/coregrind/vg_symtab2.c 2005-05-15 03:38:53 UTC (rev 3716)
@@ -1650,14 +1650,6 @@
vg_assert((o_dynsym_sz % sizeof(ElfXX_Sym)) =3D=3D 0);
vg_assert((o_symtab_sz % sizeof(ElfXX_Sym)) =3D=3D 0);
=20
- read_symtab(si, "symbol table", False,
- o_symtab, o_symtab_sz,
- o_strtab, o_strtab_sz);
-
- read_symtab(si, "dynamic symbol table", True,
- o_dynsym, o_dynsym_sz,
- o_dynstr, o_dynstr_sz);
-
/* Did we find a debuglink section? */
if (debuglink !=3D NULL) {
UInt crc_offset =3D ROUNDUP(VG_(strlen)(debuglink)+1, 4);
@@ -1707,6 +1699,15 @@
}
}
=20
+ /* Read symbols */
+ read_symtab(si, "symbol table", False,
+ o_symtab, o_symtab_sz,
+ o_strtab, o_strtab_sz);
+
+ read_symtab(si, "dynamic symbol table", True,
+ o_dynsym, o_dynsym_sz,
+ o_dynstr, o_dynstr_sz);
+
/* Read .eh_frame (call-frame-info) if any */
if (ehframe) {
VG_(read_callframe_info_dwarf2) ( si, ehframe, ehframe_sz, ehfr=
ame_addr );
@@ -1731,7 +1732,6 @@
VG_(symerr)(" object doesn't have any line number info");
goto out;
}
-
}
res =3D True;
=20
|
|
From: <sv...@va...> - 2005-05-15 03:30:59
|
Author: njn
Date: 2005-05-15 04:30:56 +0100 (Sun, 15 May 2005)
New Revision: 3715
Modified:
trunk/coregrind/vg_symtab2.c
Log:
Be more concise.
Modified: trunk/coregrind/vg_symtab2.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/vg_symtab2.c 2005-05-14 23:28:42 UTC (rev 3714)
+++ trunk/coregrind/vg_symtab2.c 2005-05-15 03:30:56 UTC (rev 3715)
@@ -2252,21 +2252,14 @@
=20
/* return a pointer to a register (now for 5 other impossible things
before breakfast) */
-static UInt *regaddr(ThreadId tid, Int regno)
+static UInt* regaddr(ThreadId tid, Int regno)
{
- UInt *ret =3D 0;
+ UInt* ret =3D VGA_(reg_addr_from_tst)(regno, &VG_(threads)[tid].arch)=
;
=20
- ret =3D VGA_(reg_addr_from_tst)(regno, &VG_(threads)[tid].arch);
-
if (ret =3D=3D 0) {
- Char file[100];
- Int line;
- Addr eip =3D VG_(get_IP)(tid);
-
- if (!VG_(get_filename_linenum)(eip, file, sizeof(file), &line))
- file[0] =3D 0;
- VG_(printf)("mysterious register %d used at %p %s:%d\n",
- regno, eip, file, line);
+ Char buf[100];
+ VG_(describe_IP)( VG_(get_IP)(tid), buf, 100 );
+ VG_(printf)("mysterious register %d used at %s\n", regno, buf);
}
=20
return ret;
|
|
From: <js...@ac...> - 2005-05-15 03:02:23
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-05-15 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_mmx: valgrind ./insn_mmx insn_mmxext: (skipping, prereq failed: ../../../tests/cputest x86-mmxext) insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 201 tests, 5 stderr failures, 0 stdout failures ================= memcheck/tests/pth_once (stderr) memcheck/tests/scalar (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/writev (stderr) corecheck/tests/fdleak_fcntl (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <to...@co...> - 2005-05-15 02:36:18
|
Nightly build on dunsmere ( athlon, Fedora Core 3 ) started at 2005-05-15 03:30:04 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 175 tests, 167 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) memcheck/tests/badaddrvalue (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badfree (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badloop (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/badrw (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/clientperm (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/doublefree (stderr) memcheck/tests/errs1 (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/exitprog (stderr) memcheck/tests/fprw (stderr) memcheck/tests/fwrite (stderr) memcheck/tests/inits (stderr) memcheck/tests/inline (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/malloc1 (stderr) memcheck/tests/malloc2 (stderr) memcheck/tests/malloc3 (stderr) memcheck/tests/manuel1 (stderr) memcheck/tests/manuel2 (stderr) memcheck/tests/manuel3 (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/memalign2 (stderr) memcheck/tests/memalign_test (stderr) memcheck/tests/memcmptest (stderr) memcheck/tests/mempool (stderr) memcheck/tests/mismatches (stderr) memcheck/tests/mmaptest (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stderr) memcheck/tests/null_socket (stderr) memcheck/tests/overlap (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/post-syscall (stderr) memcheck/tests/realloc1 (stderr) memcheck/tests/realloc2 (stderr) memcheck/tests/realloc3 (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/signal2 (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/str_tester (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp2 (stderr) memcheck/tests/suppfree (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/writev (stderr) memcheck/tests/x86/fpeflags (stderr) memcheck/tests/x86/pushfpopf (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_exit_group (stderr) memcheck/tests/x86/scalar_fork (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/scalar_vfork (stderr) memcheck/tests/x86/tronical (stderr) memcheck/tests/zeropage (stderr) cachegrind/tests/chdir (stderr) cachegrind/tests/dlclose (stderr) cachegrind/tests/x86/fpu-28-108 (stderr) corecheck/tests/as_mmap (stderr) corecheck/tests/as_shm (stderr) corecheck/tests/erringfds (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) corecheck/tests/pth_atfork1 (stderr) corecheck/tests/pth_cancel1 (stderr) corecheck/tests/pth_cancel2 (stderr) corecheck/tests/pth_cvsimple (stderr) corecheck/tests/pth_empty (stderr) corecheck/tests/pth_exit (stderr) corecheck/tests/pth_exit2 (stderr) corecheck/tests/pth_mutexspeed (stderr) corecheck/tests/pth_once (stderr) corecheck/tests/pth_rwlock (stderr) corecheck/tests/res_search (stderr) corecheck/tests/sigkill (stderr) corecheck/tests/threadederrno (stderr) corecheck/tests/vgprintf (stderr) massif/tests/toobig-allocs (stderr) massif/tests/true_html (stderr) massif/tests/true_text (stderr) lackey/tests/true (stderr) none/tests/args (stderr) none/tests/async-sigs (stderr) none/tests/bitfield1 (stderr) none/tests/blockfault (stderr) none/tests/closeall (stderr) none/tests/coolo_sigaction (stderr) none/tests/coolo_strlen (stderr) none/tests/discard (stderr) none/tests/exec-sigmask (stderr) none/tests/execve (stderr) none/tests/faultstatus (stderr) none/tests/fcntl_setown (stderr) none/tests/floored (stderr) none/tests/fork (stderr) none/tests/fucomip (stderr) none/tests/gxx304 (stderr) none/tests/manythreads (stderr) none/tests/map_unaligned (stderr) none/tests/map_unmap (stderr) none/tests/mq (stderr) none/tests/mremap (stderr) none/tests/munmap_exe (stderr) none/tests/pending (stderr) none/tests/pth_blockedsig (stderr) none/tests/pth_stackalign (stderr) none/tests/rcrl (stderr) none/tests/readline1 (stderr) none/tests/resolv (stderr) none/tests/rlimit_nofile (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/sem (stderr) none/tests/semlimit (stderr) none/tests/sha1_test (stderr) none/tests/shortpush (stderr) none/tests/shorts (stderr) none/tests/sigstackgrowth (stderr) none/tests/smc1 (stderr) none/tests/stackgrowth (stderr) none/tests/syscall-restart1 (stderr) none/tests/syscall-restart2 (stderr) none/tests/system (stderr) none/tests/thread-exits (stderr) none/tests/threaded-fork (stderr) none/tests/tls (stderr) none/tests/x86/badseg (stderr) none/tests/x86/bt_everything (stderr) none/tests/x86/bt_literal (stderr) none/tests/x86/cpuid (stderr) none/tests/x86/fpu_lazy_eflags (stderr) none/tests/x86/getseg (stderr) none/tests/x86/insn_basic (stderr) none/tests/x86/insn_cmov (stderr) none/tests/x86/insn_fpu (stderr) none/tests/x86/insn_mmx (stderr) none/tests/x86/insn_mmxext (stderr) none/tests/x86/insn_sse (stderr) none/tests/x86/int (stderr) none/tests/x86/pushpopseg (stderr) none/tests/x86/seg_override (stderr) none/tests/x86/sigcontext (stderr) none/tests/yield (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-15 02:31:01
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-05-15 03:25:01 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 174 tests, 3 stderr failures, 1 stdout failure ================= corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/yield (stdout) |
|
From: Tom H. <to...@co...> - 2005-05-15 02:26:21
|
Nightly build on dunsmere ( Fedora Core 3 ) started at 2005-05-15 03:20:04 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int sh: line 1: 23945 Segmentation fault VALGRINDLIB=/tmp/valgrind.30660/valgrind/.in_place /tmp/valgrind.30660/valgrind/./coregrind/valgrind --command-line-only=yes --memcheck:leak-check=no --addrcheck:leak-check=no --tool=none ./int >int.stdout.out 2>int.stderr.out pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 207 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_supp (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-05-15 02:25:36
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-05-15 03:20:01 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 173 tests, 3 stderr failures, 0 stdout failures ================= corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-15 02:22:43
|
Nightly build on audi ( Red Hat 9 ) started at 2005-05-15 03:15:01 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow fpu_lazy_eflags: valgrind ./fpu_lazy_eflags insn_basic: valgrind ./insn_basic insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 206 tests, 1 stderr failure, 0 stdout failures ================= memcheck/tests/scalar (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-05-15 02:21:17
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-05-15 03:15:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 173 tests, 12 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vgtest_ume (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-05-15 02:20:26
|
Nightly build on dellow ( x86_64, Fedora Core 3 ) started at 2005-05-15 03:10:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 154 tests, 17 stderr failures, 3 stdout failures ================= memcheck/tests/brk (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/yield (stdout) |
|
From: Tom H. <th...@cy...> - 2005-05-15 02:16:40
|
Nightly build on ginetta ( Red Hat 8.0 ) started at 2005-05-15 03:10:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 205 tests, 3 stderr failures, 0 stdout failures ================= memcheck/tests/pth_once (stderr) memcheck/tests/scalar (stderr) memcheck/tests/threadederrno (stderr) make: *** [regtest] Error 1 |