Problem was that the malloc-replacing tools (memcheck, addrcheck, massif,
helgrind) would assert if a too-big malloc was attempted. Now they return 0 to
the client. I also cleaned up the code handling heap-block-metadata in Massif
and Addrcheck/Memcheck a little.
This exposed a nasty bug in VG_(client_alloc)() which wasn't checking if
find_map_space() was succeeding before attempting an mmap(). Before I added
the check, very big mallocs (eg 2GB) for Addrcheck were overwriting the client
space at address 0 and causing crashes.
Added a regtest to all the affected skins for this.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2462
directory from the source tree. This resolves bug 83040.
Based on patch from Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2450
Addrcheck wasn't doing overlap checking as it should. This is because
mac_replace_strmem.o was being linked with vgskin_addrcheck.so instead of
vgpreload_addrcheck.so. I fixed the Makefile, and also moved
_VG_USERREQ__MEMCHECK_GET_RECORD_OVERLAP so Addrcheck could see it. And I
added the 'overlap' test (from memcheck/tests/) to Addrcheck's regression
suite.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2394
Address 0x%x is not stack'd, malloc'd or free'd
to
Address 0x%x is not stack'd, malloc'd or (recently) free'd
This makes things clearer in some circumstances, particularly when bogusly
accessing heap memory that has been freed, but Memcheck is no longer tracking.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2358
Patch to improve SSE/SS2 support
This patch should implement most of the missing SSE/SSE2 opcodes. About
the only ones it doesn't do are the MASKMOVxxx ones as they are quite
horrible and involved an implicit reference to EDI so I need to think
about them a bit more.
The patch also includes a set of tests for the MMX/SSE/SSE2 opcodes to
validate that they have the same effect under valgrind as they do when
run normally. In one or two cases this wasn't actually the case even
for some of the implemented opcodes, so I fixed those as well ;-)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2202
remove the test that the first page of memory is inaccessible. This
is now getting in the way.
Fixes#69886.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2180
Valgrind's dependency on the dynamic linker for getting started, and
instead takes things into its own hands.
This checkin doesn't add much in the way of new functionality, but it
is the basis for all future work on Valgrind. It allows us much more
flexibility in implementation, and well as increasing the reliability
of Valgrind by protecting it more from its clients.
This patch requires some changes to tools to update them to the changes
in the tool API, but they are straightforward. See the posting "Heads
up: Full Virtualization" on valgrind-developers for a more complete
description of this change and its effects on you.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2118
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. Also added some changes that had been made in the stable branch
but not the HEAD.
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.
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2089
the places that normal users will see:
- command line: --tool=foo (although --skin=foo still works)
- docs: removed all traces (included renaming coregrind_skins.html to
coregrind_tools.html)
- in the usage messages
- in error messages
Also did in in some places that I judged were unlikely to cause clashes with
existing workspaces:
- in the header comments of many files (eg. "This file is part of Memcheck, a
Valgrind tool for...")
- in the regtests script
- in the .supp files
- in AUTHORS
- in README_MISSING_SYSCALL_OR_IOCTL
Also update the AUTHORS file to mention Jeremy.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2027
indented one space; previously it was mixed, but Memcheck/Addrcheck indented
"Address" lines 3, which made them hard to see in the stack trace.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2021
option --show-below-main is on. It's on by default. It also affects
suppressions generated with --gen-suppressions=yes. Updated reg tests
accordingly.
Also updated docs for this. And added some missing command-line args to docs.
Also compartmentalised the options a little in the docs, and rearranged the
order of options in the usage message, in anticipation of a bigger
rearrangement that will be necessary soon -- to distinguish options used by all
skins from those used by error-checking skins, to skin-specific ones.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2020
Scientific Library (gsl-1.4) compiled with Intel Icc 7.1 20030307Z '-g
-O -xW'. I think this gives pretty good coverage of SSE/SSE2 floating
point instructions, or at least the subset emitted by Icc. So far
tested on memcheck and nulgrind; addrcheck and cachesim still testing.
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1955
to inline. This is needed to get a warning-free compilation on 3.3.1.
It seems we had "inline" on some pretty huge functions in places.
Also it appears gcc-3.3.1 won't inline a function call in a tail call
position, reasonably enough. I assume in that case it prefers to
create a tailcall to the callee, rather than inlining it.
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1907
valgrind.h. Although these requests are not implemented by the core, they can
be implemented by skins that track heap blocks, eg. Memcheck, Annelid, Massif.
This is in preparation for committing Massif to the repository.
I think I managed to make the change in a binary-compatible way. The only
inconvenience for users is that if they have a client program compiled with the
old requests in, Valgrind will abort with an explanatory message that tells
them to recompile. Once they've done that (no changes to their program are
required), it works again.
I even updated the docs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1881
them in a shared place. (They used to be different, when Addrcheck didn't
distinguish between reads and writes, but now they're the same.)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1837
was just saying "invalid memory access").
Added a regression test for this, for memcheck and addrcheck. Also made
Addrcheck use Memcheck's fprw regtest. Was able to remove the not-very-useful
'true' test for Addrcheck now that it has a couple of real tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1815
from skin's view, replacing all instances with ThreadId. Much cleaner. Had to
change the way VG_(get_ExeContext)() worked a little. Changed the core/skin
major interface because this breaks the old version. Also fixed a few minor
related things here and there.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1782
particular, renamed mc_replace_strmem.c as mac_replace_strmem.c; the 'mac'
prefix indicates it's shared between Memcheck and Addrcheck.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1774
problem which caused the leak checker to misbehave following recent
PLT-bypass workaround.
In short, it is an error to announce to the skin, segments found which
belong to the low-level memory manager, because the skin may then mark
them as accessible to the client. This is wrong, and the client
should only acquire accessible memory via malloc etc and stack
movement. Now we carefully avoid mentioning any segment belonging to
the low level memory manager.
Take the opportunity to improve VG_(within_m_state_static) so that it
also detects pointers within the thread table. This can reduce the
number of blocks the leak checker spuriously thinks are still
reachable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1751
a way consistent with the position of the register field in the
instruction. In Intel encoding parlance, the G register is in bits
5,4,3 and the E register is bits 2,1,0, and so we adopt this scheme
consistently. Considering how much confusion this has caused me in
this recent bout of SSE hacking, consistent renaming can only be a
good thing. It makes it a lot easier to figure out if parts of the
SSE handling machinery are correct, or not.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1698
- Fix bug in implementation of MOVD (mmxreg <--> ireg). This
fixes various segfaults and strange behaviour.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1695
- changed deprecated INCLUDES variable to AM_CPPFLAGS
- moved the -DVG_LIBDIR definition from AM_CFLAGS into AM_CPPFLAGS
- generally neatened them up a bit -- removed old commented out stuff, fixed a
couple of other minor things
Everything works for me, hopefully it won't break things for anyone else...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1680
for skins.
Changed lackey to print out the exit code.
Changed AUTOMAKE_OPTIONS back to 1.5 (whoops)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1538
The first returns the number of errors found so far, and is a core request.
The second returns the number of bytes found
reachable/dubious/leaked/suppressed by all leak checks so far, for Memcheck and
Addrcheck.
Both are useful for using Valgrind in regression test suites where multiple
tests are present in a single file -- one can run Valgrind with no output
(using --logfile-fd=-1) and use the requests after each test to determine if
any errors happened.
Had to rename and make public vg_n_errs_found --> VG_(n_errs_found) to do so.
Nb: leak errors are not counted as errors for the purposes of
VALGRIND_COUNT_ERRORS. This was decided as the best thing to do after
discussion with Olly Betts, who original suggested these changes.
Pulled out common client request code shared between Memcheck and Addrcheck.
Added a regression test for this.
Added some documentation too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1533
are only required for regression testing.
If this breaks something, please mail me first instead of reverting.
Thank you.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1530