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
(12) |
2
(11) |
3
(8) |
|
4
(9) |
5
(10) |
6
(18) |
7
(8) |
8
(12) |
9
(23) |
10
(14) |
|
11
(15) |
12
(31) |
13
(45) |
14
(28) |
15
(20) |
16
(16) |
17
(9) |
|
18
(18) |
19
(26) |
20
(49) |
21
(14) |
22
(18) |
23
(24) |
24
(28) |
|
25
(39) |
26
(17) |
27
(27) |
28
(27) |
29
(14) |
30
(44) |
|
|
From: Tom H. <th...@cy...> - 2005-09-30 02:28:23
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-09-30 03:15:04 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 187 tests, 16 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (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/mempool (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-09-30 02:24:46
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-09-30 03:10:06 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 187 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-09-30 02:20:54
|
Nightly build on dellow ( x86_64, Fedora Core 4 ) started at 2005-09-30 03:10:07 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 165 tests, 7 stderr failures, 2 stdout failures ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/as_mmap (stderr) none/tests/as_shm (stdout) none/tests/as_shm (stderr) none/tests/faultstatus (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2005-09-30 02:17:47
|
Nightly build on aston ( x86_64, Fedora Core 3 ) started at 2005-09-30 03:05:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 165 tests, 7 stderr failures, 2 stdout failures ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/as_mmap (stderr) none/tests/as_shm (stdout) none/tests/as_shm (stderr) none/tests/faultstatus (stderr) none/tests/mremap2 (stdout) |
|
From: <sv...@va...> - 2005-09-30 02:17:43
|
Author: njn Date: 2005-09-30 03:17:40 +0100 (Fri, 30 Sep 2005) New Revision: 4833 Log: whoops Modified: trunk/docs/Makefile.am Modified: trunk/docs/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/docs/Makefile.am 2005-09-30 02:17:16 UTC (rev 4832) +++ trunk/docs/Makefile.am 2005-09-30 02:17:40 UTC (rev 4833) @@ -7,7 +7,7 @@ # Comment out the next line to skip building print docs. The default # is not to skip building print docs. Note, after changing it # you of course need to re-run configure to make it take effect. -BUILD_ALL_DOCS=3Dno +BUILD_ALL_DOCS=3Dyes =20 ##------------------------------------------------------------- ## END OF HACK @@ -44,7 +44,7 @@ =20 # stylesheet processor XSLTPROC =3D xsltproc -XSLTPROC_FLAGS =3D --xinclude=20 +XSLTPROC_FLAGS =3D --nonet --xinclude=20 =20 # stylesheets XSL_HTML_CHUNK_STYLE =3D $(mylibdir)/vg-html-chunk.xsl |
|
From: <sv...@va...> - 2005-09-30 02:17:24
|
Author: njn Date: 2005-09-30 03:17:16 +0100 (Fri, 30 Sep 2005) New Revision: 4832 Log: add missing file Modified: trunk/coregrind/Makefile.am Modified: trunk/coregrind/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/Makefile.am 2005-09-30 01:47:12 UTC (rev 4831) +++ trunk/coregrind/Makefile.am 2005-09-30 02:17:16 UTC (rev 4832) @@ -31,6 +31,7 @@ pub_core_basics_asm.h \ pub_core_clientstate.h \ pub_core_commandline.h \ + pub_core_coredump.h \ pub_core_cpuid.h \ pub_core_debuginfo.h \ pub_core_debugger.h \ |
|
From: Tom H. <th...@cy...> - 2005-09-30 02:12:31
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-09-30 03:00:03 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 165 tests, 8 stderr failures, 1 stdout failure ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/as_mmap (stderr) none/tests/as_shm (stdout) none/tests/as_shm (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) |
|
From: <sv...@va...> - 2005-09-30 01:47:21
|
Author: sewardj
Date: 2005-09-30 02:47:12 +0100 (Fri, 30 Sep 2005)
New Revision: 4831
Log:
Placate memcheck/tests/x86/scalar, which objected to the rewrite of
the sys_readlink wrapper.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/coregrind/m_syswrap/syswrap-generic.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_syswrap/syswrap-generic.c 2005-09-30 01:43:32 UTC (=
rev 4830)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-09-30 01:47:12 UTC (=
rev 4831)
@@ -4639,8 +4639,9 @@
* /proc/<pid>/exe.
*/
VG_(sprintf)(name, "/proc/%d/exe", VG_(getpid)());
- if (VG_(strcmp)((Char *)ARG1, name) =3D=3D 0=20
- || VG_(strcmp)((Char *)ARG1, "/proc/self/exe") =3D=3D 0) {
+ if (ML_(safe_to_deref)(ARG1, 1)
+ && (VG_(strcmp)((Char *)ARG1, name) =3D=3D 0=20
+ || VG_(strcmp)((Char *)ARG1, "/proc/self/exe") =3D=3D 0)) {
VG_(sprintf)(name, "/proc/self/fd/%d", VG_(cl_exec_fd));
SET_STATUS_from_SysRes( VG_(do_syscall3)(saved, (UWord)name,=20
ARG2, ARG3));
|
|
From: <sv...@va...> - 2005-09-30 01:43:35
|
Author: njn Date: 2005-09-30 02:43:32 +0100 (Fri, 30 Sep 2005) New Revision: 4830 Log: Commit Jeroen Witmond's xml-to-text translator, and use it for the FAQ. Less double maintenance, hoorah! Added: trunk/docs/lib/README_XML2TXT.txt trunk/docs/lib/copy.xslt trunk/docs/lib/docbook2text.xslt trunk/docs/lib/str.dup.xslt trunk/docs/lib/str.find-last.xslt trunk/docs/lib/text.justify.xslt trunk/docs/lib/text.wrap.xslt trunk/docs/lib/untag-inline.xslt Removed: trunk/FAQ.txt Modified: trunk/Makefile.am trunk/docs/Makefile.am trunk/docs/README trunk/docs/lib/Makefile.am trunk/docs/xml/FAQ.xml Deleted: 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-09-30 01:20:47 UTC (rev 4829) +++ trunk/FAQ.txt 2005-09-30 01:43:32 UTC (rev 4830) @@ -1,361 +0,0 @@ -Valgrind FAQ, version 2.1.2 -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Last revised 18 July 2004 -~~~~~~~~~~~~~~~~~~~~~~~~~ - -1. Background -2. Compiling, installing and configuring -3. Valgrind aborts unexpectedly -4. Valgrind behaves unexpectedly -5. Memcheck doesn't find my bug -6. Miscellaneous - - ------------------------------------------------------------------ -1. Background ------------------------------------------------------------------ - -1.1. How do you pronounce "Valgrind"? - -The "Val" as in the world "value". The "grind" is pronounced with a -short 'i' -- ie. "grinned" (rhymes with "tinned") rather than "grined" -(rhymes with "find"). - -Don't feel bad: almost everyone gets it wrong at first. - ------------------------------------------------------------------ - -1.2. Where does the name "Valgrind" come from? - -From Nordic mythology. Originally (before release) the project was -named Heimdall, after the watchman of the Nordic gods. He could "see a -hundred miles by day or night, hear the grass growing, see the wool -growing on a sheep's back" (etc). This would have been a great name, -but it was already taken by a security package "Heimdal". - -Keeping with the Nordic theme, Valgrind was chosen. Valgrind is the -name of the main entrance to Valhalla (the Hall of the Chosen Slain in -Asgard). Over this entrance there resides a wolf and over it there is -the head of a boar and on it perches a huge eagle, whose eyes can see to -the far regions of the nine worlds. Only those judged worthy by the -guardians are allowed to pass through Valgrind. All others are refused -entrance. - -It's not short for "value grinder", although that's not a bad guess. - - ------------------------------------------------------------------ -2. Compiling, installing and configuring ------------------------------------------------------------------ - -2.1. When I trying building Valgrind, 'make' dies partway with an - assertion failure, something like this: make: expand.c:489: - =20 - allocated_variable_append: Assertion=20 - `current_variable_set_list->next !=3D 0' failed. - =20 -It's probably a bug in 'make'. Some, but not all, instances of version = 3.79.1 -have this bug, see www.mail-archive.com/bug...@gn.../msg01658.html. = Try -upgrading to a more recent version of 'make'. Alternatively, we have he= ard -that unsetting the CFLAGS environment variable avoids the problem. - - ------------------------------------------------------------------ -3. Valgrind aborts unexpectedly ------------------------------------------------------------------ - -3.1. Programs run OK on Valgrind, but at exit produce a bunch of errors = a bit - like this - - =3D=3D20755=3D=3D Invalid read of size 4 - =3D=3D20755=3D=3D at 0x40281C8A: _nl_unload_locale (loadlocale.c:= 238) - =3D=3D20755=3D=3D by 0x4028179D: free_mem (findlocale.c:257) - =3D=3D20755=3D=3D by 0x402E0962: __libc_freeres (set-freeres.c:34= ) - =3D=3D20755=3D=3D by 0x40048DCC: vgPlain___libc_freeres_wrapper=20 - (vg_clientfuncs.c:585) - =3D=3D20755=3D=3D Address 0x40CC304C is 8 bytes inside a block of= size 380 free'd - =3D=3D20755=3D=3D at 0x400484C9: free (vg_clientfuncs.c:180) - =3D=3D20755=3D=3D by 0x40281CBA: _nl_unload_locale (loadlocale.c:= 246) - =3D=3D20755=3D=3D by 0x40281218: free_mem (setlocale.c:461) - =3D=3D20755=3D=3D by 0x402E0962: __libc_freeres (set-freeres.c:34= ) - - and then die with a segmentation fault. - -When the program exits, Valgrind runs the procedure __libc_freeres() in -glibc. This is a hook for memory debuggers, so they can ask glibc to -free up any memory it has used. Doing that is needed to ensure that -Valgrind doesn't incorrectly report space leaks in glibc. - -Problem is that running __libc_freeres() in older glibc versions causes -this crash. =20 - -WORKAROUND FOR 1.1.X and later versions of Valgrind: use the ---run-libc-freeres=3Dno flag. You may then get space leak reports for -glibc-allocations (please _don't_ report these to the glibc people, -since they are not real leaks), but at least the program runs. - ------------------------------------------------------------------ - -3.2. My (buggy) program dies like this: - valgrind: vg_malloc2.c:442 (bszW_to_pszW):=20 - Assertion `pszW >=3D 0' failed. - -If Memcheck (the memory checker) shows any invalid reads, invalid writes -and invalid frees in your program, the above may happen. Reason is that -your program may trash Valgrind's low-level memory manager, which then -dies with the above assertion, or something like this. The cure is to -fix your program so that it doesn't do any illegal memory accesses. The -above failure will hopefully go away after that. - ------------------------------------------------------------------ - -3.3. My program dies, printing a message like this along the way:=20 - - disInstr: unhandled instruction bytes: 0x66 0xF 0x2E 0x5 - -Older versions did not support some x86 instructions, particularly -SSE/SSE2 instructions. Try a newer Valgrind; we now support almost all -instructions. If it still happens with newer versions, if the failing -instruction is an SSE/SSE2 instruction, you might be able to recompile -your program without it by using the flag -march to gcc. Either way, -let us know and we'll try to fix it. - -Another possibility is that your program has a bug and erroneously jumps -to a non-code address, in which case you'll get a SIGILL signal. -Memcheck/Addrcheck may issue a warning just before this happens, but the= y -might not if the jump happens to land in addressable memory. - - ------------------------------------------------------------------ -4. Valgrind behaves unexpectedly ------------------------------------------------------------------ - -4.1. My threaded server process runs unbelievably slowly on Valgrind. - So slowly, in fact, that at first I thought it had completely - locked up. - -We are not completely sure about this, but one possibility is that -laptops with power management fool Valgrind's timekeeping mechanism, -which is (somewhat in error) based on the x86 RDTSC instruction. A -"fix" which is claimed to work is to run some other cpu-intensive -process at the same time, so that the laptop's power-management -clock-slowing does not kick in. We would be interested in hearing more -feedback on this. - -Another possible cause is that versions prior to 1.9.6 did not support -threading on glibc 2.3.X systems well. Hopefully the situation is much -improved with 1.9.6 and later versions. - ------------------------------------------------------------------ - -4.2. My program uses the C++ STL and string classes. Valgrind - reports 'still reachable' memory leaks involving these classes - at the exit of the program, but there should be none. - -First of all: relax, it's probably not a bug, but a feature. Many -implementations of the C++ standard libraries use their own memory pool -allocators. Memory for quite a number of destructed objects is not -immediately freed and given back to the OS, but kept in the pool(s) for -later re-use. The fact that the pools are not freed at the exit() of -the program cause Valgrind to report this memory as still reachable. -The behaviour not to free pools at the exit() could be called a bug of -the library though. - -Using gcc, you can force the STL to use malloc and to free memory as -soon as possible by globally disabling memory caching. Beware! Doing -so will probably slow down your program, sometimes drastically. - -- With gcc 2.91, 2.95, 3.0 and 3.1, compile all source using the STL - with -D__USE_MALLOC. Beware! This is removed from gcc starting with - version 3.3. - -- With gcc 3.2.2 and later, you should export the environment variable - GLIBCPP_FORCE_NEW before running your program. - -- With gcc 3.4 and later, that variable has changed name to - GLIBCXX_FORCE_NEW. - -There are other ways to disable memory pooling: using the malloc_alloc -template with your objects (not portable, but should work for gcc) or -even writing your own memory allocators. But all this goes beyond the -scope of this FAQ. Start by reading -http://gcc.gnu.org/onlinedocs/libstdc++/ext/howto.html#3 if you -absolutely want to do that. But beware: - -1) there are currently changes underway for gcc which are not totally - reflected in the docs right now ("now" =3D=3D 26 Apr 03) - -2) allocators belong to the more messy parts of the STL and people went - at great lengths to make it portable across platforms. Chances are - good that your solution will work on your platform, but not on - others. - -------------------------------------------------------------------------= ----- -4.3. The stack traces given by Memcheck (or another tool) aren't helpful= . - How can I improve them? - -If they're not long enough, use --num-callers to make them longer. - -If they're not detailed enough, make sure you are compiling with -g to a= dd -debug information. And don't strip symbol tables (programs should be -unstripped unless you run 'strip' on them; some libraries ship stripped= ). - -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= . - -Some example sub-traces: - - With debug information and unstripped (best): - - Invalid write of size 1 - at 0x80483BF: really (malloc1.c:20) - by 0x8048370: main (malloc1.c:9) - - With no debug information, unstripped: - - Invalid write of size 1 - at 0x80483BF: really (in /auto/homes/njn25/grind/head5/a.out) - by 0x8048370: main (in /auto/homes/njn25/grind/head5/a.out) - - With no debug information, stripped: - - Invalid write of size 1 - at 0x80483BF: (within /auto/homes/njn25/grind/head5/a.out) - by 0x8048370: (within /auto/homes/njn25/grind/head5/a.out) - by 0x42015703: __libc_start_main (in /lib/tls/libc-2.3.2.so) - by 0x80482CC: (within /auto/homes/njn25/grind/head5/a.out) - - With debug information and -fomit-frame-pointer: - - Invalid write of size 1 - at 0x80483C4: really (malloc1.c:20) - by 0x42015703: __libc_start_main (in /lib/tls/libc-2.3.2.so) - by 0x80482CC: ??? (start.S:81) - - 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) - -------------------------------------------------------------------------= ----- -4.4. The stack traces given by Memcheck (or another tool) seem to - have the wrong function name in them. What's happening? - -Occasionally Valgrind stack traces get the wrong function names. -This is caused by glibc using aliases to effectively give one function -two names. Most of the time Valgrind chooses a suitable name, but -very occasionally it gets it wrong. - -Examples we know of are printing 'bcmp' instead of 'memcmp', 'index' -instead of 'strchr', and 'rindex' instead of 'strrchr'. - ------------------------------------------------------------------ -5. Memcheck doesn't find my bug ------------------------------------------------------------------ - -5.1. I try running "valgrind --tool=3Dmemcheck my_program" and get - Valgrind's startup message, but I don't get any errors and I know - my program has errors. - -There are two possible causes of this. - =20 -First, by default, Valgrind only traces the top-level process. So if yo= ur -program spawns children, they won't be traced by Valgrind by default. -Also, if your program is started by a shell script, Perl script, or -something similar, Valgrind will trace the shell, or the Perl -interpreter, or equivalent. - -To trace child processes, use the --trace-children=3Dyes option. - -If you are tracing large trees of processes, it can be less disruptive -to have the output sent over the network. Give Valgrind the flag ---log-socket=3D127.0.0.1:12345 (if you want logging output sent to port -12345 on localhost). You can use the valgrind-listener program to -listen on that port: - - valgrind-listener 12345=20 - =20 -Obviously you have to start the listener process first. See the -documentation for more details. - -Second, if your program is statically linked, most Valgrind tools won't -work as well, because they won't be able to replace certain functions, -such as malloc(), with their own versions. A key indicator of this is -if Memcheck says: - - No malloc'd blocks -- no leaks are possible - -when you know your program calls malloc(). The workaround is to avoid -statically linking your program. - ------------------------------------------------------------------ - -5.2. Why doesn't Memcheck find the array overruns in this program? - - int static[5]; - - int main(void) - { - int stack[5]; - - static[5] =3D 0; - stack [5] =3D 0; - =20 - return 0; - } - -Unfortunately, Memcheck doesn't do bounds checking on static or stack -arrays. We'd like to, but it's just not possible to do in a reasonable -way that fits with how Memcheck works. Sorry. - - ------------------------------------------------------------------ -6. Miscellaneous ------------------------------------------------------------------ - -6.1. I tried writing a suppression but it didn't work. Can you=20 - write my suppression for me? - -Yes! Use the --gen-suppressions=3Dyes feature to spit out suppressions -automatically for you. You can then edit them if you like, eg. -combining similar automatically generated suppressions using wildcards -like '*'. - -If you really want to write suppressions by hand, read the manual -carefully. Note particularly that C++ function names must be _mangled_. - ------------------------------------------------------------------ - -6.2. With Memcheck/Addrcheck's memory leak detector, what's the - difference between "definitely lost", "possibly lost", "still - reachable", and "suppressed"? - -The details are in section 3.6 of the manual. - -In short: - - - "definitely lost" means your program is leaking memory -- fix it! - - - "possibly lost" means your program is probably leaking memory, - unless you're doing funny things with pointers. - - - "still reachable" means your program is probably ok -- it didn't - free some memory it could have. This is quite common and often - reasonable. Don't use --show-reachable=3Dyes if you don't want to s= ee - these reports. - - - "suppressed" means that a leak error has been suppressed. There are - some suppressions in the default suppression files. You can ignore - suppressed errors. - ------------------------------------------------------------------ - -(this is the end of the FAQ.) Modified: trunk/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/Makefile.am 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/Makefile.am 2005-09-30 01:43:32 UTC (rev 4830) @@ -42,7 +42,6 @@ @PERL@ tests/vg_regtest $(TOOLS) =20 EXTRA_DIST =3D \ - FAQ.txt \ ACKNOWLEDGEMENTS \ README_DEVELOPERS \ README_PACKAGERS \ Modified: trunk/docs/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/docs/Makefile.am 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/Makefile.am 2005-09-30 01:43:32 UTC (rev 4830) @@ -7,7 +7,7 @@ # Comment out the next line to skip building print docs. The default # is not to skip building print docs. Note, after changing it # you of course need to re-run configure to make it take effect. -BUILD_ALL_DOCS=3Dyes +BUILD_ALL_DOCS=3Dno =20 ##------------------------------------------------------------- ## END OF HACK @@ -44,18 +44,24 @@ =20 # stylesheet processor XSLTPROC =3D xsltproc -XSLTPROC_FLAGS =3D --nonet --xinclude=20 +XSLTPROC_FLAGS =3D --xinclude=20 =20 # stylesheets XSL_HTML_CHUNK_STYLE =3D $(mylibdir)/vg-html-chunk.xsl XSL_HTML_SINGLE_STYLE =3D $(mylibdir)/vg-html-single.xsl XSL_FO_STYLE =3D $(mylibdir)/vg-fo.xsl =20 -all-docs: html-docs print-docs +all-docs: FAQ.txt html-docs print-docs =20 valid: $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/index.xml =20 +# The text version of the FAQ. +FAQ.txt: $(myxmldir)/FAQ.xml $(myxmldir)/vg-entities.xml $(mylibdir)/*.x= slt + $(XSLTPROC) $(XSLTPROC_FLAGS) $(mylibdir)/untag-inline.xslt $(myxmldir)= /FAQ.xml | \ + $(XSLTPROC) $(XSLTPROC_FLAGS) $(mylibdir)/docbook2text.xslt - > FAQ.txt +=09 + # chunked html html-docs: @echo "Generating html files..." @@ -113,14 +119,17 @@ # This is done at 'make dist' time. It builds the html and print docs # and copies them into the docs/ directory in the tarball. ifeq ($(BUILD_ALL_DOCS),yes) -dist-hook: html-docs print-docs +dist-hook: FAQ.txt html-docs print-docs cp -r html $(distdir) + cp FAQ.txt $(distdir)/.. cp print/index.pdf $(distdir) cp print/index.ps $(distdir) else -dist-hook: html-docs +dist-hook: FAQ.txt html-docs + cp FAQ.txt $(distdir)/.. cp -r html $(distdir) endif =20 distclean-local: rm -rf html print + rm -f $(top_builddir)/FAQ.txt Modified: trunk/docs/README =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/README 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/README 2005-09-30 01:43:32 UTC (rev 4830) @@ -178,12 +178,6 @@ - http://cvs.sourceforge.net/viewcvs.py/perl-xml/perl-xml-faq/ =20 =20 -TODO CRUCIAL: -------------- -- Need to generate text FAQ from the valgrind/docs/xml/FAQ.xml (done at = 'make - dist' time along with the HTML docs using the "dist-hook"), and remove= the - old text FAQ which is in valgrind/. - TODO LESS CRUCIAL: ------------------ - add the HOWTO doc? Modified: trunk/docs/lib/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/docs/lib/Makefile.am 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/lib/Makefile.am 2005-09-30 01:43:32 UTC (rev 4830) @@ -1,6 +1,16 @@ EXTRA_DIST =3D \ + README_XML2TXT.txt \ + copy.xslt \ + text.justify.xslt \ + docbook2text.xslt \ + text.wrap.xslt \ + str.dup.xslt \ + untag-inline.xslt \ + str.find-last.xslt \ vg-common.xsl \ vg-fo.xsl \ vg-html-chunk.xsl \ vg-html-single.xsl \ vg_basic.css + +=09 Added: trunk/docs/lib/README_XML2TXT.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/docs/lib/README_XML2TXT.txt 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/lib/README_XML2TXT.txt 2005-09-30 01:43:32 UTC (rev 4830) @@ -0,0 +1,59 @@ +README.txt file for the FAQ.xml to FAQ.txt transformer. +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D + +In valgrind-3.1.SVN, file docs/README contains, under the heading +"TODO CRUCIAL", the item "Need to generate text FAQ from the +valgrind/docs/xml/FAQ.xml (done at 'make dist' time along with the +HTML docs using the 'dist-hook'), and remove the old text FAQ which is +in valgrind/." This is an attempt to resolve this item using xsltproc +and a number of xml style sheets. It is a hack in the sense that it +does not support all of docbook, but only the subset currently used by +file docs/xml/FAQ.xml. + +The transformation is done in two stages: + +1. Inline elements (literal, computeroutput and ulink) are replaced + with the corresponding text by stylesheet untag-inline.xslt. This + stylesheet uses copy.xslt to handle the non-inline elements. + +2. The actual formatting is done by stylesheet docbook2text.xslt. It + uses stylesheets str.dup.xslt, str.find-last.xslt, + text.justify.xslt and text.wrap.xslt to handle the formatting of + the text into a column with the approproate width and indentation. + +Stylesheets untag-inline.xslt and docbook2text.xslt are original +work. Stylesheets copy.xslt, str.dup.xslt, str.find-last.xslt, +text.justify.xslt and text.wrap.xslt are copied with some adaptations +from the examples supplied with the XSLT Cookbook by Sal Mangano, (C) +2003 O'Reilly & Associates, ISBN 0-596-00372-2. The O'Reilly Policy on +Re-Use of Code Examples from Books +<http://www.oreilly.com/pub/a/oreilly/ask_tim/2001/codepolicy.html> +allows the use of these style sheets in valgrind for this purpose. + +The tarball contains: + +- File README.txt (this file). + +- the stylesheets copy.xslt, docbook2text.xslt, str.dup.xslt, + str.find-last.xslt, text.justify.xslt, text.wrap.xslt and + untag-inline.xslt. + +- File faq.txt.patch adds the generation of FAQ.txt to file + docs/Makefile.am. It is based on the assumptions that + * file FAQ.txt will be generated in directory docs. + * the stylesheets will be stored in directory docs/lib. + If a different output width is required (e.g. 80), you can use + command=20 + $(XSLTPROC) $(XSLTPROC_FLAGS) $(libdir)/untag-inline.xslt $(xmldir)/= FAQ.xml | \ + $(XSLTPROC) $(XSLTPROC_FLAGS) --stringparam width 80 $(libdir)/docbo= ok2text.xslt - > FAQ.txt + +- File FAQ.txt as generated on my system (Debian 3.1). + +Software used: +xsltproc was compiled against libxml 20616, libxslt 10112 and libexslt 8= 10 +libxslt 10112 was compiled against libxml 20616 +libexslt 810 was compiled against libxml 20616 + + +Copyright 2005 Jeroen N. Witmond, jn...@xs... +GNU GENERAL PUBLIC LICENSE Version 2, June 1991 applies. Added: trunk/docs/lib/copy.xslt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/lib/copy.xslt 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/lib/copy.xslt 2005-09-30 01:43:32 UTC (rev 4830) @@ -0,0 +1,16 @@ +<?xml version=3D"1.0" encoding=3D"UTF-8"?> +<xsl:stylesheet version=3D"1.0" xmlns:xsl=3D"http://www.w3.org/1999/XSL/= Transform"> + +<!-- This file was copied with some adaptations from the examples +supplied with the XSLT Cookbook by Sal Mangano, (C) 2003 O'Reilly & +Associates, ISBN 0-596-00372-2. --> + +<xsl:output method=3D"xml"/> + +<xsl:template match=3D"/ | node() | @* | comment() | processing-instruct= ion()"> + <xsl:copy> + <xsl:apply-templates select=3D"node() | @*"/> + </xsl:copy> +</xsl:template> + +</xsl:stylesheet> Added: trunk/docs/lib/docbook2text.xslt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/lib/docbook2text.xslt 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/lib/docbook2text.xslt 2005-09-30 01:43:32 UTC (rev 4830) @@ -0,0 +1,317 @@ +<?xml version=3D"1.0" encoding=3D"UTF-8"?> <!-- -*- sgml -*- --> +<xsl:stylesheet version=3D"1.0" xmlns:xsl=3D"http://www.w3.org/1999/XSL/= Transform" + xmlns:text=3D"http://www.ora.com/XSLTCookbook/namespaces/text" + xmlns:str=3D"http://www.ora.com/XSLTCookbook/namespaces/strings"> + +<xsl:include href=3D"text.wrap.xslt"/> + +<xsl:strip-space elements=3D"*"/> +<xsl:preserve-space elements=3D"screen programlisting"/> +<xsl:output method=3D"text"/> + +<!-- Transform a subset of docbook/xml into plain text. This --> +<!-- stylesheet assumes that all elements that are to be formatted --> +<!-- inline already have been handled by untag-inline.xslt. --> + +<!-- Maximum number of characters on one line. -->=20 +<xsl:param name=3D"width" select=3D"72"/> + +<!-- This stylesheet uses two named templates. The template named --> +<!-- "header" writes its input, followed by a line of '~'s of --> +<!-- the same length. The template named "ruler" produces a line of --> +<!-- $width '-'s. They are implemented at the bottom of this file. --> + +<xsl:template match=3D"/"> + <!-- Title 'page' stuff. --> + <xsl:call-template name=3D"header"> + <xsl:with-param name=3D"input" select=3D"book/title"/> + </xsl:call-template> + + <xsl:call-template name=3D"header"> + <xsl:with-param name=3D"input" select=3D"book/bookinfo/releaseinfo"/= > + </xsl:call-template> + <xsl:text>
</xsl:text> + + <!-- List of sections. --> + <xsl:text>Table of Contents
</xsl:text> + <xsl:apply-templates select=3D"book/sect1" mode=3D"toc"/> + <xsl:text>
</xsl:text> + + <!-- Contents. --> + <xsl:apply-templates select=3D"book/sect1"/> +</xsl:template> + +<xsl:template match=3D"sect1" mode=3D"toc"> + <xsl:value-of select=3D"position()"/> + <xsl:text>. </xsl:text> + <xsl:value-of select=3D"title"/> + <xsl:text>
</xsl:text> +</xsl:template> + +<!-- Processing of the contents starts here. --> + +<xsl:template match=3D"sect1"> + <!-- The FAQ contains two types of sect1: those containing a + qandaset (actually an unspecified number), and those containing a + sequence of paras. To get the number of blank lines right, these + must be treated separately. --> + + <xsl:variable name=3D"sectno" select=3D"position()"/> + + <xsl:call-template name=3D"ruler"/> + <xsl:value-of select=3D"$sectno"/> + <xsl:text>. </xsl:text> + <xsl:value-of select=3D"title"/> + <xsl:text>
</xsl:text> + <xsl:call-template name=3D"ruler"/> + <xsl:text>
</xsl:text> + + <xsl:choose> + <xsl:when test=3D"qandaset"> + <xsl:apply-templates select=3D"qandaset|para"> + <xsl:with-param name=3D"sectno" select=3D"$sectno"/> + </xsl:apply-templates> + </xsl:when> + + <xsl:when test=3D"para"> + <xsl:for-each select=3D"para|screen|programlisting|itemizedlist|or= deredlist"> + <xsl:apply-templates select=3D"."/> + + <xsl:if test=3D"position() !=3D last()"> + <xsl:text>
</xsl:text> + </xsl:if> + </xsl:for-each> + </xsl:when> + + <!-- Oops. sect1 contains elements we do not yet handle. --> + <xsl:otherwise> + <xsl:message>template match=3D"sect1": Encountered + <<xsl:value-of select=3D"name(.)"/>>.</xsl:message> + </xsl:otherwise> + </xsl:choose> + + <xsl:text>
</xsl:text> +</xsl:template> + +<xsl:template match=3D"qandaset"> + <xsl:param name=3D"sectno"/> + + <xsl:apply-templates select=3D"qandaentry"> + <xsl:with-param name=3D"sectno" select=3D"$sectno"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match=3D"qandaentry"> + <xsl:param name=3D"sectno"/> + + <xsl:variable name=3D"questno" select=3D"position()"/> + + <xsl:variable name=3D"prefix"> + <xsl:value-of select=3D"$sectno"/> + <xsl:text>.</xsl:text> + <xsl:value-of select=3D"$questno"/> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:variable name=3D"prefix-length" select=3D"string-length($prefix)"= /> + + <xsl:if test=3D"$questno > 1"> + <xsl:text>
</xsl:text> + <xsl:call-template name=3D"ruler"/> + <xsl:text>
</xsl:text> + </xsl:if> + + <xsl:apply-templates select=3D"question"> + <xsl:with-param name=3D"prefix" select=3D"$prefix"/> + <xsl:with-param name=3D"indent" select=3D"$prefix-length"/> + </xsl:apply-templates> + + <xsl:text>
</xsl:text> + + <xsl:apply-templates select=3D"answer"/> +</xsl:template> + +<xsl:template match=3D"question"> + <xsl:param name=3D"prefix"/> + <xsl:param name=3D"indent" select=3D"0"/> + + <xsl:for-each select=3D"para|screen|programlisting"> + <xsl:choose> + <xsl:when test=3D"position() =3D 1 and $prefix"> + <xsl:value-of select=3D"$prefix"/> + <xsl:apply-templates select=3D"."> + <xsl:with-param name=3D"indent" select=3D"$indent"/> + <xsl:with-param name=3D"dofirst" select=3D"0"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select=3D"."> + <xsl:with-param name=3D"indent" select=3D"$indent"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test=3D"position() !=3D last()"> + <xsl:text>
</xsl:text> + </xsl:if> + </xsl:for-each> +</xsl:template> + +<xsl:template match=3D"answer"> + <xsl:param name=3D"indent" select=3D"0"/> + + <xsl:for-each select=3D"para|screen|programlisting|itemizedlist|ordere= dlist"> + <xsl:apply-templates select=3D"."> + <xsl:with-param name=3D"indent" select=3D"$indent"/> + </xsl:apply-templates> + + <xsl:if test=3D"position() !=3D last()"> + <xsl:text>
</xsl:text> + </xsl:if> + </xsl:for-each> +</xsl:template> + +<xsl:template match=3D"para"> + <xsl:param name=3D"indent" select=3D"0"/> + <xsl:param name=3D"dofirst" select=3D"1"/> + + <xsl:for-each select=3D"node()"> + <xsl:choose> + <!-- Lists and blocks as children. --> + <xsl:when test=3D"self::screen|self::programlisting| + self::itemizedlist|self::orderedlist"> + <xsl:apply-templates select=3D"."> + <xsl:with-param name=3D"indent" select=3D"$indent"/> + </xsl:apply-templates> + + <xsl:if test=3D"position() !=3D last()"> + <xsl:text>
</xsl:text> + </xsl:if> + </xsl:when> + + <!-- Text. Inline elements have been flattened by + untag-inline.xslt. --> + <xsl:when test=3D"self::text()"> + <xsl:choose> + <xsl:when test=3D"position() =3D 1 and $dofirst =3D 0"> + <xsl:apply-templates select=3D"." mode=3D"text:wrap"> + <xsl:with-param name=3D"width" select=3D"$width"/> + <xsl:with-param name=3D"indent" select=3D"$indent"/> + <xsl:with-param name=3D"dofirst" select=3D"0"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select=3D"." mode=3D"text:wrap"> + <xsl:with-param name=3D"width" select=3D"$width"/> + <xsl:with-param name=3D"indent" select=3D"$indent"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <!-- Oops. para contains elements we do not yet handle. --> + <xsl:otherwise> + <xsl:message>template match=3D"para": Encountered + <<xsl:value-of select=3D"name(.)"/>>.</xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> +</xsl:template> + +<xsl:template match=3D"screen|programlisting"> + <xsl:param name=3D"indent" select=3D"0"/> + <xsl:param name=3D"dofirst" select=3D"1"/><!-- ignored. --> + + <xsl:variable name=3D"myindent" select=3D" $indent + 2 " /> + + <xsl:apply-templates select=3D"." mode=3D"text:dump"> + <xsl:with-param name=3D"input" select=3D"text()"/> + <xsl:with-param name=3D"indent" select=3D"$myindent"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match=3D"itemizedlist"> + <xsl:param name=3D"indent" select=3D"0"/> + + <xsl:variable name=3D"prefix" select=3D" '* ' "/> + <xsl:variable name=3D"prefix-length" select=3D"string-length($prefix)"= /> + + <xsl:for-each select=3D"listitem"> + <xsl:apply-templates select=3D"."> + <xsl:with-param name=3D"prefix" select=3D"$prefix"/> + <xsl:with-param name=3D"indent" select=3D"$prefix-length"/> + </xsl:apply-templates> + + <xsl:if test=3D"position() !=3D last()"> + <xsl:text>
</xsl:text> + </xsl:if> + </xsl:for-each> +</xsl:template> + +<xsl:template match=3D"orderedlist"> + <xsl:param name=3D"indent" select=3D"0"/> + + <xsl:for-each select=3D"listitem"> + <xsl:variable name=3D"prefix"> + <xsl:value-of select=3D"position()"/> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:variable name=3D"prefix-length" select=3D"string-length($prefix= )"/> + + <xsl:apply-templates select=3D"."> + <xsl:with-param name=3D"prefix" select=3D"$prefix"/> + <xsl:with-param name=3D"indent" select=3D"$prefix-length"/> + </xsl:apply-templates> + + <xsl:if test=3D"position() !=3D last()"> + <xsl:text>
</xsl:text> + </xsl:if> + </xsl:for-each> +</xsl:template> + +<xsl:template match=3D"listitem"> + <xsl:param name=3D"prefix"/> + <xsl:param name=3D"indent" select=3D"0"/> + + <xsl:for-each select=3D"para|screen|programlisting"> + <xsl:choose> + <xsl:when test=3D"position() =3D 1 and $prefix"> + <xsl:value-of select=3D"$prefix"/> + <xsl:apply-templates select=3D"."> + <xsl:with-param name=3D"indent" select=3D"$indent"/> + <xsl:with-param name=3D"dofirst" select=3D"0"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select=3D"."> + <xsl:with-param name=3D"indent" select=3D"$indent"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> +</xsl:template> + +<!-- Named utility templates. --> + +<xsl:template name=3D"header"> + <xsl:param name=3D"input" select=3D"0"/> + <xsl:variable name=3D"input-length" select=3D"string-length($input)"/> + + <xsl:value-of select=3D"$input"/> + <xsl:text>
</xsl:text> + + <xsl:call-template name=3D"str:dup"> + <xsl:with-param name=3D"input" select=3D" '~' "/> + <xsl:with-param name=3D"count" select=3D"$input-length"/> + </xsl:call-template> + <xsl:text>
</xsl:text> +</xsl:template> + +<xsl:template name=3D"ruler"> + <xsl:call-template name=3D"str:dup"> + <xsl:with-param name=3D"input" select=3D" '-' "/> + <xsl:with-param name=3D"count" select=3D"$width"/> + </xsl:call-template> + <xsl:text>
</xsl:text> +</xsl:template> + +</xsl:stylesheet> Added: trunk/docs/lib/str.dup.xslt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/lib/str.dup.xslt 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/lib/str.dup.xslt 2005-09-30 01:43:32 UTC (rev 4830) @@ -0,0 +1,33 @@ +<?xml version=3D"1.0" encoding=3D"UTF-8"?> +<xsl:stylesheet version=3D"1.0" xmlns:xsl=3D"http://www.w3.org/1999/XSL/= Transform" + xmlns:str=3D"http://www.ora.com/XSLTCookbook/namespaces/strings"> + +<!-- This file was copied with some adaptations from the examples +supplied with the XSLT Cookbook by Sal Mangano, (C) 2003 O'Reilly & +Associates, ISBN 0-596-00372-2. --> + + <xsl:template name=3D"str:dup"> + <xsl:param name=3D"input"/> + <xsl:param name=3D"count" select=3D"1"/> + + <xsl:choose> + <xsl:when test=3D"not($count) or not($input)"/> + <xsl:when test=3D"$count =3D 1"> + <xsl:value-of select=3D"$input"/> + </xsl:when> + <xsl:otherwise> + <!-- If $count is odd append an extra copy of input --> + <xsl:if test=3D"$count mod 2"> + <xsl:value-of select=3D"$input"/> + </xsl:if> + <!-- Recursively apply template after doubling input and=20 + halving count --> + <xsl:call-template name=3D"str:dup"> + <xsl:with-param name=3D"input" select=3D"concat($input,$input)= "/> + <xsl:with-param name=3D"count" select=3D"floor($count div 2)"/= > + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + +</xsl:stylesheet> Added: trunk/docs/lib/str.find-last.xslt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/lib/str.find-last.xslt 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/lib/str.find-last.xslt 2005-09-30 01:43:32 UTC (rev 4830) @@ -0,0 +1,157 @@ +<?xml version=3D"1.0" encoding=3D"UTF-8"?> +<xsl:stylesheet version=3D"1.0" xmlns:xsl=3D"http://www.w3.org/1999/XSL/= Transform" id=3D"str.find-last" + xmlns:str=3D"http://www.ora.com/XSLTCookbook/namespaces/strings" exten= sion-element-prefixes=3D"str"> + +<!-- This file was copied with some adaptations from the examples +supplied with the XSLT Cookbook by Sal Mangano, (C) 2003 O'Reilly & +Associates, ISBN 0-596-00372-2. --> + +<xsl:template name=3D"str:substring-before-last">=20 + <xsl:param name=3D"input"/> + <xsl:param name=3D"substr"/> + =20 + <xsl:if test=3D"$substr and contains($input, $substr)"> + <xsl:variable name=3D"temp" select=3D"substring-after($input, $subst= r)" /> + <xsl:value-of select=3D"substring-before($input, $substr)" /> + <xsl:if test=3D"contains($temp, $substr)"> + <xsl:value-of select=3D"$substr" /> + <xsl:call-template name=3D"str:substring-before-last"> + <xsl:with-param name=3D"input" select=3D"$temp" /> + <xsl:with-param name=3D"substr" select=3D"$substr" /> + </xsl:call-template> + </xsl:if> + </xsl:if> + =20 +</xsl:template> + + +<xsl:template name=3D"str:substring-after-last"> + <xsl:param name=3D"input"/> + <xsl:param name=3D"substr"/> + =20 + <!-- Extract the string which comes after the first occurence --> + <xsl:variable name=3D"temp" select=3D"substring-after($input,$substr)"= /> + =20 + <xsl:choose> + <xsl:when test=3D"$substr and contains($temp,$substr)"> + <xsl:call-template name=3D"str:substring-after-last"> + <xsl:with-param name=3D"input" select=3D"$temp"/> + <xsl:with-param name=3D"substr" select=3D"$substr"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select=3D"$temp"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template>=20 + + +<xsl:template match=3D"xsl:stylesheet[@id=3D'str.find-last'] | xsl:inclu= de[@href=3D'str.find-last.xslt'] " > +<tests> + +<!-- before --> + <test name=3D"str:substring-before-last with no occurences of yes"> + <xsl:call-template name=3D"str:substring-before-last"> + <xsl:with-param name=3D"input" select=3D" 'No occurences' "/> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> +=09 + <test name=3D"str:substring-before-last starts with yes"> + <xsl:call-template name=3D"str:substring-before-last"> + <xsl:with-param name=3D"input" select=3D" 'yes occurences' "/> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> + + <test name=3D"str:substring-before-last starts with yes and ends with y= es"> + <xsl:call-template name=3D"str:substring-before-last"> + <xsl:with-param name=3D"input" select=3D" 'yes occurences yes' "/> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> + + <test name=3D"str:substring-before-last 3 yes"> + <xsl:call-template name=3D"str:substring-before-last"> + <xsl:with-param name=3D"input" select=3D" 'yesyesyes' "/> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> + <test name=3D"str:substring-before-last empty input"> + <xsl:call-template name=3D"str:substring-before-last"> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> +=09 + <test name=3D"str:substring-before-last empty search"> + <xsl:call-template name=3D"str:substring-before-last"> + <xsl:with-param name=3D"input" select=3D" 'No occurences' "/> + </xsl:call-template> + + </test> + + <test name=3D"str:substring-before-last large"> + <xsl:call-template name=3D"str:substring-before-last"> + <xsl:with-param name=3D"input" select=3D" 'yesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes= yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesy= esyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesye= syesyesyesyesyesyesyesyesyesyesyes' "/> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + + + </test> + +<!-- after --> + + <test name=3D"str:substring-after-last with no occurences of yes"> + <xsl:call-template name=3D"str:substring-after-last"> + <xsl:with-param name=3D"input" select=3D" 'No occurences' "/> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> +=09 + <test name=3D"str:substring-after-last starts with yes"> + <xsl:call-template name=3D"str:substring-after-last"> + <xsl:with-param name=3D"input" select=3D" 'yes occurences' "/> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> + + <test name=3D"str:substring-after-last starts with yes and ends with ye= s"> + <xsl:call-template name=3D"str:substring-after-last"> + <xsl:with-param name=3D"input" select=3D" 'yes occurences yes' "/> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> + + <test name=3D"str:substring-after-last 3 yes"> + <xsl:call-template name=3D"str:substring-after-last"> + <xsl:with-param name=3D"input" select=3D" 'yesyesyes' "/> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> + + <test name=3D"str:substring-after-last 3 yes then no"> + <xsl:call-template name=3D"str:substring-after-last"> + <xsl:with-param name=3D"input" select=3D" 'yesyesyesno' "/> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> +=09 + <test name=3D"str:substring-after-last empty input"> + <xsl:call-template name=3D"str:substring-after-last"> + <xsl:with-param name=3D"substr" select=3D" 'yes' "/> + </xsl:call-template> + </test> +=09 + <test name=3D"str:substring-after-last empty search"> + <xsl:call-template name=3D"str:substring-after-last"> + <xsl:with-param name=3D"input" select=3D" 'No occurences' "/> + </xsl:call-template> + + </test> + +</tests> +</xsl:template> + + <xsl:template match=3D"text()"/> + =20 +</xsl:stylesheet> Added: trunk/docs/lib/text.justify.xslt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/lib/text.justify.xslt 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/lib/text.justify.xslt 2005-09-30 01:43:32 UTC (rev 4830) @@ -0,0 +1,50 @@ +<?xml version=3D"1.0" encoding=3D"UTF-8"?> +<xsl:stylesheet version=3D"1.0" xmlns:xsl=3D"http://www.w3.org/1999/XSL/= Transform" + xmlns:str=3D"http://www.ora.com/XSLTCookbook/namespaces/strings" + xmlns:text=3D"http://www.ora.com/XSLTCookbook/namespaces/text" extensi= on-element-prefixes=3D"text"> + +<!-- This file was copied with some adaptations from the examples +supplied with the XSLT Cookbook by Sal Mangano, (C) 2003 O'Reilly & +Associates, ISBN 0-596-00372-2. --> + +<xsl:include href=3D"str.dup.xslt"/> + +<xsl:template name=3D"text:justify"> + <xsl:param name=3D"value" />=20 + <xsl:param name=3D"width" select=3D"10"/> + <xsl:param name=3D"align" select=3D" 'left' "/> + + <!-- Truncate if too long --> =20 + <xsl:variable name=3D"output" select=3D"substring($value,1,$width)"/> + =20 + <xsl:choose> + <xsl:when test=3D"$align =3D 'left'"> + <xsl:value-of select=3D"$output"/> + <xsl:call-template name=3D"str:dup"> + <xsl:with-param name=3D"input" select=3D" ' ' "/> + <xsl:with-param name=3D"count" select=3D"$width - string-length(= $output)"/> + </xsl:call-template> + </xsl:when> + <xsl:when test=3D"$align =3D 'right'"> + <xsl:call-template name=3D"str:dup"> + <xsl:with-param name=3D"input" select=3D" ' ' "/> + <xsl:with-param name=3D"count" select=3D"$width - string-length(= $output)"/> + </xsl:call-template> + <xsl:value-of select=3D"$output"/> + </xsl:when> + <xsl:when test=3D"$align =3D 'center'"> + <xsl:call-template name=3D"str:dup"> + <xsl:with-param name=3D"input" select=3D" ' ' "/> + <xsl:with-param name=3D"count" select=3D"floor(($width - string-= length($output)) div 2)"/> + </xsl:call-template> + <xsl:value-of select=3D"$output"/> + <xsl:call-template name=3D"str:dup"> + <xsl:with-param name=3D"input" select=3D" ' ' "/> + <xsl:with-param name=3D"count" select=3D"ceiling(($width - strin= g-length($output)) div 2)"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise>INVALID ALIGN</xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> Added: trunk/docs/lib/text.wrap.xslt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/lib/text.wrap.xslt 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/lib/text.wrap.xslt 2005-09-30 01:43:32 UTC (rev 4830) @@ -0,0 +1,102 @@ +<?xml version=3D"1.0" encoding=3D"UTF-8"?> +<xsl:stylesheet version=3D"1.0" xmlns:xsl=3D"http://www.w3.org/1999/XSL/= Transform" id=3D"text.wrap" + xmlns:str=3D"http://www.ora.com/XSLTCookbook/namespaces/strings"=20 + xmlns:text=3D"http://www.ora.com/XSLTCookbook/namespaces/text" exclude= -result-prefixes=3D"text"> + +<!-- This file was copied with some adaptations from the examples +supplied with the XSLT Cookbook by Sal Mangano, (C) 2003 O'Reilly & +Associates, ISBN 0-596-00372-2. --> + +<xsl:include href=3D"str.find-last.xslt"/> +<xsl:include href=3D"text.justify.xslt"/> + +<xsl:template match=3D"node() | @*" mode=3D"text:wrap" name=3D"text:wrap= "> + <xsl:param name=3D"input" select=3D"normalize-space()"/>=20 + <xsl:param name=3D"width" select=3D"70"/> + <xsl:param name=3D"indent" select=3D"0"/> + <xsl:param name=3D"dofirst" select=3D"1"/> + <xsl:param name=3D"align" select=3D" 'left' "/> + + <xsl:variable name=3D"effective" select=3D"$width - $indent"/> + + <xsl:if test=3D"$input"> + <xsl:variable name=3D"line"> + <xsl:choose> + <xsl:when test=3D"string-length($input) > $effective"> + <xsl:variable name=3D"candidate-line" select=3D"substring($inp= ut,1,$effective)"/> + <xsl:choose> + <xsl:when test=3D"contains($candidate-line,' ')"> + <xsl:call-template name=3D"str:substring-before-last"> + <xsl:with-param name=3D"input" select=3D"$candidate-li= ne"/> + <xsl:with-param name=3D"substr" select=3D" ' ' "/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select=3D"$candidate-line"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select=3D"$input"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + =20 + <xsl:if test=3D"$line"> + <xsl:if test=3D"$dofirst"> + <xsl:call-template name=3D"str:dup"> + <xsl:with-param name=3D"input" select=3D" ' ' "/> + <xsl:with-param name=3D"count" select=3D"$indent"/> + </xsl:call-template> + </xsl:if> + + <xsl:call-template name=3D"text:justify"> + <xsl:with-param name=3D"value" select=3D"$line"/> + <xsl:with-param name=3D"width" select=3D"$effective"/> + <xsl:with-param name=3D"align" select=3D"$align"/> + </xsl:call-template> + <xsl:text>
</xsl:text> + </xsl:if> =20 + + <xsl:call-template name=3D"text:wrap"> + <xsl:with-param name=3D"input" select=3D"substring($input, string-= length($line) + 2)"/> + <xsl:with-param name=3D"width" select=3D"$width"/> + <xsl:with-param name=3D"indent" select=3D"$indent"/> + <xsl:with-param name=3D"align" select=3D"$align"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template match=3D"node() | @*" mode=3D"text:dump" name=3D"text:dump= "> + <xsl:param name=3D"input" select=3D"text()"/> + <xsl:param name=3D"indent" select=3D"0"/> + + <xsl:if test=3D"$input"> + <xsl:variable name=3D"line"> + <xsl:choose> + <xsl:when test=3D"contains($input, '
')"> + <xsl:value-of select=3D"substring-before($input, '
')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select=3D"$input"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + =20 + <xsl:if test=3D"$line"> + <xsl:call-template name=3D"str:dup"> + <xsl:with-param name=3D"input" select=3D" ' ' "/> + <xsl:with-param name=3D"count" select=3D"$indent"/> + </xsl:call-template> + <xsl:value-of select=3D"$line"/> + <xsl:text>
</xsl:text> + </xsl:if> + + <xsl:call-template name=3D"text:dump"> + <xsl:with-param name=3D"input" select=3D"substring-after($input, '= 
')"/> + <xsl:with-param name=3D"indent" select=3D"$indent"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +</xsl:stylesheet> Added: trunk/docs/lib/untag-inline.xslt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/lib/untag-inline.xslt 2005-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/lib/untag-inline.xslt 2005-09-30 01:43:32 UTC (rev 4830) @@ -0,0 +1,27 @@ +<?xml version=3D"1.0" encoding=3D"UTF-8"?> <!-- -*- sgml -*- --> +<xsl:stylesheet version=3D"1.0" xmlns:xsl=3D"http://www.w3.org/1999/XSL/= Transform"> + +<xsl:include href=3D"copy.xslt"/> + +<xsl:strip-space elements=3D"*"/> + +<xsl:output method=3D"xml" encoding=3D"UTF-8" indent=3D"yes"/> + +<!-- Preprocess a docbook/xml file, replacing elements that are to be --= > +<!-- formatted inline with the corresponding text. --> + +<xsl:template match=3D"literal|computeroutput"> + <xsl:value-of select=3D"text()"/> +</xsl:template> + +<xsl:template match=3D"ulink"> + <xsl:variable name=3D"url" select=3D"normalize-space(@url)"/> + <xsl:variable name=3D"text" select=3D"normalize-space(text())"/> + + <xsl:if test=3D"$text and $text !=3D $url"> + <xsl:text>'</xsl:text><xsl:value-of select=3D"$text"/><xsl:text>' </= xsl:text> + </xsl:if> + <xsl:text><</xsl:text><xsl:value-of select=3D"$url"/><xsl:text>>= </xsl:text> +</xsl:template> + +</xsl:stylesheet> 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-09-30 01:20:47 UTC (rev 4829) +++ trunk/docs/xml/FAQ.xml 2005-09-30 01:43:32 UTC (rev 4830) @@ -305,21 +305,27 @@ =20 <para>Some example sub-traces:</para> =20 - <para>With debug information and unstripped (best):</para> + <itemizedlist> + <listitem> + <para>With debug information and unstripped (best):</para> <programlisting> Invalid write of size 1 at 0x80483BF: really (malloc1.c:20) by 0x8048370: main (malloc1.c:9) </programlisting> + </listitem> =20 - <para>With no debug information, unstripped:</para> + <listitem> + <para>With no debug information, unstripped:</para> <programlisting> Invalid write of size 1 at 0x80483BF: really (in /auto/homes/njn25/grind/head5/a.out) by 0x8048370: main (in /auto/homes/njn25/grind/head5/a.out) </programlisting> + </listitem> =20 - <para>With no debug information, stripped:</para> + <listitem> + <para>With no debug information, stripped:</para> <programlisting> Invalid write of size 1 at 0x80483BF: (within /auto/homes/njn25/grind/head5/a.out) @@ -327,17 +333,20 @@ by 0x42015703: __libc_start_main (in /lib/tls/libc-2.3.2.so) by 0x80482CC: (within /auto/homes/njn25/grind/head5/a.out) </programlisting> + </listitem> =20 - <para>With debug information and -fomit-frame-pointer:</para> + <listitem> + <para>With debug information and -fomit-frame-pointer:</para> <programlisting> Invalid write of size 1 at 0x80483C4: really (malloc1.c:20) by 0x42015703: __libc_start_main (in /lib/tls/libc-2.3.2.so) by 0x80482CC: ??? (start.S:81) </programlisting> + </listitem> =20 - <para>A leak error message involving an unloaded shared object:</para> - + <listitem> + <para>A leak error message involving an unloaded shared object:</p= ara> <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) @@ -346,6 +355,8 @@ by 0x1D65E007: ??? by 0x8049EE6: main (main.cpp:24) </programlisting> + </listitem> + </itemizedlist> =20 </answer> </qandaentry> |
|
From: <sv...@va...> - 2005-09-30 01:27:47
|
Author: njn Date: 2005-09-30 02:27:44 +0100 (Fri, 30 Sep 2005) New Revision: 204 Log: Extend survey period. Modified: trunk/index.html trunk/info/news.html Modified: trunk/index.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/index.html 2005-09-27 16:54:02 UTC (rev 203) +++ trunk/index.html 2005-09-30 01:27:44 UTC (rev 204) @@ -40,6 +40,9 @@ <li><p>September 22 2005: Please fill out our=20 <a href=3D"/gallery/surveys.html">survey</a>. We will close the survey in about one week's time, depending on the response rate. + <b>Update:</b> We are extending the survey by one week because we + are still getting a good number of responses each day. Please fill + out a survey if you have not already. </p></li> =20 <li><p>August 29 2005: Valgrind 3.0.1, for x86-linux and amd64-linux,=20 Modified: trunk/info/news.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/info/news.html 2005-09-27 16:54:02 UTC (rev 203) +++ trunk/info/news.html 2005-09-30 01:27:44 UTC (rev 204) @@ -10,6 +10,9 @@ <li><p>September 22 2005: Please fill out our=20 <a href=3D"/gallery/surveys.html">survey</a>. We will close the survey in about one week's time, depending on the response rate. + <b>Update:</b> We are extending the survey by one week because we + are still getting a good number of responses each day. Please fill + out a survey if you have not already. </p></li> =20 <li><p>August 29 2005: A bug-fix release, 3.0.1 is available |
|
From: <sv...@va...> - 2005-09-30 01:20:50
|
Author: sewardj
Date: 2005-09-30 02:20:47 +0100 (Fri, 30 Sep 2005)
New Revision: 4829
Log:
Get rid of duplicated STRINGIFY macros.
Modified:
trunk/auxprogs/valgrind-listener.c
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/auxprogs/valgrind-listener.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/auxprogs/valgrind-listener.c 2005-09-30 01:09:50 UTC (rev 4828)
+++ trunk/auxprogs/valgrind-listener.c 2005-09-30 01:20:47 UTC (rev 4829)
@@ -80,12 +80,10 @@
}
=20
#undef assert
-#undef STRINGIFY
=20
-#define STRINGIFY(__str) #__str
#define assert(expr) \
((void) ((expr) ? 0 : \
- (my_assert_fail (STRINGIFY(expr), \
+ (my_assert_fail (VG_STRINGIFY(expr), \
__FILE__, __LINE__, \
__PRETTY_FUNCTION__), 0)))
=20
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-amd64-linux.c 2005-09-30 01:09:50 U=
TC (rev 4828)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2005-09-30 01:20:47 U=
TC (rev 4829)
@@ -285,10 +285,8 @@
=20
Returns a Long encoded in the linux-amd64 way, not a SysRes.
*/
-#define STRINGIFZ(__str) #__str
-#define STRINGIFY(__str) STRINGIFZ(__str)
-#define __NR_CLONE STRINGIFY(__NR_clone)
-#define __NR_EXIT STRINGIFY(__NR_exit)
+#define __NR_CLONE VG_STRINGIFY(__NR_clone)
+#define __NR_EXIT VG_STRINGIFY(__NR_exit)
=20
extern
Long do_syscall_clone_amd64_linux ( Long (*fn)(void *),=20
@@ -339,8 +337,6 @@
=20
#undef __NR_CLONE
#undef __NR_EXIT
-#undef STRINGIFY
-#undef STRINGIFZ
=20
=20
// forward declaration
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-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_syswrap/syswrap-ppc32-linux.c 2005-09-30 01:09:50 U=
TC (rev 4828)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2005-09-30 01:20:47 U=
TC (rev 4829)
@@ -307,10 +307,8 @@
=20
Returns an Int encoded in the linux-ppc32 way, not a SysRes.
*/
-#define STRINGIFZ(__str) #__str
-#define STRINGIFY(__str) STRINGIFZ(__str)
-#define __NR_CLONE STRINGIFY(__NR_clone)
-#define __NR_EXIT STRINGIFY(__NR_exit)
+#define __NR_CLONE VG_STRINGIFY(__NR_clone)
+#define __NR_EXIT VG_STRINGIFY(__NR_exit)
=20
extern
ULong do_syscall_clone_ppc32_linux ( Int (*fn)(void *),=20
@@ -379,8 +377,6 @@
=20
#undef __NR_CLONE
#undef __NR_EXIT
-#undef STRINGIFY
-#undef STRINGIFZ
=20
// forward declarations
static void setup_child ( ThreadArchState*, ThreadArchState* );
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-x86-linux.c 2005-09-30 01:09:50 UTC=
(rev 4828)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2005-09-30 01:20:47 UTC=
(rev 4829)
@@ -284,11 +284,9 @@
=20
Returns an Int encoded in the linux-x86 way, not a SysRes.
*/
-#define STRINGIFZ(__str) #__str
-#define STRINGIFY(__str) STRINGIFZ(__str)
#define FSZ "4+4+4+4" /* frame size =3D retaddr+ebx+edi+es=
i */
-#define __NR_CLONE STRINGIFY(__NR_clone)
-#define __NR_EXIT STRINGIFY(__NR_exit)
+#define __NR_CLONE VG_STRINGIFY(__NR_clone)
+#define __NR_EXIT VG_STRINGIFY(__NR_exit)
=20
extern
Int do_syscall_clone_x86_linux ( Int (*fn)(void *),=20
@@ -345,8 +343,6 @@
#undef FSZ
#undef __NR_CLONE
#undef __NR_EXIT
-#undef STRINGIFY
-#undef STRINGIFZ
=20
=20
// forward declarations
|
|
From: <sv...@va...> - 2005-09-30 01:09:53
|
Author: sewardj
Date: 2005-09-30 02:09:50 +0100 (Fri, 30 Sep 2005)
New Revision: 4828
Log:
In PRE(sys_readlink), fix up handling of /proc/<pid>/exe and
/proc/self/exe.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/coregrind/m_syswrap/syswrap-generic.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_syswrap/syswrap-generic.c 2005-09-30 01:07:14 UTC (=
rev 4827)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-09-30 01:09:50 UTC (=
rev 4828)
@@ -4625,7 +4625,9 @@
=20
PRE(sys_readlink)
{
- Word saved =3D SYSNO;
+ HChar name[25];
+ Word saved =3D SYSNO;
+
PRINT("sys_readlink ( %p, %p, %llu )", ARG1,ARG2,(ULong)ARG3);
PRE_REG_READ3(long, "readlink",
const char *, path, char *, buf, int, bufsiz);
@@ -4636,20 +4638,15 @@
* Handle the case where readlink is looking at /proc/self/exe or
* /proc/<pid>/exe.
*/
-
- SET_STATUS_from_SysRes( VG_(do_syscall3)(saved, ARG1, ARG2, ARG3));
-
- /* jrs 20050604: where does the magic value 2 come from? It seems
- like it should be a kernel error value, but we don't know of any
- such. */
- if (SWHAT =3D=3D SsFailure && RES_unchecked =3D=3D 2) {
- HChar name[25];
- VG_(sprintf)(name, "/proc/%d/exe", VG_(getpid)());
- if (VG_(strcmp)((Char *)ARG1, name) =3D=3D 0 ||
- VG_(strcmp)((Char *)ARG1, "/proc/self/exe") =3D=3D 0) {
- VG_(sprintf)(name, "/proc/self/fd/%d", VG_(cl_exec_fd));
- SET_STATUS_from_SysRes( VG_(do_syscall3)(saved, (UWord)name, AR=
G2, ARG3));
- }
+ VG_(sprintf)(name, "/proc/%d/exe", VG_(getpid)());
+ if (VG_(strcmp)((Char *)ARG1, name) =3D=3D 0=20
+ || VG_(strcmp)((Char *)ARG1, "/proc/self/exe") =3D=3D 0) {
+ VG_(sprintf)(name, "/proc/self/fd/%d", VG_(cl_exec_fd));
+ SET_STATUS_from_SysRes( VG_(do_syscall3)(saved, (UWord)name,=20
+ ARG2, ARG3));
+ } else {
+ /* Normal case */
+ SET_STATUS_from_SysRes( VG_(do_syscall3)(saved, ARG1, ARG2, ARG3))=
;
}
=20
if (SUCCESS && RES > 0)
|
|
From: <sv...@va...> - 2005-09-30 01:07:21
|
Author: njn Date: 2005-09-30 02:07:14 +0100 (Fri, 30 Sep 2005) New Revision: 4827 Log: update Modified: trunk/docs/internals/3_0_BUGSTATUS.txt Modified: trunk/docs/internals/3_0_BUGSTATUS.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/docs/internals/3_0_BUGSTATUS.txt 2005-09-30 01:05:53 UTC (rev 4= 826) +++ trunk/docs/internals/3_0_BUGSTATUS.txt 2005-09-30 01:07:14 UTC (rev 4= 827) @@ -69,8 +69,6 @@ FIXED-TRUNK: TODO =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=3D=3D=3D=3D =3D=3D=3D Bugs targeted for 3.1.0 and 3.0.2 = =3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -181,7 +179,12 @@ FIXED-TRUNK: vg:4769 FIXED-30BRANCH: TODO =20 +---------------------------------------------------------------- +n-i-bz enable sys_iopl on AMD64 =20 +FIXED-TRUNK: vg:4826 + + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D Bugs targeted for 3.1.0 and 3.0.1 (all done, 3.0.1 released) = =3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D |
|
From: <sv...@va...> - 2005-09-30 01:06:00
|
Author: njn
Date: 2005-09-30 02:05:53 +0100 (Fri, 30 Sep 2005)
New Revision: 4826
Log:
Enable sys_iopl on AMD64.
Modified:
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-amd64-linux.c 2005-09-30 00:49:01 U=
TC (rev 4825)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2005-09-30 01:05:53 U=
TC (rev 4826)
@@ -1367,7 +1367,7 @@
=20
// (__NR_sethostname, sys_sethostname), // 170=20
// (__NR_setdomainname, sys_setdomainname), // 171=20
- // (__NR_iopl, stub_iopl), // 172=20
+ GENX_(__NR_iopl, sys_iopl), // 172=20
LINX_(__NR_ioperm, sys_ioperm), // 173=20
// (__NR_create_module, sys_ni_syscall), // 174=20
=20
|
|
From: <sv...@va...> - 2005-09-30 00:49:05
|
Author: sewardj
Date: 2005-09-30 01:49:01 +0100 (Fri, 30 Sep 2005)
New Revision: 4825
Log:
Oh Arse. This'll teach me to edit the x86-specific sources on a ppc32
box.
Modified:
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-x86-linux.c 2005-09-30 00:45:47 UTC=
(rev 4824)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2005-09-30 00:49:01 UTC=
(rev 4825)
@@ -1472,8 +1472,8 @@
UWord a1, a2, a3, a4, a5, a6;
Addr advised;
SysRes sres;
+ MapRequest mreq;
Bool mreq_ok;
- SysRes sres;
=20
UWord* args =3D (UWord*)ARG1;
PRE_REG_READ1(long, "old_mmap", struct mmap_arg_struct *, args);
|
|
From: <sv...@va...> - 2005-09-30 00:45:52
|
Author: sewardj
Date: 2005-09-30 01:45:47 +0100 (Fri, 30 Sep 2005)
New Revision: 4824
Log:
A corresponding fix to 4823: don't deal with MAP_FIXED case directly
here; instead uniformly pass all requests to VG_(am_get_advisory), so
that layout policy is controlled from one place only.
Modified:
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-x86-linux.c 2005-09-30 00:37:04 UTC=
(rev 4823)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2005-09-30 00:45:47 UTC=
(rev 4824)
@@ -1472,6 +1472,8 @@
UWord a1, a2, a3, a4, a5, a6;
Addr advised;
SysRes sres;
+ Bool mreq_ok;
+ SysRes sres;
=20
UWord* args =3D (UWord*)ARG1;
PRE_REG_READ1(long, "old_mmap", struct mmap_arg_struct *, args);
@@ -1494,7 +1496,7 @@
return;
}
=20
- if (/*(a4 & VKI_MAP_FIXED) &&*/ !VG_IS_PAGE_ALIGNED(a1)) {
+ if (!VG_IS_PAGE_ALIGNED(a1)) {
/* zap any misaligned addresses. */
SET_STATUS_Failure( VKI_EINVAL );
return;
@@ -1502,38 +1504,30 @@
=20
/* Figure out what kind of allocation constraints there are
(fixed/hint/any), and ask aspacem what we should do. */
+ mreq.start =3D a1;
+ mreq.len =3D a2;
if (a4 & VKI_MAP_FIXED) {
- if (!ML_(valid_client_addr)(a1, a2, tid, "mmap2")) {
- SET_STATUS_Failure( VKI_EINVAL );
- return;
- }
+ mreq.rkind =3D MFixed;
+ } else
+ if (a1 !=3D 0) {
+ mreq.rkind =3D MHint;
} else {
- MapRequest mreq;
- Bool mreq_ok;
+ mreq.rkind =3D MAny;
+ }
=20
- mreq.start =3D a1;
- mreq.len =3D a2;
-
- if (a1 !=3D 0) {
- mreq.rkind =3D MHint;
- } else {
- mreq.rkind =3D MAny;
- }
-
- /* Enquire ... */
- advised =3D VG_(am_get_advisory)( &mreq, True/*client*/, &mreq_ok =
);
- if (!mreq_ok) {
- /* Our request was bounced, so we'd better fail. */
- SET_STATUS_Failure( VKI_EINVAL );
- return;
- }
-
- /* Otherwise we're OK (so far). Install aspacem's choice of
- address, and let the mmap go through. */
- a1 =3D advised;
- a4 |=3D VKI_MAP_FIXED;
+ /* Enquire ... */
+ advised =3D VG_(am_get_advisory)( &mreq, True/*client*/, &mreq_ok );
+ if (!mreq_ok) {
+ /* Our request was bounced, so we'd better fail. */
+ SET_STATUS_Failure( VKI_EINVAL );
+ return;
}
=20
+ /* Otherwise we're OK (so far). Install aspacem's choice of
+ address, and let the mmap go through. */
+ a1 =3D advised;
+ a4 |=3D VKI_MAP_FIXED;
+
vg_assert(! FAILURE);
=20
sres =3D VG_(am_do_mmap_NO_NOTIFY)(a1, a2, a3, a4, a5, a6);
|
|
From: Julian S. <js...@ac...> - 2005-09-30 00:38:23
|
> On x86 and ppc32 the offset argument to mmap2 is specified in pages > not bytes. This is a horrible kludge of a fix and it should probably > be fixed properly with a separate sys_mmap for amd64. > + OffT offset; Nice but .. there's kind of an awkward hole here. On x86, OffT is 32 bits and so if ARG6 >= 2^20 then offset is going to be wrong. Implication is that all mmap offsets should be represented in 64 bits regardless of the platform. (sigh) I'll think this through a bit more and see how this afflicts aspacem. > +#if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) > + offset = ARG6 * VKI_PAGE_SIZE; Also .. utterly illogically .. on ppc32 multiplying by page size causes everything to crash horribly. So on ppc32 I guess it's byte-indexed; but the implication is you can't do offsets of more than 4G on ppc32. /me mystified. J |
|
From: <sv...@va...> - 2005-09-30 00:37:12
|
Author: sewardj
Date: 2005-09-30 01:37:04 +0100 (Fri, 30 Sep 2005)
New Revision: 4823
Log:
Changes to sys_mmap2 wrapper:
- update comment re offset scaling
- ppc32 offset is in bytes, not pages
- don't deal with MAP_FIXED case directly here; instead uniformly pass
all requests to VG_(am_get_advisory), so that layout policy is controll=
ed
from one place only.
Modified:
trunk/coregrind/m_syswrap/syswrap-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-linux.c 2005-09-30 00:06:09 UTC (re=
v 4822)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2005-09-30 00:37:04 UTC (re=
v 4823)
@@ -550,14 +550,18 @@
=20
PRE(sys_mmap2)
{
- Addr advised;
- SysRes sres;
- OffT offset;
+ Addr advised;
+ SysRes sres;
+ OffT offset;
+ MapRequest mreq;
+ Bool mreq_ok;
=20
// Exactly like old_mmap() in x86-linux except:
// - all 6 args are passed in regs, rather than in a memory-block.
- // - the file offset is specified in pagesize units rather than byte=
s,
- // so that it can be used for files bigger than 2^32 bytes.
+ // - on x86-linux, the file offset is specified in pagesize units
+ // rather than bytes, so that it can be used for files bigger=20
+ // than 2^32 bytes. On amd64-linux and ppc32-linux it appears
+ // to be in bytes.
PRINT("sys_mmap2 ( %p, %llu, %d, %d, %d, %d )",
ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(long, "mmap2",
@@ -572,7 +576,7 @@
return;
}
=20
- if (/*(ARG4 & VKI_MAP_FIXED) && */ (0 !=3D (ARG1 & (VKI_PAGE_SIZE-1))=
)) {
+ if (!VG_IS_PAGE_ALIGNED(ARG1)) {
/* zap any misaligned addresses. */
/* SuSV3 says misaligned addresses only cause the MAP_FIXED case
to fail. Here, we catch them all. */
@@ -582,44 +586,34 @@
=20
/* Figure out what kind of allocation constraints there are
(fixed/hint/any), and ask aspacem what we should do. */
+ mreq.start =3D ARG1;
+ mreq.len =3D ARG2;
if (ARG4 & VKI_MAP_FIXED) {
- if (!ML_(valid_client_addr)(ARG1, ARG2, tid, "mmap2")) {
- SET_STATUS_Failure( VKI_EINVAL );
- return;
- }
-
- advised =3D ARG1;
+ mreq.rkind =3D MFixed;
+ } else
+ if (ARG1 !=3D 0) {
+ mreq.rkind =3D MHint;
} else {
- MapRequest mreq;
- Bool mreq_ok;
+ mreq.rkind =3D MAny;
+ }
=20
- mreq.start =3D ARG1;
- mreq.len =3D ARG2;
-
- if (ARG1 !=3D 0) {
- mreq.rkind =3D MHint;
- } else {
- mreq.rkind =3D MAny;
- }
-
- /* Enquire ... */
- advised =3D VG_(am_get_advisory)( &mreq, True/*client*/, &mreq_ok =
);
- if (!mreq_ok) {
- /* Our request was bounced, so we'd better fail. */
- SET_STATUS_Failure( VKI_EINVAL );
- return;
- }
+ /* Enquire ... */
+ advised =3D VG_(am_get_advisory)( &mreq, True/*client*/, &mreq_ok );
+ if (!mreq_ok) {
+ /* Our request was bounced, so we'd better fail. */
+ SET_STATUS_Failure( VKI_EINVAL );
+ return;
}
=20
vg_assert(! FAILURE);
=20
-#if defined(VGP_x86_linux) || defined(VGP_ppc32_linux)
+# if defined(VGP_x86_linux)
offset =3D ARG6 * VKI_PAGE_SIZE;
-#elif defined(VGP_amd64_linux)
+# elif defined(VGP_amd64_linux) || defined(VGP_ppc32_linux)
offset =3D ARG6;
-#elif
-# error Unknown platform
-#endif
+# else
+# error Unknown platform
+# endif
=20
/* Otherwise we're OK (so far). Install aspacem's choice of
address, and let the mmap go through. */
|
|
From: <sv...@va...> - 2005-09-30 00:06:16
|
Author: njn
Date: 2005-09-30 01:06:09 +0100 (Fri, 30 Sep 2005)
New Revision: 4822
Log:
Future-proof a piece of conditional compilation.
Modified:
trunk/coregrind/m_syswrap/syswrap-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-linux.c 2005-09-29 23:26:06 UTC (re=
v 4821)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2005-09-30 00:06:09 UTC (re=
v 4822)
@@ -615,8 +615,10 @@
=20
#if defined(VGP_x86_linux) || defined(VGP_ppc32_linux)
offset =3D ARG6 * VKI_PAGE_SIZE;
-#else
+#elif defined(VGP_amd64_linux)
offset =3D ARG6;
+#elif
+# error Unknown platform
#endif
=20
/* Otherwise we're OK (so far). Install aspacem's choice of
|
|
From: <sv...@va...> - 2005-09-29 23:26:09
|
Author: tom
Date: 2005-09-30 00:26:06 +0100 (Fri, 30 Sep 2005)
New Revision: 4821
Log:
On x86 and ppc32 the offset argument to mmap2 is specified in pages
not bytes. This is a horrible kludge of a fix and it should probably
be fixed properly with a separate sys_mmap for amd64.
Modified:
trunk/coregrind/m_syswrap/syswrap-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-linux.c 2005-09-29 21:20:41 UTC (re=
v 4820)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2005-09-29 23:26:06 UTC (re=
v 4821)
@@ -552,6 +552,7 @@
{
Addr advised;
SysRes sres;
+ OffT offset;
=20
// Exactly like old_mmap() in x86-linux except:
// - all 6 args are passed in regs, rather than in a memory-block.
@@ -612,11 +613,17 @@
=20
vg_assert(! FAILURE);
=20
+#if defined(VGP_x86_linux) || defined(VGP_ppc32_linux)
+ offset =3D ARG6 * VKI_PAGE_SIZE;
+#else
+ offset =3D ARG6;
+#endif
+
/* Otherwise we're OK (so far). Install aspacem's choice of
address, and let the mmap go through. */
sres =3D VG_(am_do_mmap_NO_NOTIFY)(advised, ARG2, ARG3,
ARG4 | VKI_MAP_FIXED,
- ARG5, ARG6);
+ ARG5, offset);
SET_STATUS_from_SysRes(sres);
=20
if (!sres.isError) {
@@ -625,7 +632,7 @@
(Addr)sres.val, /* addr kernel actually assigned */
ARG2, ARG3,=20
ARG4, /* the original flags value */
- ARG5, ARG6=20
+ ARG5, offset
);
/* Load symbols? */
VG_(di_notify_mmap)( (Addr)sres.val );
|
|
From: <sv...@va...> - 2005-09-29 21:20:46
|
Author: sewardj
Date: 2005-09-29 22:20:41 +0100 (Thu, 29 Sep 2005)
New Revision: 4820
Log:
Fix a very stupid bug in the new aspacemgr, in which mmap "hint-style"
requests were being granted at the requested address when they should
not have been. This was causing ppc32-linux to crash at startup
(since the wrongly-granted mapping annihilated 5 others). This shows
the value of a multiplatform approach -- the bug applies to all
targets, yet x86 and amd64 appeared to work perfectly.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-09-29 11:09:56 UTC (rev =
4819)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-09-29 21:20:41 UTC (rev =
4820)
@@ -1586,9 +1586,14 @@
other words we are prepared to let the client trash its own
mappings if it wants to.
=20
- Similarly, a hinted client map will be granted at the
- requested address providing the same conditions hold.
+ The Default Policy is overriden by Policy Exception #2:
=20
+ If the request is for a hinted client map, we are prepared to
+ grant it providing all areas inside the request are either
+ free or reservations. In other words we are prepared to let=20
+ the client have a hinted mapping anywhere it likes provided
+ it does not trash either any of its own mappings or any of=20
+ valgrind's mappings.
*/
Int i, j;
Addr holeStart, holeEnd, holeLen;
@@ -1628,7 +1633,7 @@
=20
/* ------ Implement Policy Exception #1 ------ */
=20
- if (forClient && (req->rkind =3D=3D MFixed || req->rkind =3D=3D MHint=
)) {
+ if (forClient && req->rkind =3D=3D MFixed) {
Int iLo =3D find_nsegment_idx(reqStart);
Int iHi =3D find_nsegment_idx(reqEnd);
Bool allow =3D True;
@@ -1648,12 +1653,32 @@
*ok =3D True;
return reqStart;
}
- /* Not acceptable. Fixed fails, Hint is now attempted by the
- default policy. */
- if (req->rkind =3D=3D MFixed) {
- *ok =3D False;
- return 0;
+ /* Not acceptable. Fail. */
+ *ok =3D False;
+ return 0;
+ }
+
+ /* ------ Implement Policy Exception #2 ------ */
+
+ if (forClient && req->rkind =3D=3D MHint) {
+ Int iLo =3D find_nsegment_idx(reqStart);
+ Int iHi =3D find_nsegment_idx(reqEnd);
+ Bool allow =3D True;
+ for (i =3D iLo; i <=3D iHi; i++) {
+ if (nsegments[i].kind =3D=3D SkFree
+ || nsegments[i].kind =3D=3D SkResvn) {
+ /* ok */
+ } else {
+ allow =3D False;
+ break;
+ }
}
+ if (allow) {
+ /* Acceptable. Granted. */
+ *ok =3D True;
+ return reqStart;
+ }
+ /* Not acceptable. Fall through to the default policy. */
}
=20
/* ------ Implement the Default Policy ------ */
|
|
From: <sv...@va...> - 2005-09-29 11:10:03
|
Author: sewardj
Date: 2005-09-29 12:09:56 +0100 (Thu, 29 Sep 2005)
New Revision: 4819
Log:
Make ppc32-linux build again following aspacem merge. Doesn't work, thou=
gh:
programs crash before reaching main. I don't know why.
Modified:
trunk/coregrind/m_debugger.c
trunk/coregrind/m_dispatch/dispatch-ppc32.S
trunk/coregrind/m_libcproc.c
trunk/coregrind/m_machine.c
trunk/coregrind/m_main.c
trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_trampoline.S
trunk/coregrind/m_translate.c
trunk/coregrind/pub_core_machine.h
trunk/coregrind/vki_unistd-ppc32-linux.h
Modified: trunk/coregrind/m_debugger.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_debugger.c 2005-09-29 10:24:17 UTC (rev 4818)
+++ trunk/coregrind/m_debugger.c 2005-09-29 11:09:56 UTC (rev 4819)
@@ -36,6 +36,7 @@
#include "pub_core_libcprint.h"
#include "pub_core_libcproc.h"
#include "pub_core_libcsignal.h"
+#include "pub_core_libcassert.h" // I_die_here
#include "pub_core_options.h"
=20
#define WIFSTOPPED(status) (((status) & 0xff) =3D=3D 0x7f)
Modified: trunk/coregrind/m_dispatch/dispatch-ppc32.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_dispatch/dispatch-ppc32.S 2005-09-29 10:24:17 UTC (=
rev 4818)
+++ trunk/coregrind/m_dispatch/dispatch-ppc32.S 2005-09-29 11:09:56 UTC (=
rev 4819)
@@ -92,8 +92,8 @@
=20
/* set host AltiVec control word to the default mode expected=20
by VEX-generated code. */
- lis 3,VG_(have_altivec_ppc)@ha
- lwz 3,VG_(have_altivec_ppc)@l(3)
+ lis 3,VG_(have_altivec_ppc32)@ha
+ lwz 3,VG_(have_altivec_ppc32)@l(3)
cmplwi 3,0
beq L1
/* generate vector {0x0,0x0,0x0,0x00010000} */
Modified: trunk/coregrind/m_libcproc.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_libcproc.c 2005-09-29 10:24:17 UTC (rev 4818)
+++ trunk/coregrind/m_libcproc.c 2005-09-29 11:09:56 UTC (rev 4819)
@@ -397,7 +397,7 @@
platform. */
Int VG_(getgroups)( Int size, UInt* list )
{
-# if defined(VGP_x86_linux)
+# if defined(VGP_x86_linux) || defined(VGP_ppc32_linux)
Int i;
SysRes sres;
UShort list16[32];
Modified: trunk/coregrind/m_machine.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_machine.c 2005-09-29 10:24:17 UTC (rev 4818)
+++ trunk/coregrind/m_machine.c 2005-09-29 11:09:56 UTC (rev 4819)
@@ -215,29 +215,30 @@
// Architecture specifics
=20
#if defined(VGA_ppc32)
-// PPC: what is the cache line size (for dcbz etc) ? This info is
-// harvested on Linux at startup from the AT_SYSINFO entries. 0 means
-// not-yet-set.
+/* PPC: what is the cache line size (for dcbz etc) ? This info is
+ harvested on Linux at startup from the AT_SYSINFO entries. 0 means
+ not-yet-set. */
Int VG_(cache_line_size_ppc32) =3D 0;
-// Altivec enabled? Harvested on startup from the AT_HWCAP entry
-Int VG_(have_altivec_ppc) =3D 0;
+
+/* Altivec enabled? Harvested on startup from the AT_HWCAP entry. */
+Int VG_(have_altivec_ppc32) =3D 0;
#endif
=20
-// X86: set to 1 if the host is able to do {ld,st}mxcsr (load/store
-// the SSE control/status register. For most modern CPUs this will be
-// 1. It is set to 1, if possible, by m_translate.getArchAndArchInfo.
-// The value is read by m_dispatch.dispatch-x86.S, which is why it
-// is an Int rather than a Bool.
-//
-// Ugly hack: this has to start as 0 and be set to 1 in the normal
-// case, rather than the other way round, because the dispatch
-// loop needs it, and it runs before the first translation is=20
-// made. Yet it is the act of making that first translation which
-// causes getArchAndArchInfo to set this value to its final value.
-// So it is necessary to start this value off at 0 as only that
-// guarantees that the dispatch loop will not SIGILL on its first
-// attempt.
+
#if defined(VGA_x86)
+/* X86: set to 1 if the host is able to do {ld,st}mxcsr (load/store
+ the SSE control/status register. For most modern CPUs this will be
+ 1. It is set to 1, if possible, by m_translate.getArchAndArchInfo.
+ The value is read by m_dispatch.dispatch-x86.S, which is why it is
+ an Int rather than a Bool.
+
+ Ugly hack: this has to start as 0 and be set to 1 in the normal
+ case, rather than the other way round, because the dispatch loop
+ needs it, and it runs before the first translation is made. Yet it
+ is the act of making that first translation which causes
+ getArchAndArchInfo to set this value to its final value. So it is
+ necessary to start this value off at 0 as only that guarantees that
+ the dispatch loop will not SIGILL on its first attempt. */
Int VG_(have_mxcsr_x86) =3D 0;
#endif
=20
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2005-09-29 10:24:17 UTC (rev 4818)
+++ trunk/coregrind/m_main.c 2005-09-29 11:09:56 UTC (rev 4819)
@@ -142,7 +142,8 @@
}
VG_(free)(preload_tool_path);
=20
- VG_(debugLog)(1, "main", "preload_string =3D %s\n", preload_string);
+ VG_(debugLog)(2, "main", "preload_string:\n");
+ VG_(debugLog)(2, "main", " \"%s\"\n", preload_string);
=20
/* Count the original size of the env */
envc =3D 0;
@@ -546,11 +547,11 @@
case AT_HWCAP:
# if defined(VGP_ppc32_linux)
/* Acquire altivecness info */
- VG_(debugLog)(1, "main", "PPC32 hwcaps: 0x%x\n",=20
+ VG_(debugLog)(2, "main", "PPC32 hwcaps: 0x%x\n",=20
(UInt)auxv->u.a_val);
if (auxv->u.a_val & 0x10000000)
VG_(have_altivec_ppc32) =3D 1;
- VG_(debugLog)(1, "main", "PPC32 AltiVec support: %u\n",=20
+ VG_(debugLog)(2, "main", "PPC32 AltiVec support: %u\n",=20
VG_(have_altivec_ppc32));
# endif
break;
@@ -562,7 +563,7 @@
/* acquire cache info */
if (auxv->u.a_val > 0) {
VG_(cache_line_size_ppc32) =3D auxv->u.a_val;
- VG_(debugLog)(1, "main",=20
+ VG_(debugLog)(2, "main",=20
"PPC32 cache line size %u (type %u)\n",=20
(UInt)auxv->u.a_val, (UInt)auxv->a_type =
);
}
@@ -1846,7 +1847,7 @@
static Addr* get_seg_starts ( /*OUT*/Int* n_acquired )
{
Addr* starts;
- Int n_starts, r;
+ Int n_starts, r =3D 0;
=20
n_starts =3D 1;
while (True) {
@@ -2094,7 +2095,7 @@
=20
VG_(debugLog)(2, "main",
"Client info: "
- "entry=3D%p client_SP=3D%p brkbase=3D%p\n",
+ "initial_IP=3D%p initial_SP=3D%p brk_base=3D%p\n"=
,
(void*)initial_client_IP,=20
(void*)initial_client_SP,
(void*)VG_(brk_base) );
@@ -2208,7 +2209,7 @@
// p: setup_file_descriptors() [for 'VG_(fd_xxx_limit)']
//--------------------------------------------------------------
VG_(debugLog)(1, "main", "Process Valgrind's command line options, "
- " setup logging\n");
+ "setup logging\n");
logging_to_fd =3D process_cmd_line_options(client_auxv, toolname);
=20
//--------------------------------------------------------------
@@ -2734,7 +2735,8 @@
*/
=20
/* The kernel hands control to _start, which extracts the initial
- stack pointer and calls onwards to _start_in_C. This also switches t=
he new stack. */
+ stack pointer and calls onwards to _start_in_C. This also switches
+ the new stack. */
#if defined(VGP_x86_linux)
asm("\n"
"\t.globl _start\n"
@@ -2769,6 +2771,30 @@
"\tcall _start_in_C\n"
"\thlt\n"
);
+#elif defined(VGP_ppc32_linux)
+asm("\n"
+ "\t.globl _start\n"
+ "\t.type _start,@function\n"
+ "_start:\n"
+ /* set up the new stack in r16 */
+ "\tlis 16,vgPlain_interim_stack@ha\n"
+ "\tla 16,vgPlain_interim_stack@l(16)\n"
+ "\tlis 17,("VG_STRINGIFY(VG_STACK_GUARD_SZB)" >> 16)\n"
+ "\tori 17,17,("VG_STRINGIFY(VG_STACK_GUARD_SZB)" & 0xFFFF)\n"
+ "\tlis 18,("VG_STRINGIFY(VG_STACK_ACTIVE_SZB)" >> 16)\n"
+ "\tori 18,18,("VG_STRINGIFY(VG_STACK_ACTIVE_SZB)" & 0xFFFF)\n"
+ "\tadd 16,17,16\n"
+ "\tadd 16,18,16\n"
+ "\trlwinm 16,16,0,0,27\n"
+ /* now r16 =3D &vgPlain_interim_stack + VG_STACK_GUARD_SZB +
+ VG_STACK_ACTIVE_SZB rounded down to the nearest 16-byte
+ boundary. And r1 is the original SP. Set the SP to r16 and
+ call _start_in_C, passing it the initial SP. */
+ "\tmr 3,1\n"
+ "\tmr 1,16\n"
+ "\tbl _start_in_C\n"
+ "\ttrap\n"
+);
#else
#error "_start: needs implementation on this platform"
#endif
Modified: trunk/coregrind/m_sigframe/sigframe-ppc32-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_sigframe/sigframe-ppc32-linux.c 2005-09-29 10:24:17=
UTC (rev 4818)
+++ trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c 2005-09-29 11:09:56=
UTC (rev 4819)
@@ -171,7 +171,7 @@
(Addr)&mc->mc_pad, sizeof(mc->mc_pad) );
/* invalidate any translation of this area */
VG_(discard_translations)( (Addr64)(Addr)&mc->mc_pad,=20
- sizeof(mc->mc_pad) ); =20
+ sizeof(mc->mc_pad), "stack_mcontext" ); =20
=20
/* set the signal handler to return to the trampoline */
SET_SIGNAL_LR(tst, (Addr) &mc->mc_pad[0]);
@@ -493,17 +493,16 @@
static Bool extend ( ThreadState *tst, Addr addr, SizeT size )
{
ThreadId tid =3D tst->tid;
- Segment *stackseg =3D NULL;
+ NSegment *stackseg =3D NULL;
=20
if (VG_(extend_stack)(addr, tst->client_stack_szB)) {
- stackseg =3D VG_(find_segment)(addr);
+ stackseg =3D VG_(am_find_nsegment)(addr);
if (0 && stackseg)
VG_(printf)("frame=3D%p seg=3D%p-%p\n",
- addr, stackseg->addr, stackseg->addr+stackseg->len);
+ addr, stackseg->start, stackseg->end);
}
=20
- if (stackseg =3D=3D NULL=20
- || (stackseg->prot & (VKI_PROT_READ|VKI_PROT_WRITE)) =3D=3D 0) {
+ if (stackseg =3D=3D NULL || !stackseg->hasR || !stackseg->hasW) {
VG_(message)(
Vg_UserMsg,
"Can't extend stack to %p during signal delivery for thread %d:=
",
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-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_syswrap/syswrap-ppc32-linux.c 2005-09-29 10:24:17 U=
TC (rev 4818)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2005-09-29 11:09:56 U=
TC (rev 4819)
@@ -58,71 +58,46 @@
Note. Why is this stuff here?
------------------------------------------------------------------ */
=20
-/*=20
- Allocate a stack for this thread.
- They're allocated lazily, but never freed.
- */
-#define FILL 0xdeadbeef
+/* Allocate a stack for this thread. They're allocated lazily, and
+ never freed. */
=20
-// Valgrind's stack size, in words.
-#define STACK_SIZE_W 16384
+/* Allocate a stack for this thread, if it doesn't already have one.
+ Returns the initial stack pointer value to use, or 0 if allocation
+ failed. */
=20
-static UWord* allocstack(ThreadId tid)
+static Addr allocstack ( ThreadId tid )
{
- ThreadState *tst =3D VG_(get_ThreadState)(tid);
- UWord *sp;
+ ThreadState* tst =3D VG_(get_ThreadState)(tid);
+ VgStack* stack;
+ Addr initial_SP;
=20
- if (tst->os_state.valgrind_stack_base =3D=3D 0) {
- void *stk =3D VG_(mmap)(0, STACK_SIZE_W * sizeof(UWord) + VKI_PAGE=
_SIZE,
- VKI_PROT_READ|VKI_PROT_WRITE,
- VKI_MAP_PRIVATE|VKI_MAP_ANONYMOUS,
- SF_VALGRIND,
- -1, 0);
+ /* Either the stack_base and stack_init_SP are both zero (in which
+ case a stack hasn't been allocated) or they are both non-zero,
+ in which case it has. */
=20
- if (stk !=3D (void *)-1) {
- VG_(mprotect)(stk, VKI_PAGE_SIZE, VKI_PROT_NONE); /* guard page=
*/
- tst->os_state.valgrind_stack_base =3D ((Addr)stk) + VKI_PAGE_SI=
ZE;
- tst->os_state.valgrind_stack_szB =3D STACK_SIZE_W * sizeof(UWo=
rd);
- } else=20
- return (UWord*)-1;
- }
+ if (tst->os_state.valgrind_stack_base =3D=3D 0)
+ vg_assert(tst->os_state.valgrind_stack_init_SP =3D=3D 0);
=20
- for (sp =3D (UWord*) tst->os_state.valgrind_stack_base;
- sp < (UWord*)(tst->os_state.valgrind_stack_base +=20
- tst->os_state.valgrind_stack_szB);=20
- sp++)
- *sp =3D FILL;
- /* sp is left at top of stack */
+ if (tst->os_state.valgrind_stack_base !=3D 0)
+ vg_assert(tst->os_state.valgrind_stack_init_SP !=3D 0);
=20
- if (0)
- VG_(printf)("stack for tid %d at %p (%x); sp=3D%p\n",
- tid, tst->os_state.valgrind_stack_base,=20
- *(UWord*)(tst->os_state.valgrind_stack_base), sp);
+ /* If no stack is present, allocate one. */
=20
- vg_assert(VG_IS_16_ALIGNED(sp));
+ if (tst->os_state.valgrind_stack_base =3D=3D 0) {
+ stack =3D VG_(am_alloc_VgStack)( &initial_SP );
+ if (stack) {
+ tst->os_state.valgrind_stack_base =3D (Addr)stack;
+ tst->os_state.valgrind_stack_init_SP =3D initial_SP;
+ }
+ }
=20
- return sp;
-}
-
-/* NB: this is identical the the amd64 version. */
-/* Return how many bytes of this stack have not been used */
-SSizeT VG_(stack_unused)(ThreadId tid)
-{
- ThreadState *tst =3D VG_(get_ThreadState)(tid);
- UWord* p;
- =20
- for (p =3D (UWord*)tst->os_state.valgrind_stack_base;=20
- p && (p < (UWord*)(tst->os_state.valgrind_stack_base +
- tst->os_state.valgrind_stack_szB));=20
- p++)
- if (*p !=3D FILL)
- break;
- =20
if (0)
- VG_(printf)("p=3D%p %x tst->os_state.valgrind_stack_base=3D%p\n",
- p, *p, tst->os_state.valgrind_stack_base);
- =20
- return ((Addr)p) - tst->os_state.valgrind_stack_base;
+ VG_(printf)( "stack for tid %d at %p; init_SP=3D%p\n",
+ tid,=20
+ (void*)tst->os_state.valgrind_stack_base,=20
+ (void*)tst->os_state.valgrind_stack_init_SP );
+ =20
+ return tst->os_state.valgrind_stack_init_SP;
}
=20
=20
@@ -162,6 +137,7 @@
( * VG_(address_of_m_main_shutdown_actions_NORETURN) ) (tid, src);
=20
} else {
+
VG_(debugLog)(1, "syswrap-ppc32-linux",=20
"run_a_thread_NORETURN(tid=3D%lld): "
"not last one standing\n",
@@ -254,21 +230,27 @@
);
=20
=20
-/*
- Allocate a stack for the main thread, and run it all the way to the
- end. =20
- */
+/* Allocate a stack for the main thread, and run it all the way to the
+ end. Although we already have a working VgStack
+ (VG_(interim_stack)) it's better to allocate a new one, so that
+ overflow detection works uniformly for all threads.
+*/
void VG_(main_thread_wrapper_NORETURN)(ThreadId tid)
{
VG_(debugLog)(1, "syswrap-ppc32-linux",=20
"entering VG_(main_thread_wrapper_NORETURN)\n");
=20
- UWord* sp =3D allocstack(tid);
+ Addr sp =3D allocstack(tid);
=20
/* make a stack frame */
sp -=3D 16;
+ sp &=3D ~0xF;
*(UWord *)sp =3D 0;
=20
+ /* If we can't even allocate the first thread's stack, we're hosed.
+ Give up. */
+ vg_assert2(sp !=3D 0, "Cannot allocate main thread's stack.");
+
/* shouldn't be any other threads around yet */
vg_assert( VG_(count_living_threads)() =3D=3D 1 );
=20
@@ -426,7 +408,7 @@
ThreadState* ctst =3D VG_(get_ThreadState)(ctid);
ULong word64;
UWord* stack;
- Segment* seg;
+ NSegment* seg;
SysRes res;
vki_sigset_t blockall, savedmask;
=20
@@ -435,7 +417,7 @@
vg_assert(VG_(is_running_thread)(ptid));
vg_assert(VG_(is_valid_tid)(ctid));
=20
- stack =3D allocstack(ctid);
+ stack =3D (UWord*)allocstack(ctid);
if (stack =3D=3D NULL) {
res =3D VG_(mk_SysRes_Error)( VKI_ENOMEM );
goto out;
@@ -486,14 +468,14 @@
memory mappings and try to derive some useful information. We
assume that esp starts near its highest possible value, and can
only go down to the start of the mmaped segment. */
- seg =3D VG_(find_segment)(sp);
- if (seg) {
+ seg =3D VG_(am_find_nsegment)(sp);
+ if (seg && seg->kind !=3D SkResvn) {
ctst->client_stack_highest_word =3D (Addr)VG_PGROUNDUP(sp);
- ctst->client_stack_szB =3D ctst->client_stack_highest_word - seg-=
>addr;
+ ctst->client_stack_szB =3D ctst->client_stack_highest_word - seg->=
start;
=20
if (debug)
VG_(printf)("\ntid %d: guessed client stack range %p-%p\n",
- ctid, seg->addr, VG_PGROUNDUP(sp));
+ ctid, seg->start, VG_PGROUNDUP(sp));
} else {
VG_(message)(Vg_UserMsg, "!? New thread %d starts with R1(%p) unma=
pped\n",
ctid, sp);
@@ -526,6 +508,7 @@
=20
VG_(sigprocmask)(VKI_SIG_SETMASK, &savedmask, NULL);
=20
+ out:
if (res.isError) {
/* clone failed */
VG_(cleanup_thread)(&ctst->arch);
@@ -583,330 +566,6 @@
=20
=20
/* ---------------------------------------------------------------------
- LDT/GDT simulation
- ------------------------------------------------------------------ */
-#warning "Do we need all this LDT/GDT garbage on ppc32? Surely not."
-
-/* 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, us=
ing
-//.. the Linux kernel's logic (cut-n-paste of code in
-//.. linux/kernel/ldt.c). */
-//..=20
-//.. 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));
-//..=20
-//.. if (0)
-//.. VG_(printf)("translate_to_hw_format: base %p, limit %d\n",=20
-//.. inn->base_addr, inn->limit );
-//..=20
-//.. /* 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;
-//.. }
-//.. }
-//..=20
-//.. 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);
-//..=20
-//.. /* Install the new entry ... */
-//.. install:
-//.. out->LdtEnt.Words.word1 =3D entry_1;
-//.. out->LdtEnt.Words.word2 =3D entry_2;
-//.. }
-//..=20
-//..=20
-//.. /*
-//.. * linux/kernel/ldt.c
-//.. *
-//.. * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
-//.. * Copyright (C) 1999 Ingo Molnar <mi...@re...>
-//.. */
-//..=20
-//.. /*
-//.. * 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;
-//..=20
-//.. if (0)
-//.. VG_(printf)("read_ldt: tid =3D %d, ptr =3D %p, bytecount =3D =
%d\n",
-//.. tid, ptr, bytecount );
-//..=20
-//.. vg_assert(sizeof(HWord) =3D=3D sizeof(VexGuestX86SegDescr*));
-//.. vg_assert(8 =3D=3D sizeof(VexGuestX86SegDescr));
-//..=20
-//.. 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;
-//..=20
-//.. size =3D VEX_GUEST_X86_LDT_NENT * sizeof(VexGuestX86SegDescr);
-//.. if (size > bytecount)
-//.. size =3D bytecount;
-//..=20
-//.. err =3D size;
-//.. for (i =3D 0; i < size; i++)
-//.. ptr[i] =3D ldt[i];
-//..=20
-//.. out:
-//.. return err;
-//.. }
-//..=20
-//..=20
-//.. static
-//.. Int write_ldt ( ThreadId tid, void* ptr, UInt bytecount, Int oldmod=
e )
-//.. {
-//.. Int error;
-//.. VexGuestX86SegDescr* ldt;
-//.. vki_modify_ldt_t* ldt_info;=20
-//..=20
-//.. if (0)
-//.. VG_(printf)("write_ldt: tid =3D %d, ptr =3D %p, "
-//.. "bytecount =3D %d, oldmode =3D %d\n",
-//.. tid, ptr, bytecount, oldmode );
-//..=20
-//.. vg_assert(8 =3D=3D sizeof(VexGuestX86SegDescr));
-//.. vg_assert(sizeof(HWord) =3D=3D sizeof(VexGuestX86SegDescr*));
-//..=20
-//.. ldt =3D (VexGuestX86SegDescr*)VG_(threads)[tid].arch.vex.gu=
est_LDT;
-//.. ldt_info =3D (vki_modify_ldt_t*)ptr;
-//..=20
-//.. error =3D -VKI_EINVAL;
-//.. if (bytecount !=3D sizeof(vki_modify_ldt_t))
-//.. goto out;
-//..=20
-//.. 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;
-//.. }
-//..=20
-//.. /* If this thread doesn't have an LDT, we'd better allocate it
-//.. now. */
-//.. if (ldt =3D=3D (HWord)NULL) {
-//.. ldt =3D VG_(alloc_zeroed_x86_LDT)();
-//.. VG_(threads)[tid].arch.vex.guest_LDT =3D (HWord)ldt;
-//.. }
-//..=20
-//.. /* Install the new entry ... */
-//.. translate_to_hw_format ( ldt_info, &ldt[ldt_info->entry_number],=
oldmode );
-//.. error =3D 0;
-//..=20
-//.. out:
-//.. return error;
-//.. }
-//..=20
-//..=20
-//.. Int VG_(sys_modify_ldt) ( ThreadId tid,
-//.. Int func, void* ptr, UInt bytecount )
-//.. {
-//.. Int ret =3D -VKI_ENOSYS;
-//..=20
-//.. 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;
-//.. }
-//..=20
-//..=20
-//.. Int VG_(sys_set_thread_area) ( ThreadId tid,
-//.. vki_modify_ldt_t* info )
-//.. {
-//.. Int idx;
-//.. VexGuestX86SegDescr* gdt;
-//..=20
-//.. vg_assert(8 =3D=3D sizeof(VexGuestX86SegDescr));
-//.. vg_assert(sizeof(HWord) =3D=3D sizeof(VexGuestX86SegDescr*));
-//..=20
-//.. if (info =3D=3D NULL)
-//.. return -VKI_EFAULT;
-//..=20
-//.. gdt =3D (VexGuestX86SegDescr*)VG_(threads)[tid].arch.vex.guest_G=
DT;
-//..=20
-//.. /* If the thread doesn't have a GDT, allocate it now. */
-//.. if (!gdt) {
-//.. gdt =3D VG_(alloc_zeroed_x86_GDT)();
-//.. VG_(threads)[tid].arch.vex.guest_GDT =3D (HWord)gdt;
-//.. }
-//..=20
-//.. idx =3D info->entry_number;
-//..=20
-//.. 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;
-//.. }
-//..=20
-//.. 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;
-//.. }
-//..=20
-//.. translate_to_hw_format(info, &gdt[idx], 0);
-//..=20
-//.. 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) );
-//..=20
-//.. return 0;
-//.. }
-//..=20
-//..=20
-//.. Int VG_(sys_get_thread_area) ( ThreadId tid,
-//.. vki_modify_ldt_t* info )
-//.. {
-//.. Int idx;
-//.. VexGuestX86SegDescr* gdt;
-//..=20
-//.. vg_assert(sizeof(HWord) =3D=3D sizeof(VexGuestX86SegDescr*));
-//.. vg_assert(8 =3D=3D sizeof(VexGuestX86SegDescr));
-//..=20
-//.. if (info =3D=3D NULL)
-//.. return -VKI_EFAULT;
-//..=20
-//.. idx =3D info->entry_number;
-//..=20
-//.. if (idx < 0 || idx >=3D VEX_GUEST_X86_GDT_NENT)
-//.. return -VKI_EINVAL;
-//..=20
-//.. gdt =3D (VexGuestX86SegDescr*)VG_(threads)[tid].arch.vex.guest_G=
DT;
-//..=20
-//.. /* If the thread doesn't have a GDT, allocate it now. */
-//.. if (!gdt) {
-//.. gdt =3D VG_(alloc_zeroed_x86_GDT)();
-//.. VG_(threads)[tid].arch.vex.guest_GDT =3D (HWord)gdt;
-//.. }
-//..=20
-//.. 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 ) ^ 0=
x1;
-//.. 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;
-//..=20
-//.. return 0;
-//.. }
-
-
-
-/* ---------------------------------------------------------------------
More thread stuff
------------------------------------------------------------------ */
=20
@@ -1451,14 +1110,16 @@
=20
if (ARG1 & VKI_CLONE_PARENT_SETTID) {
PRE_MEM_WRITE("clone(parent_tidptr)", ARG3, sizeof(Int));
- if (!VG_(is_addressable)(ARG3, sizeof(Int), VKI_PROT_WRITE)) {
+ if (!VG_(am_is_valid_for_client)(ARG3, sizeof(Int),=20
+ VKI_PROT_WRITE)) {
SET_STATUS_Failure( VKI_EFAULT );
return;
}
}
if (ARG1 & (VKI_CLONE_CHILD_SETTID | VKI_CLONE_CHILD_CLEARTID)) {
PRE_MEM_WRITE("clone(child_tidptr)", ARG5, sizeof(Int));
- if (!VG_(is_addressable)(ARG5, sizeof(Int), VKI_PROT_WRITE)) {
+ if (!VG_(am_is_valid_for_client)(ARG5, sizeof(Int),=20
+ VKI_PROT_WRITE)) {
SET_STATUS_Failure( VKI_EFAULT );
return;
}
@@ -2068,11 +1729,7 @@
//.. // (__NR_reboot, sys_reboot), // 88 */Li=
nux
//.. // (__NR_readdir, old_readdir), // 89 -- s=
uperseded
=20
-<<<<<<< .working
- LINXY(__NR_mmap, sys_mmap2), // 90
-=3D=3D=3D=3D=3D=3D=3D
- GENX_(__NR_mmap, sys_mmap2), // 90
->>>>>>> .merge-right.r4787
+ LINX_(__NR_mmap, sys_mmap2), // 90
GENXY(__NR_munmap, sys_munmap), // 91
//.. GENX_(__NR_truncate, sys_truncate), // 92
GENX_(__NR_ftruncate, sys_ftruncate), // 93
@@ -2198,11 +1855,7 @@
GENX_(__NR_vfork, sys_fork), // 189
GENXY(__NR_ugetrlimit, sys_getrlimit), // 190
//__NR_readahead // 191 ppc/Linux only?
-<<<<<<< .working
- LINXY(__NR_mmap2, sys_mmap2), // 192
-=3D=3D=3D=3D=3D=3D=3D
- GENX_(__NR_mmap2, sys_mmap2), // 192
->>>>>>> .merge-right.r4787
+ LINX_(__NR_mmap2, sys_mmap2), // 192
//.. GENX_(__NR_truncate64, sys_truncate64), // 193
//.. GENX_(__NR_ftruncate64, sys_ftruncate64), // 194
//.. =20
Modified: trunk/coregrind/m_trampoline.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_trampoline.S 2005-09-29 10:24:17 UTC (rev 4818)
+++ trunk/coregrind/m_trampoline.S 2005-09-29 11:09:56 UTC (rev 4819)
@@ -36,6 +36,9 @@
Replacements for some functions to do with vsyscalls and signals.
This code runs on the simulated CPU.
*/
+=09
+/*---------------------- x86-linux ----------------------*/
+#if defined(VGP_x86_linux)
=20
# define UD2_16 ud2 ; ud2 ; ud2 ; ud2 ;ud2 ; ud2 ; ud2 ; ud2
# define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16
@@ -45,9 +48,6 @@
=20
/* a leading page of unexecutable code */
UD2_PAGE
-=09
-/*---------------- x86-linux ----------------*/
-#if defined(VGP_x86_linux)
=20
.global VG_(trampoline_stuff_start)
VG_(trampoline_stuff_start):
@@ -77,11 +77,28 @@
.global VG_(trampoline_stuff_end)
VG_(trampoline_stuff_end):
=20
+ /* and a trailing page of unexecutable code */
+ UD2_PAGE
+
+# undef UD2_16
+# undef UD2_64
+# undef UD2_256
+# undef UD2_1024
+# undef UD2_PAGE
=09
-/*---------------- amd64-linux ----------------*/
+/*---------------------- amd64-linux ----------------------*/
#else
#if defined(VGP_amd64_linux)
=20
+# define UD2_16 ud2 ; ud2 ; ud2 ; ud2 ;ud2 ; ud2 ; ud2 ; ud2
+# define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16
+# define UD2_256 UD2_64 ; UD2_64 ; UD2_64 ; UD2_64
+# define UD2_1024 UD2_256 ; UD2_256 ; UD2_256 ; UD2_256
+# define UD2_PAGE UD2_1024 ; UD2_1024 ; UD2_1024 ; UD2_1024 =20
+
+ /* a leading page of unexecutable code */
+ UD2_PAGE
+
.global VG_(trampoline_stuff_start)
VG_(trampoline_stuff_start):
=20
@@ -108,11 +125,28 @@
.global VG_(trampoline_stuff_end)
VG_(trampoline_stuff_end):
=20
+ /* and a trailing page of unexecutable code */
+ UD2_PAGE
=20
+# undef UD2_16
+# undef UD2_64
+# undef UD2_256
+# undef UD2_1024
+# undef UD2_PAGE
+
/*---------------- ppc32-linux ----------------*/
#else
#if defined(VGP_ppc32_linux)
=20
+# define UD2_16 trap ; trap ; trap; trap
+# define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16
+# define UD2_256 UD2_64 ; UD2_64 ; UD2_64 ; UD2_64
+# define UD2_1024 UD2_256 ; UD2_256 ; UD2_256 ; UD2_256
+# define UD2_PAGE UD2_1024 ; UD2_1024 ; UD2_1024 ; UD2_1024 =20
+
+ /* a leading page of unexecutable code */
+ UD2_PAGE
+
.global VG_(trampoline_stuff_start)
VG_(trampoline_stuff_start):
=20
@@ -138,6 +172,11 @@
.global VG_(trampoline_stuff_end)
VG_(trampoline_stuff_end):
=20
+# undef UD2_16
+# undef UD2_64
+# undef UD2_256
+# undef UD2_1024
+# undef UD2_PAGE
=20
/*---------------- unknown ----------------*/
#else
@@ -147,16 +186,7 @@
#endif
#endif
=20
- /* and a trailing page of unexecutable code */
- UD2_PAGE
=20
-# undef UD2_16
-# undef UD2_64
-# undef UD2_256
-# undef UD2_1024
-# undef UD2_PAGE
-
-
/* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",@progbits
=09
Modified: trunk/coregrind/m_translate.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_translate.c 2005-09-29 10:24:17 UTC (rev 4818)
+++ trunk/coregrind/m_translate.c 2005-09-29 11:09:56 UTC (rev 4819)
@@ -115,8 +115,8 @@
=20
#elif defined(VGA_ppc32)
*vex_arch =3D VexArchPPC32;
- vai->subarch =3D VG_(have_altivec_ppc) ? VexSubArchPPC32_AV
- : VexSubArchPPC32_noAV;
+ vai->subarch =3D VG_(have_altivec_ppc32) ? VexSubArchPPC32_AV
+ : VexSubArchPPC32_noAV;
vai->ppc32_cache_line_szB =3D VG_(cache_line_size_ppc32);
return True;
=20
Modified: trunk/coregrind/pub_core_machine.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_machine.h 2005-09-29 10:24:17 UTC (rev 4818)
+++ trunk/coregrind/pub_core_machine.h 2005-09-29 11:09:56 UTC (rev 4819)
@@ -84,7 +84,7 @@
// entries.
extern Int VG_(cache_line_size_ppc32);
// Altivec enabled? Harvested on startup from the AT_HWCAP entry
-extern Int VG_(have_altivec_ppc);
+extern Int VG_(have_altivec_ppc32);
#endif
=20
// X86: set to 1 if the host is able to do {ld,st}mxcsr (load/store
Modified: trunk/coregrind/vki_unistd-ppc32-linux.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/vki_unistd-ppc32-linux.h 2005-09-29 10:24:17 UTC (rev=
4818)
+++ trunk/coregrind/vki_unistd-ppc32-linux.h 2005-09-29 11:09:56 UTC (rev=
4819)
@@ -55,7 +55,7 @@
#define __NR_setuid 23
#define __NR_getuid 24
//#define __NR_stime 25
-//#define __NR_ptrace 26
+#define __NR_ptrace 26
#define __NR_alarm 27
//#define __NR_oldfstat 28
#define __NR_pause 29
|
|
From: <sv...@va...> - 2005-09-29 10:24:27
|
Author: sewardj
Date: 2005-09-29 11:24:17 +0100 (Thu, 29 Sep 2005)
New Revision: 4818
Log:
Comment-only changes
Modified:
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-amd64-linux.c 2005-09-29 00:35:18 U=
TC (rev 4817)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2005-09-29 10:24:17 U=
TC (rev 4818)
@@ -212,9 +212,11 @@
" ud2\n" // should never get here
);
=20
-/*
- Allocate a stack for the main thread, and run it all the way to the
- end. =20
+
+/* Allocate a stack for the main thread, and run it all the way to the
+ end. Although we already have a working VgStack
+ (VG_(interim_stack)) it's better to allocate a new one, so that
+ overflow detection works uniformly for all threads.
*/
void VG_(main_thread_wrapper_NORETURN)(ThreadId tid)
{
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-x86-linux.c 2005-09-29 00:35:18 UTC=
(rev 4817)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2005-09-29 10:24:17 UTC=
(rev 4818)
@@ -214,7 +214,7 @@
=20
/* Allocate a stack for the main thread, and run it all the way to the
end. Although we already have a working VgStack
- (VG_(the_root_stack)) it's better to allocate a new one, so that
+ (VG_(interim_stack)) it's better to allocate a new one, so that
overflow detection works uniformly for all threads.
*/
void VG_(main_thread_wrapper_NORETURN)(ThreadId tid)
|
|
From: <js...@ac...> - 2005-09-29 03:01:07
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-09-29 03:30:00 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 == 186 tests, 2 stderr failures, 0 stdout failures ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <to...@co...> - 2005-09-29 02:40:37
|
Nightly build on dunsmere ( athlon, Fedora Core 4 ) started at 2005-09-29 03:30:05 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 188 tests, 11 stderr failures, 2 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_exit_group (stderr) memcheck/tests/xml1 (stderr) memcheck/tests/zeropage (stdout) memcheck/tests/zeropage (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/x86/pushpopseg (stdout) none/tests/x86/pushpopseg (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 188 tests, 8 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Thu Sep 29 03:35:20 2005 --- new.short Thu Sep 29 03:40:30 2005 *************** *** 8,10 **** ! == 188 tests, 8 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) --- 8,10 ---- ! == 188 tests, 11 stderr failures, 2 stdout failures ================= memcheck/tests/leak-tree (stderr) *************** *** 14,18 **** --- 14,23 ---- memcheck/tests/x86/scalar (stderr) + memcheck/tests/x86/scalar_exit_group (stderr) memcheck/tests/xml1 (stderr) + memcheck/tests/zeropage (stdout) + memcheck/tests/zeropage (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) + none/tests/x86/pushpopseg (stdout) + none/tests/x86/pushpopseg (stderr) |