|
From: Julian S. <js...@ac...> - 2003-11-03 14:43:36
|
CVS commit by jseward: Merge rev 1.17: Updated FAQ #8, to reflect the fact that we now support a lot of SSE/SSE2 instructions. M +9 -13 FAQ.txt 1.7.2.4 --- valgrind/FAQ.txt #1.7.2.3:1.7.2.4 @@ -153,19 +153,15 @@ ----------------------------------------------------------------- -Q8. My program dies (exactly) like this: +Q8. My program dies, printing a message like this along the way: - REPE then 0xF - valgrind: the `impossible' happened: - Unhandled REPE case + disInstr: unhandled instruction bytes: 0x66 0xF 0x2E 0x5 -A8. Yeah ... that I believe is a SSE or SSE2 instruction. Are you - building your app with -march=pentium4 or -march=athlon or - something like that? If you can somehow dissuade gcc from - producing SSE/SSE2 instructions, you may be able to avoid this. - Some folks have reported that removing the flag -march=... - works around this. - - I'd be interested to hear if you can get rid of it by changing - your application build flags. +A8. Valgrind doesn't support the full x86 instruction set, although it + now supports many SSE and SSE2 instructions. If you know the + failing instruction is an SSE/SSE2 instruction, you might be able + to recompile your program without it by fiddling with the + -march=... flag(s) for gcc. In particular, get rid of + -march=pentium4 or -march=athlon if you can. Either way, let us + know and we'll try to fix it. ----------------------------------------------------------------- |
|
From: Julian S. <js...@ac...> - 2003-11-03 14:58:50
|
CVS commit by jseward:
Merge in .cfi support from head:
configure.in 1.96 (partial) and 1.98
coregrind/vg_startup.S 1.17 and 1.18
M +17 -0 configure.in 1.93.2.3
M +17 -0 coregrind/vg_startup.S 1.16.2.1
--- valgrind/configure.in #1.93.2.2:1.93.2.3
@@ -282,4 +282,21 @@
+# check if the GNU as supports CFI directives
+AC_MSG_CHECKING([if gas accepts .cfi])
+AC_TRY_LINK(, [
+
+__asm__ __volatile__ (".cfi_startproc\n"
+ ".cfi_adjust_cfa_offset 0x0\n"
+ ".cfi_endproc\n");
+],
+[
+ AC_DEFINE_UNQUOTED([HAVE_GAS_CFI], 1, [Define if your GNU as supports .cfi])
+ AC_MSG_RESULT(yes)
+],
+ AC_MSG_RESULT(no)
+)
+
+
+
AC_MSG_CHECKING([if this is an NPTL-based system])
safe_LIBS="$LIBS"
--- valgrind/coregrind/vg_startup.S #1.16:1.16.2.1
@@ -31,4 +31,5 @@
#include "vg_constants.h"
+#include "../config.h"
@@ -229,6 +230,10 @@
.text
+.type VG_(swizzle_esp_then_start_GDB),@function
.global VG_(swizzle_esp_then_start_GDB)
VG_(swizzle_esp_then_start_GDB):
+#ifdef HAVE_GAS_CFI
+ .cfi_startproc
+#endif
pushal
@@ -257,6 +262,12 @@
# push %EBP. This is a faked %ebp-chain pointer.
pushl %eax
+#ifdef HAVE_GAS_CFI
+ .cfi_adjust_cfa_offset 0x4
+#endif
movl %esp, %ebp
+#ifdef HAVE_GAS_CFI
+ .cfi_def_cfa_register ebp
+#endif
call VG_(start_GDB_whilst_on_client_stack)
@@ -265,7 +276,13 @@
movl vg_ebp_saved_over_GDB_start, %ebp
movl vg_esp_saved_over_GDB_start, %esp
+#ifdef HAVE_GAS_CFI
+ .cfi_adjust_cfa_offset -0x4
+#endif
popal
ret
+#ifdef HAVE_GAS_CFI
+ .cfi_endproc
+#endif
# gcc puts this construction at the end of every function. I think it
|
|
From: Julian S. <js...@ac...> - 2003-11-04 07:41:09
|
CVS commit by jseward:
Changes for 20031104.
M +42 -0 NEWS 1.10.2.6
--- valgrind/NEWS #1.10.2.5:1.10.2.6
@@ -1,3 +1,45 @@
+Snapshot 20031104 (4 Nov 2003)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+20031104 improves SSE/SSE2 support, fixes some minor bugs, and
+improves support for SuSE 9 and the Red Hat "Severn" beta.
+
+- Further improvements to SSE/SSE2 support. The entire test suite of
+ the GNU Scientific Library (gsl-1.4) compiled with Intel Icc 7.1
+ 20030307Z '-g -O -xW' now works. I think this gives pretty good
+ coverage of SSE/SSE2 floating point instructions, or at least the
+ subset emitted by Icc.
+
+- Also added support for the following instructions:
+ MOVNTDQ UCOMISD UNPCKLPS UNPCKHPS SQRTSS
+ PUSH/POP %{FS,GS}, and PUSH %CS (Nb: there is no POP %CS).
+
+- CFI support for GDB version 6. Needed to enable newer GDBs
+ to figure out where they are when using --gdb-attach=yes.
+
+- Fix this:
+ mc_translate.c:1091 (memcheck_instrument): Assertion
+ `u_in->size == 4 || u_in->size == 16' failed.
+
+- Return an error rather than panicing when given a bad socketcall.
+
+- Fix checking of syscall rt_sigtimedwait().
+
+- Implement __NR_clock_gettime (syscall 265). Needed on Red Hat Severn.
+
+- Fixed bug in overlap check in strncpy() -- it was assuming the src was 'n'
+ bytes long, when it could be shorter, which could cause false
+ positives.
+
+- Support use of select() for very large numbers of file descriptors.
+
+- Don't fail silently if the executable is statically linked, or is
+ setuid/setgid. Print an error message instead.
+
+- Support for old DWARF-1 format line number info.
+
+
+
Snapshot 20031012 (12 October 2003)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
From: Julian S. <js...@ac...> - 2003-11-04 08:05:38
|
CVS commit by jseward: --> 20031104 (tentatively) M +1 -1 configure.in 1.93.2.4 --- valgrind/configure.in #1.93.2.3:1.93.2.4 @@ -2,5 +2,5 @@ AC_INIT(coregrind/vg_main.c) # give me a source file, any source file... AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(valgrind, 20031012) +AM_INIT_AUTOMAKE(valgrind, 20031104) AM_MAINTAINER_MODE |
|
From: Julian S. <js...@ac...> - 2003-11-06 00:06:51
|
CVS commit by jseward: --> 2.0.0. Hell, you only live once (so they say) M +1 -1 configure.in 1.93.2.5 --- valgrind/configure.in #1.93.2.4:1.93.2.5 @@ -2,5 +2,5 @@ AC_INIT(coregrind/vg_main.c) # give me a source file, any source file... AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(valgrind, 20031104) +AM_INIT_AUTOMAKE(valgrind, 2.0.0) AM_MAINTAINER_MODE |
|
From: Julian S. <js...@ac...> - 2003-11-06 00:47:45
|
CVS commit by jseward: Update docs a bit for 2.0.0. MERGE TO HEAD M +30 -37 coregrind/docs/coregrind_core.html 1.10.2.3 M +7 -12 coregrind/docs/coregrind_intro.html 1.5.2.1 M +2 -2 docs/manual.html 1.42.2.2 M +2 -3 memcheck/docs/mc_main.html 1.7.2.2 |
|
From: Julian S. <js...@ac...> - 2003-11-06 01:07:56
|
CVS commit by jseward: Update misc text files for 2.0.0. MERGE TO HEAD M +8 -3 AUTHORS 1.4.4.1 M +3 -3 FAQ.txt 1.7.2.5 M +3 -3 NEWS 1.10.2.7 M +13 -38 README 1.11.2.1 M +4 -17 README_DEVELOPERS 1.1.2.1 M +10 -32 README_KDE3_FOLKS 1.3.8.1 M +1 -1 README_PACKAGERS 1.2.8.1 |
|
From: Dirk M. <mu...@kd...> - 2003-11-19 21:31:50
|
CVS commit by mueller:
backport compile fix. sorry for the breakage in the stable branch.
M +2 -0 coregrind/vg_syscalls.c 1.40.2.9
M +0 -3 coregrind/vg_unsafe.h 1.14.2.5
M +34 -1 include/vg_kerneliface.h 1.1.2.1
--- valgrind/coregrind/vg_syscalls.c #1.40.2.8:1.40.2.9
@@ -3262,4 +3262,6 @@ void VG_(perform_assumed_nonblocking_sys
MAYBE_PRINTF("statfs64 ( %s, %p )\n", arg1,arg2);
SYSCALL_TRACK( pre_mem_read_asciiz, tid, "statfs64(path)", arg1 );
+ SYSCALL_TRACK( pre_mem_write, tid, "statfs64(buf)",
+ arg2, sizeof(struct statfs64));
KERNEL_DO_SYSCALL(tid,res);
if (!VG_(is_kerror)(res) && res == 0)
--- valgrind/coregrind/vg_unsafe.h #1.14.2.4:1.14.2.5
@@ -84,7 +84,4 @@
#include <sys/types.h>
-#include <asm/statfs.h>
-#undef statfs
-
#include <sys/sysinfo.h>
--- valgrind/include/vg_kerneliface.h #1.1:1.1.2.1
@@ -412,6 +412,39 @@ typedef struct vki_modify_ldt_ldt_s {
+/* statfs structs */
+/*
+ * bits/statfs.h
+ */
-#endif /* ndef __VG_KERNELIFACE_H */
+struct statfs {
+ unsigned int f_type;
+ unsigned int f_bsize;
+ unsigned int f_blocks;
+ unsigned int f_bfree;
+ unsigned int f_bavail;
+ unsigned int f_files;
+ unsigned int f_ffree;
+ int f_fsid[ 2 ];
+ unsigned int f_namelen;
+ unsigned int f_frsize;
+ unsigned int f_spare[5];
+};
+
+struct statfs64 {
+ unsigned int f_type;
+ unsigned int f_bsize;
+ unsigned long long f_blocks;
+ unsigned long long f_bfree;
+ unsigned long long f_bavail;
+ unsigned long long f_files;
+ unsigned long long f_ffree;
+ int f_fsid[ 2 ];
+ unsigned int f_namelen;
+ unsigned int f_frsize;
+ unsigned int f_spare[5];
+};
+
+
+#endif /* __VG_KERNELIFACE_H */
/*--------------------------------------------------------------------*/
|
|
From: Dirk M. <mu...@kd...> - 2003-11-24 21:25:30
|
CVS commit by mueller: fix spec file error M +3 -0 valgrind.spec.in 1.8.2.1 --- valgrind/valgrind.spec.in #1.8:1.8.2.1 @@ -42,4 +42,7 @@ /usr/include/valgrind/memcheck.h /usr/include/valgrind/helgrind.h +/usr/include/valgrind/vg_constants_skin.h +/usr/include/valgrind/vg_kerneliface.h +/usr/include/valgrind/vg_skin.h /usr/bin/valgrind /usr/bin/cg_annotate |
|
From: Nicholas N. <nj...@ca...> - 2003-12-03 21:46:44
|
CVS commit by nethercote:
(Mostly) merged from HEAD:
Updated the README file. It had lots of out-of-date and incorrect information
in it, much of it from 1.0.X days. Did it in such a way that if it doesn't get
touched (and it undoubtedly won't) it won't really go out of date, eg. by
removing temporary details like version numbers, dates, details of specific
software incompatibilities. It's much better to be vague but correct, than
precise but incorrect; having incorrect info in a file as important as the
README is bad. Also removed the README_KDE3_FOLKS file because it's pretty
redundant now.
Did similar, but smaller changes to README_DEVELOPERS and README_PACKAGERS.
Also updated the valgrind.spec.in file to use the new, post-1.0.X description
in the README.
Also fixed a minor omission in Addrcheck's docs.
M +1 -1 Makefile.am 1.55.2.1
M +48 -27 README 1.11.2.2
M +15 -4 README_DEVELOPERS 1.1.2.2
M +0 -2 README_PACKAGERS 1.2.8.2
M +9 -14 valgrind.spec.in 1.8.2.2
M +2 -0 addrcheck/docs/ac_main.html 1.2.4.1
R README_KDE3_FOLKS 1.3.8.1
--- valgrind/Makefile.am #1.55:1.55.2.1
@@ -39,5 +39,5 @@
FAQ.txt \
PATCHES_APPLIED ACKNOWLEDGEMENTS \
- README_KDE3_FOLKS README_PACKAGERS \
+ README_PACKAGERS \
README_MISSING_SYSCALL_OR_IOCTL TODO \
valgrind.spec valgrind.spec.in
--- valgrind/README #1.11.2.1:1.11.2.2
@@ -1,8 +1,5 @@
-Release notes for Valgrind, version 2.0.0
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-KDE3 developers: please read also README_KDE3_FOLKS for guidance
-about how to debug KDE3 applications with Valgrind.
-
+Release notes for Valgrind
+~~~~~~~~~~~~~~~~~~~~~~~~~~
If you are building a binary package of Valgrind for distribution,
please read README_PACKAGERS. It contains some important information.
@@ -13,20 +10,31 @@
For instructions on how to build/install, see the end of this file.
+Valgrind works on most, reasonably recent Linux setups. If you have
+problems, consult FAQ.txt to see if there are workarounds.
Executive Summary
~~~~~~~~~~~~~~~~~
-Valgrind is a tool to help you find memory-management problems in your
-programs. When a program is run under Valgrind's supervision, all
-reads and writes of memory are checked, and calls to
-malloc/new/free/delete are intercepted. As a result, Valgrind can
-detect problems such as:
-
- Use of uninitialised memory
- Reading/writing memory after it has been free'd
- Reading/writing off the end of malloc'd blocks
- Reading/writing inappropriate areas on the stack
+Valgrind is a GPL'd system for debugging and profiling x86-Linux programs.
+With the tools that come with Valgrind, you can automatically detect
+many memory management and threading bugs, avoiding hours of frustrating
+bug-hunting, making your programs more stable. You can also perform
+detailed profiling to help speed up your programs.
+
+The Valgrind distribution includes four tools: two memory error
+detectors, a thread error detector, and a cache profiler. Several other
+tools have been built with Valgrind.
+
+To give you an idea of what Valgrind tools do, when a program is run
+under the supervision of the first memory error detector tool, all reads
+and writes of memory are checked, and calls to malloc/new/free/delete
+are intercepted. As a result, it can detect problems such as:
+
+ Use of uninitialised memory
+ Reading/writing memory after it has been free'd
+ Reading/writing off the end of malloc'd blocks
+ Reading/writing inappropriate areas on the stack
Memory leaks -- where pointers to malloc'd blocks are lost forever
Passing of uninitialised and/or unaddressible memory to system calls
- Mismatched use of malloc/new/new [] vs free/delete/delete []
+ Mismatched use of malloc/new/new [] vs free/delete/delete []
Overlaps of arguments to strcpy() and related functions
Some abuses of the POSIX pthread API
@@ -34,8 +42,12 @@
Problems like these can be difficult to find by other means, often
lying undetected for long periods, then causing occasional,
-difficult-to-diagnose crashes.
-
-When Valgrind detects such a problem, it can, if you like, attach GDB
-to your program, so you can poke around and see what's going on.
+difficult-to-diagnose crashes. When one of these errors occurs, you can
+attach GDB to your program, so you can poke around and see what's going
+on.
+
+Valgrind is closely tied to details of the CPU, operating system and
+to a less extent, compiler and basic C libraries. This makes it
+difficult to make it portable, so I have chosen at the outset to
+concentrate on what I believe to be a widely used platform: x86/Linux.
Valgrind is licensed under the GNU General Public License, version 2.
@@ -47,21 +59,32 @@
A comprehensive user guide is supplied. Point your browser at
$PREFIX/share/doc/valgrind/manual.html, where $PREFIX is whatever you
-specified with --prefix= when building.
+specified with --prefix= when building.
Building and installing it
~~~~~~~~~~~~~~~~~~~~~~~~~~
+To install from CVS :
+
+ 0. Check out the code from CVS, following the instructions at
+ http://developer.kde.org/source/anoncvs.html. The 'modulename' is
+ "valgrind".
+
+ 1. cd into the source directory.
+
+ 2. Run ./autogen.sh to setup the environment (you need the standard
+ autoconf tools to do so).
+
To install from a tar.bz2 distribution:
- 1. Run ./configure, with some options if you wish. The standard
+ 3. Run ./configure, with some options if you wish. The standard
options are documented in the INSTALL file. The only interesting
one is the usual --prefix=/where/you/want/it/installed.
- 2. Do "make".
+ 4. Do "make".
- 3. Do "make install", possibly as root if the destination permissions
+ 5. Do "make install", possibly as root if the destination permissions
require that.
- 4. See if it works. Try "valgrind ls -l". Either this works,
+ 6. See if it works. Try "valgrind ls -l". Either this works,
or it bombs out complaining it can't find argc/argv/envp.
In that case, mail me a bug report.
@@ -76,4 +99,2 @@
Nick Nethercote (nj...@ca...)
Jeremy Fitzhardinge (je...@go...)
-
-5 November 2003
--- valgrind/README_DEVELOPERS #1.1.2.1:1.1.2.2
@@ -1,3 +1,18 @@
+Building and not installing it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+To run Valgrind without having to install it, run coregrind/valgrind (prefix
+with "sh" because it's not executable) with the --in-place=<dir> option, where
+<dir> is the root of the source tree (and must be an absolute path). Eg:
+
+ sh ~/grind/head4/coregrind/valgrind --in-place=/homes/njn25/grind/head4
+
+This allows you to compile and run with "make" instead of "make install",
+saving you time.
+
+I recommend compiling with "make --quiet" to further reduce the amount of
+output spewed out during compilation, letting you actually see any errors,
+warnings, etc.
+
Running the regression tests
@@ -16,7 +31,3 @@
perl tests/vg_regtest memcheck/tests/badfree.vgtest
perl tests/vg_regtest memcheck/tests/badfree
-
-
-Nick Nethercote (nj...@ca...)
-Last updated 5 November 2003
--- valgrind/README_PACKAGERS #1.2.8.1:1.2.8.2
@@ -1,5 +1,3 @@
-5 November 2003
-
Greetings, packaging person! This information is aimed at people
building binary distributions of Valgrind.
--- valgrind/valgrind.spec.in #1.8.2.1:1.8.2.2
@@ -12,18 +12,13 @@
%description
-Valgrind is a GPL'd tool to help you find memory-management problems
-in your programs. When a program is run under Valgrind's supervision,
-all reads and writes of memory are checked, and calls to
-malloc/new/free/delete are intercepted. As a result, Valgrind can
-detect problems such as:
+Valgrind is a GPL'd system for debugging and profiling x86-Linux programs.
+With the tools that come with Valgrind, you can automatically detect
+many memory management and threading bugs, avoiding hours of frustrating
+bug-hunting, making your programs more stable. You can also perform
+detailed profiling to help speed up your programs.
-- Use of uninitialised memory
-- Reading/writing memory after it has been free'd
-- Reading/writing off the end of malloc'd blocks
-- Reading/writing inappropriate areas on the stack
-- Memory leaks -- where pointers to malloc'd blocks are lost forever
-- Passing of uninitialised and/or unaddressible memory to system calls
-- Mismatched use of malloc/new/new [] vs free/delete/delete []
-- Some abuses of the POSIX Pthreads API
+The Valgrind distribution includes four tools: two memory error
+detectors, a thread error detector, and a cache profiler. Several other
+tools have been built with Valgrind.
%prep
--- valgrind/addrcheck/docs/ac_main.html #1.2:1.2.4.1
@@ -26,4 +26,6 @@
forever</li>
<li>Mismatched use of malloc/new/new [] vs free/delete/delete []</li>
+ <li>Overlapping <code>src</code> and <code>dst</code> pointers in
+ <code>memcpy()</code> and related functions</li>
<li>Some misuses of the POSIX pthreads API</li>
</ul>
|
|
From: Dirk M. <mu...@kd...> - 2003-12-07 23:29:20
|
CVS commit by mueller:
add some const's in strategic places to make it compile with gcc 3.4
M +3 -3 coregrind/vg_default.c 1.16.2.1
M +3 -3 coregrind/vg_include.h 1.142.2.3
M +1 -1 coregrind/vg_intercept.c 1.18.2.4
M +2 -2 coregrind/vg_libpthread.c 1.130.2.3
M +8 -8 coregrind/vg_mylibc.c 1.45.2.1
M +3 -3 include/vg_skin.h 1.79.2.5
--- valgrind/coregrind/vg_default.c #1.16:1.16.2.1
@@ -46,5 +46,5 @@
static __attribute__ ((noreturn))
-void fund_panic ( Char* fn )
+void fund_panic ( const Char* fn )
{
VG_(printf)(
@@ -57,5 +57,5 @@ void fund_panic ( Char* fn )
static __attribute__ ((noreturn))
-void non_fund_panic ( Char* fn )
+void non_fund_panic ( const Char* fn )
{
VG_(printf)(
@@ -68,5 +68,5 @@ void non_fund_panic ( Char* fn )
static __attribute__ ((noreturn))
-void malloc_panic ( Char* fn )
+void malloc_panic ( const Char* fn )
{
VG_(printf)(
--- valgrind/coregrind/vg_include.h #1.142.2.2:1.142.2.3
@@ -1025,8 +1025,8 @@ extern void VG_(restore_all_host_signals
__PRETTY_FUNCTION__), 0)))
__attribute__ ((__noreturn__))
-extern void VG_(core_assert_fail) ( Char* expr, Char* file,
- Int line, Char* fn );
+extern void VG_(core_assert_fail) ( const Char* expr, const Char* file,
+ UInt line, const Char* fn );
__attribute__ ((__noreturn__))
-extern void VG_(core_panic) ( Char* str );
+extern void VG_(core_panic) ( const Char* str );
/* VG_(brk) not public so skins cannot screw with curr_dataseg_end */
--- valgrind/coregrind/vg_intercept.c #1.18.2.3:1.18.2.4
@@ -218,5 +218,5 @@ void my_exit ( int arg )
static
-void my_assert_fail ( Char* expr, Char* file, Int line, Char* fn )
+void my_assert_fail ( const Char* expr, const Char* file, UInt line, const Char* fn )
{
char buf[1000];
--- valgrind/coregrind/vg_libpthread.c #1.130.2.2:1.130.2.3
@@ -176,5 +176,5 @@ __asm__ (
static
__attribute__((noreturn))
-void barf ( char* str )
+void barf ( const char* str )
{
char buf[1000];
@@ -222,5 +222,5 @@ void vgPlain_unimp ( char* what )
static
-void my_assert_fail ( Char* expr, Char* file, Int line, Char* fn )
+void my_assert_fail ( const Char* expr, const Char* file, UInt line, const Char* fn )
{
char buf[1000];
--- valgrind/coregrind/vg_mylibc.c #1.45:1.45.2.1
@@ -1078,5 +1078,5 @@ Bool VG_(string_match) ( Char* pat, Char
__attribute__ ((noreturn))
-static void report_and_quit ( Char* report )
+static void report_and_quit ( const Char* report )
{
VG_(pp_sched_status)();
@@ -1094,6 +1094,6 @@ static void report_and_quit ( Char* repo
__attribute__ ((noreturn))
-static void assert_fail ( Char* expr, Char* name, Char* report,
- Char* file, Int line, Char* fn )
+static void assert_fail ( const Char* expr, const Char* name, const Char* report,
+ const Char* file, UInt line, const Char* fn )
{
static Bool entered = False;
@@ -1106,5 +1106,5 @@ static void assert_fail ( Char* expr, Ch
}
-void VG_(skin_assert_fail) ( Char* expr, Char* file, Int line, Char* fn )
+void VG_(skin_assert_fail) ( const Char* expr, const Char* file, UInt line, const Char* fn )
{
assert_fail(expr, VG_(details).name, VG_(details).bug_reports_to,
@@ -1112,5 +1112,5 @@ void VG_(skin_assert_fail) ( Char* expr,
}
-void VG_(core_assert_fail) ( Char* expr, Char* file, Int line, Char* fn )
+void VG_(core_assert_fail) ( const Char* expr, const Char* file, UInt line, const Char* fn )
{
assert_fail(expr, "valgrind", VG_EMAIL_ADDR, file, line, fn);
@@ -1118,5 +1118,5 @@ void VG_(core_assert_fail) ( Char* expr,
__attribute__ ((noreturn))
-static void panic ( Char* name, Char* report, Char* str )
+static void panic ( const Char* name, const Char* report, const Char* str )
{
VG_(printf)("\n%s: the `impossible' happened:\n %s\n", name, str);
@@ -1125,10 +1125,10 @@ static void panic ( Char* name, Char* re
}
-void VG_(core_panic) ( Char* str )
+void VG_(core_panic) ( const Char* str )
{
panic("valgrind", VG_EMAIL_ADDR, str);
}
-void VG_(skin_panic) ( Char* str )
+void VG_(skin_panic) ( const Char* str )
{
panic(VG_(details).name, VG_(details).bug_reports_to, str);
--- valgrind/include/vg_skin.h #1.79.2.4:1.79.2.5
@@ -356,5 +356,5 @@ extern void VG_(exit)( Int status )
reporting info, aborts. */
__attribute__ ((__noreturn__))
-extern void VG_(skin_panic) ( Char* str );
+extern void VG_(skin_panic) ( const Char* str );
/* Looks up VG_(client_envp) */
@@ -442,6 +442,6 @@ extern Char* VG_(getcwd) ( Char* buf, In
__attribute__ ((__noreturn__))
-extern void VG_(skin_assert_fail) ( Char* expr, Char* file,
- Int line, Char* fn );
+extern void VG_(skin_assert_fail) ( const Char* expr, const Char* file,
+ UInt line, const Char* fn );
|
|
From: Dirk M. <mu...@kd...> - 2004-01-02 22:44:15
|
CVS commit by mueller:
backport pkgconfig support
A valgrind.pc.in 1.1.2.1
M +1 -0 .cvsignore 1.4.4.1
M +5 -2 Makefile.am 1.55.2.2
M +1 -0 configure.in 1.93.2.6
--- valgrind/.cvsignore #1.4:1.4.4.1
@@ -11,4 +11,5 @@
vg_annotate
vg_cachegen
+valgrind.pc
default.supp
bin
--- valgrind/Makefile.am #1.55.2.1:1.55.2.2
@@ -26,5 +26,8 @@
val_DATA = $(SUPP_FILES) default.supp
-BUILT_SOURCES = default.supp
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = valgrind.pc
+
+BUILT_SOURCES = default.supp valgrind.pc
DISTCLEANFILES = default.supp
@@ -41,5 +44,5 @@
README_PACKAGERS \
README_MISSING_SYSCALL_OR_IOCTL TODO \
- valgrind.spec valgrind.spec.in
+ valgrind.spec valgrind.spec.in valgrind.pc.in
install-exec-hook:
--- valgrind/configure.in #1.93.2.5:1.93.2.6
@@ -379,4 +379,5 @@
Makefile
valgrind.spec
+ valgrind.pc
docs/Makefile
tests/Makefile
|
|
From: Dirk M. <mu...@kd...> - 2004-01-02 22:49:12
|
CVS commit by mueller:
cmpxchg8b support (backport)
M +24 -0 coregrind/vg_helpers.S 1.23.2.2
M +2 -0 coregrind/vg_include.h 1.142.2.4
M +3 -0 coregrind/vg_main.c 1.110.2.5
M +75 -1 coregrind/vg_to_ucode.c 1.87.2.15
M +2 -0 include/vg_skin.h 1.79.2.6
--- valgrind/coregrind/vg_helpers.S #1.23.2.1:1.23.2.2
@@ -80,4 +80,5 @@
* setting and getting obscure eflags
* double-length shifts
+ * eight byte compare and exchange
All routines use a standard calling convention designed for
@@ -616,4 +617,27 @@
+/* Eight byte compare and exchange. */
+.globl VG_(helper_cmpxchg8b)
+VG_(helper_cmpxchg8b):
+ pushl %eax
+ pushl %ebx
+ pushl %ecx
+ pushl %edx
+ movl 20(%esp), %eax
+ movl 24(%esp), %edx
+ movl 28(%esp), %ebx
+ movl 32(%esp), %ecx
+ cmpxchg8b 36(%esp)
+ movl %eax, 20(%esp)
+ movl %edx, 24(%esp)
+ movl %ebx, 28(%esp)
+ movl %ecx, 32(%esp)
+ popl %edx
+ popl %ecx
+ popl %ebx
+ popl %eax
+ ret
+
+
/* Undefined instruction (generates SIGILL) */
.globl VG_(helper_undefined_instruction)
--- valgrind/coregrind/vg_include.h #1.142.2.3:1.142.2.4
@@ -1579,4 +1579,6 @@ extern void VG_(helper_DAS);
extern void VG_(helper_DAA);
+extern void VG_(helper_cmpxchg8b);
+
extern void VG_(helper_undefined_instruction);
--- valgrind/coregrind/vg_main.c #1.110.2.4:1.110.2.5
@@ -103,4 +103,5 @@ Int VGOFF_(helper_LAHF) = INVALID_OFFSET
Int VGOFF_(helper_DAS) = INVALID_OFFSET;
Int VGOFF_(helper_DAA) = INVALID_OFFSET;
+Int VGOFF_(helper_cmpxchg8b) = INVALID_OFFSET;
Int VGOFF_(helper_undefined_instruction) = INVALID_OFFSET;
@@ -382,4 +383,6 @@ static void vg_init_baseBlock ( void )
VGOFF_(helper_OUT)
= alloc_BaB_1_set( (Addr) & VG_(helper_OUT));
+ VGOFF_(helper_cmpxchg8b)
+ = alloc_BaB_1_set( (Addr) & VG_(helper_cmpxchg8b));
VGOFF_(helper_undefined_instruction)
--- valgrind/coregrind/vg_to_ucode.c #1.87.2.14:1.87.2.15
@@ -3052,5 +3052,5 @@ Addr dis_cmpxchg_G_E ( UCodeBlock* cb,
uInstr2(cb, GET, size, ArchReg, gregOfRM(rm), TempReg, src);
uInstr2(cb, GET, size, ArchReg, R_EAX, TempReg, acc);
- uInstr2(cb, MOV, size, TempReg, acc, TempReg, junk);
+ uInstr2(cb, MOV, 4, TempReg, acc, TempReg, junk);
uInstr2(cb, SUB, size, TempReg, dest, TempReg, junk);
setFlagsFromUOpcode(cb, SUB);
@@ -3074,4 +3074,72 @@ Addr dis_cmpxchg_G_E ( UCodeBlock* cb,
+static
+Addr dis_cmpxchg8b ( UCodeBlock* cb,
+ UChar sorb,
+ Addr eip0 )
+{
+ Int tal, tah, junkl, junkh, destl, desth, srcl, srch, accl, acch;
+ UChar dis_buf[50];
+ UChar rm;
+ UInt pair;
+
+ rm = getUChar(eip0);
+ accl = newTemp(cb);
+ acch = newTemp(cb);
+ srcl = newTemp(cb);
+ srch = newTemp(cb);
+ destl = newTemp(cb);
+ desth = newTemp(cb);
+ junkl = newTemp(cb);
+ junkh = newTemp(cb);
+
+ vg_assert(!epartIsReg(rm));
+
+ pair = disAMode ( cb, sorb, eip0, dis?dis_buf:NULL );
+ tal = LOW24(pair);
+ tah = newTemp(cb);
+ uInstr2(cb, MOV, 4, TempReg, tal, TempReg, tah);
+ uInstr2(cb, ADD, 4, Literal, 0, TempReg, tah);
+ uLiteral(cb, 4);
+ eip0 += HI8(pair);
+ if (dis) VG_(printf)("cmpxchg8b %s\n", dis_buf);
+
+ uInstr0(cb, CALLM_S, 0);
+
+ uInstr2(cb, LOAD, 4, TempReg, tah, TempReg, desth);
+ uInstr1(cb, PUSH, 4, TempReg, desth);
+ uInstr2(cb, LOAD, 4, TempReg, tal, TempReg, destl);
+ uInstr1(cb, PUSH, 4, TempReg, destl);
+ uInstr2(cb, GET, 4, ArchReg, R_ECX, TempReg, srch);
+ uInstr1(cb, PUSH, 4, TempReg, srch);
+ uInstr2(cb, GET, 4, ArchReg, R_EBX, TempReg, srcl);
+ uInstr1(cb, PUSH, 4, TempReg, srcl);
+ uInstr2(cb, GET, 4, ArchReg, R_EDX, TempReg, acch);
+ uInstr1(cb, PUSH, 4, TempReg, acch);
+ uInstr2(cb, GET, 4, ArchReg, R_EAX, TempReg, accl);
+ uInstr1(cb, PUSH, 4, TempReg, accl);
+
+ uInstr1(cb, CALLM, 0, Lit16, VGOFF_(helper_cmpxchg8b));
+ uFlagsRWU(cb, FlagsEmpty, FlagZ, FlagsEmpty);
+
+ uInstr1(cb, POP, 4, TempReg, accl);
+ uInstr2(cb, PUT, 4, TempReg, accl, ArchReg, R_EAX);
+ uInstr1(cb, POP, 4, TempReg, acch);
+ uInstr2(cb, PUT, 4, TempReg, acch, ArchReg, R_EDX);
+ uInstr1(cb, POP, 4, TempReg, srcl);
+ uInstr2(cb, PUT, 4, TempReg, srcl, ArchReg, R_EBX);
+ uInstr1(cb, POP, 4, TempReg, srch);
+ uInstr2(cb, PUT, 4, TempReg, srch, ArchReg, R_ECX);
+ uInstr1(cb, POP, 4, TempReg, destl);
+ uInstr2(cb, STORE, 4, TempReg, destl, TempReg, tal);
+ uInstr1(cb, POP, 4, TempReg, desth);
+ uInstr2(cb, STORE, 4, TempReg, desth, TempReg, tah);
+
+ uInstr0(cb, CALLM_E, 0);
+
+ return eip0;
+}
+
+
/* Handle conditional move instructions of the form
cmovcc E(reg-or-mem), G(reg)
@@ -6205,7 +6273,13 @@ static Addr disInstr ( UCodeBlock* cb, A
/* =-=-=-=-=-=-=-=-=- CMPXCHG -=-=-=-=-=-=-=-=-=-= */
+ case 0xB0: /* CMPXCHG Gv,Ev */
+ eip = dis_cmpxchg_G_E ( cb, sorb, 1, eip );
+ break;
case 0xB1: /* CMPXCHG Gv,Ev */
eip = dis_cmpxchg_G_E ( cb, sorb, sz, eip );
break;
+ case 0xC7: /* CMPXCHG8B Gv */
+ eip = dis_cmpxchg8b ( cb, sorb, eip );
+ break;
/* =-=-=-=-=-=-=-=-=- CPUID -=-=-=-=-=-=-=-=-=-=-= */
--- valgrind/include/vg_skin.h #1.79.2.5:1.79.2.6
@@ -1089,4 +1089,6 @@ extern Int VGOFF_(helper_DAS);
extern Int VGOFF_(helper_DAA);
+extern Int VGOFF_(helper_cmpxchg8b);
+
/*====================================================================*/
|
|
From: Nicholas N. <nj...@ca...> - 2004-01-20 22:20:43
|
CVS commit by nethercote:
Backport clarification from HEAD.
M +2 -1 FAQ.txt 1.7.2.6
--- valgrind/FAQ.txt #1.7.2.5:1.7.2.6
@@ -359,5 +359,6 @@
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'.
+ more recent version of 'make'. Alternatively, we have heard that
+ unsetting the CFLAGS environment variable avoids the problem.
-----------------------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-02-29 15:57:31
|
CVS commit by nethercote:
Patch from Bartosz Taudul: latest GCC requires regparm(n) attributes on both
function declarations and definitions. [copied from HEAD]
M +8 -8 helgrind/hg_main.c 1.60.2.4
M +8 -8 memcheck/mc_include.h 1.16.2.1
--- valgrind/helgrind/hg_main.c #1.60.2.3:1.60.2.4
@@ -3102,40 +3102,40 @@ static void eraser_mem_write(Addr a, UIn
#undef DEBUG_STATE
-static void eraser_mem_help_read_1(Addr a)
+REGPARM(1) static void eraser_mem_help_read_1(Addr a)
{
eraser_mem_read(a, 1, VG_(get_current_tid)());
}
-static void eraser_mem_help_read_2(Addr a)
+REGPARM(1) static void eraser_mem_help_read_2(Addr a)
{
eraser_mem_read(a, 2, VG_(get_current_tid)());
}
-static void eraser_mem_help_read_4(Addr a)
+REGPARM(1) static void eraser_mem_help_read_4(Addr a)
{
eraser_mem_read(a, 4, VG_(get_current_tid)());
}
-static void eraser_mem_help_read_N(Addr a, UInt size)
+REGPARM(2) static void eraser_mem_help_read_N(Addr a, UInt size)
{
eraser_mem_read(a, size, VG_(get_current_tid)());
}
-static void eraser_mem_help_write_1(Addr a, UInt val)
+REGPARM(2) static void eraser_mem_help_write_1(Addr a, UInt val)
{
if (*(UChar *)a != val)
eraser_mem_write(a, 1, VG_(get_current_tid)());
}
-static void eraser_mem_help_write_2(Addr a, UInt val)
+REGPARM(2) static void eraser_mem_help_write_2(Addr a, UInt val)
{
if (*(UShort *)a != val)
eraser_mem_write(a, 2, VG_(get_current_tid)());
}
-static void eraser_mem_help_write_4(Addr a, UInt val)
+REGPARM(2) static void eraser_mem_help_write_4(Addr a, UInt val)
{
if (*(UInt *)a != val)
eraser_mem_write(a, 4, VG_(get_current_tid)());
}
-static void eraser_mem_help_write_N(Addr a, UInt size)
+REGPARM(2) static void eraser_mem_help_write_N(Addr a, UInt size)
{
eraser_mem_write(a, size, VG_(get_current_tid)());
--- valgrind/memcheck/mc_include.h #1.16:1.16.2.1
@@ -122,14 +122,14 @@ extern void MC_(helper_value_check0_fail
/* Functions defined in mc_main.c */
-extern void MC_(helperc_STOREV4) ( Addr, UInt );
-extern void MC_(helperc_STOREV2) ( Addr, UInt );
-extern void MC_(helperc_STOREV1) ( Addr, UInt );
+extern __attribute__ ((regparm(2))) void MC_(helperc_STOREV4) ( Addr, UInt );
+extern __attribute__ ((regparm(2))) void MC_(helperc_STOREV2) ( Addr, UInt );
+extern __attribute__ ((regparm(2))) void MC_(helperc_STOREV1) ( Addr, UInt );
-extern UInt MC_(helperc_LOADV1) ( Addr );
-extern UInt MC_(helperc_LOADV2) ( Addr );
-extern UInt MC_(helperc_LOADV4) ( Addr );
+extern __attribute__ ((regparm(1))) UInt MC_(helperc_LOADV1) ( Addr );
+extern __attribute__ ((regparm(1))) UInt MC_(helperc_LOADV2) ( Addr );
+extern __attribute__ ((regparm(1))) UInt MC_(helperc_LOADV4) ( Addr );
-extern void MC_(fpu_write_check) ( Addr addr, Int size );
-extern void MC_(fpu_read_check) ( Addr addr, Int size );
+extern __attribute__ ((regparm(2))) void MC_(fpu_write_check) ( Addr addr, Int size );
+extern __attribute__ ((regparm(2))) void MC_(fpu_read_check) ( Addr addr, Int size );
|
|
From: Dirk M. <mu...@kd...> - 2004-04-07 01:32:25
|
CVS commit by mueller:
fix NPTL detection for SUSE 9.1
M +0 -40 configure.in 1.93.2.7
M +2 -3 coregrind/valgrind.in 1.28.2.4
--- valgrind/configure.in #1.93.2.6:1.93.2.7
@@ -297,44 +297,4 @@
)
-
-
-AC_MSG_CHECKING([if this is an NPTL-based system])
-safe_LIBS="$LIBS"
-LIBS="$LIBS -lpthread"
-AC_TRY_RUN([
-#include <pthread.h>
-#include <stdio.h>
-int main (int argc, char * argv [])
-{
- int ret;
- pthread_mutexattr_t mutexattr;
- ret = pthread_mutexattr_init (&mutexattr);
- if (ret == 0) {
- ret = pthread_mutexattr_setpshared(&mutexattr, PTHREAD_PROCESS_SHARED);
- if (ret == 0) /* nptl */
- return 0;
- else /* not nptl */
- return 1;
- }
- return 1;
-}
-],
-[
- NPTL_THREADING="yes"
- AC_MSG_RESULT([yes])
-],
-[
- NPTL_THREADING="no"
- AC_MSG_RESULT([no])
-],
-[
- AC_MSG_RESULT([couldn't run test program])
- NPTL_THREADING="no"
-])
-LIBS=$safe_LIBS
-
-AC_SUBST(NPTL_THREADING)
-
-
# does this compiler support -mpreferred-stack-boundary=2 ?
AC_MSG_CHECKING([if gcc accepts -mpreferred-stack-boundary])
--- valgrind/coregrind/valgrind.in #1.28.2.3:1.28.2.4
@@ -32,5 +32,4 @@
exec_prefix="@exec_prefix@"
VALGRIND="@libdir@/valgrind"
-nptl_threading="@NPTL_THREADING@"
# Other stuff ...
@@ -106,6 +105,6 @@
# an environment variable.
-if [ z"$nptl_threading" = zyes ]; then
- LD_ASSUME_KERNEL=2.2.5
+if getconf GNU_LIBPTHREAD_VERSION | grep -qi NPTL 2>/dev/null; then
+ LD_ASSUME_KERNEL=2.4.1
export LD_ASSUME_KERNEL
fi
|