2477 Commits

Author SHA1 Message Date
Tom Hughes
2e5014cb8b Fix format string in signal mask printing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4989
2005-11-02 15:32:19 +00:00
Tom Hughes
b9915194c8 Display signal masks correctly when --trace-signals=yes is used
on 64 bit platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4988
2005-11-02 15:31:21 +00:00
Tom Hughes
1a3f2889c8 The sloppyRXcheck logic in the sync checker was not correct - it was
simply treating R and X as equivalent but the real problem is that 
mappings can appear to have X permission entirely indepenent of anything
else with recent x86 kernels.

If a mapping is inside the (deliberately constrained) code segment then
it will appear to have X permission regardless of whether R or X was asked
for when it was mapped, so what we really need to do is allow the kernel
to add X to any mapping but not to take it away if we were expecting it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4985
2005-11-02 14:42:39 +00:00
Tom Hughes
dbfe36c3c3 Don't give the heap execute permission - the linux kernel doesn't
normally give execute permission to memory allocated from the heap
with sbrk.

This also required fixing the smc1 test for amd64 to use mmap to
allocate memory so that it can have execute permission.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4983
2005-11-02 13:02:40 +00:00
Tom Hughes
24e2757ce7 Make the request for space for the interpreter into a hint so that we
can still proceed if the preferred load address is not available.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4980
2005-11-01 19:46:07 +00:00
Julian Seward
ed5c2ad6ed Whitespace only change (test commit to see if auto-mail-on-commit is
still working).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4976
2005-11-01 12:32:24 +00:00
Julian Seward
5b51eeb7ae Build fixes following recent coredump hackery.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4972
2005-11-01 00:42:07 +00:00
Julian Seward
609c8167f9 Fix a couple of gcc warnings following recent coredumping changes
(r4970).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4971
2005-11-01 00:03:40 +00:00
Tom Hughes
48f8c22e44 Get core dumping working again - the architecture specific code that
was in the sigframe module has been moved into the coredump module 
where it belongs and things fixed up to compiler again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4970
2005-10-31 17:05:21 +00:00
Nicholas Nethercote
084757de44 The version string from --version was being printed to stderr. This
commit fixes it to print to stdout.  I added a regression test for this.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4969
2005-10-26 16:17:46 +00:00
Julian Seward
77cdfa6f75 Enable Altivec by default if it is available.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4965
2005-10-22 12:52:25 +00:00
Julian Seward
36152f964e Pass args to match format string.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4963
2005-10-21 12:05:05 +00:00
Julian Seward
b7beeca0be Handle SHT_NOBITS sections when checking for section overruns. This
fixes a problem where debug info was sometimes not being read on
ppc32.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4962
2005-10-21 02:37:40 +00:00
Tom Hughes
626b0fbdc3 Don't assert if the DWARF line info reader is given so little data that
it can't even read the length of the block - just report an error as we
do if there isn't enough data for the rest of the block. Fix bug #114757.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4960
2005-10-20 18:38:08 +00:00
Tom Hughes
2b553e2835 Add support for the mbind system call on x86 and amd64. Fixes bug #114756.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4958
2005-10-20 17:00:23 +00:00
Julian Seward
7ee131a3e3 Increase the threshold above which new errors are not shown from 300
unique / 30000 total to 1000 unique / 100000 total.  Programs are
generally bigger now than 3 years ago.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4957
2005-10-20 01:57:29 +00:00
Julian Seward
2aa34e2afe Remove all remaining references to pointercheck. It's sad to see it
go, but realistically we can't implement it portably, at least without
considerable performance overhead and some additional complexity.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4956
2005-10-20 01:37:15 +00:00
Julian Seward
4e2059f06a The Spin-Doctor arrives in Valgrind-Land: rename --weird-hacks= to
--simulation-hints=.  Bwaha.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4955
2005-10-20 01:09:57 +00:00
Julian Seward
9432f46e02 rm the skiplist module, as it has been superseded by the AVL-tree
based m_oset module.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4952
2005-10-20 00:09:11 +00:00
Nicholas Nethercote
f2ec4febfe Make the usage message a little neater and more self-consistent.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4948
2005-10-19 22:39:40 +00:00
Julian Seward
a55c24c5d7 Halve the size of the fast tt lookup cache. This improves ppc32
performance quite a bit, since the cache is emptied quite often on
ppc32, and a smaller cache is less intrusive in the real machine's L2
cache.  On x86 the change doesn't seem to have much effect.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4947
2005-10-19 11:23:07 +00:00
Julian Seward
073c102b95 Use standard syntax for the rlwinm.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4946
2005-10-19 10:14:19 +00:00
Julian Seward
8547d43b79 Snap up some easy pickings pointed out by cachegrinding nulgrind on ppc32.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4945
2005-10-19 01:32:41 +00:00
Julian Seward
d12b128625 Reenable a couple more syscalls needed for self-hosting on ppc32,
which now works.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4944
2005-10-19 01:14:22 +00:00
Julian Seward
1813e8fdcd Change the core-tool interface so that tools are fully aware of both
the guest extents for the presented translation and also its original
un-redirected guest address.  These changes are needed in particular
to make cachegrind's code cache management work properly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4943
2005-10-18 12:04:18 +00:00
Julian Seward
e5264d94c5 Add extra auxiliary data structures which make it possible to quickly
find and delete all translations intersecting with small address
ranges (8 k or less, currently).  This makes it possible to simulate
ppc32 icbi instructions in reasonable time, and finally makes the
ppc32 port run at a usable speed.

The scheme is based around partitioning translations into equivalence
classes based on address ranges.  For deletions whose range falls
within a single class, all translations intersecting it can be found
by inspecting just that class and one other.  Given that there are 256
classes, this cuts the cost, relative to scanning the entire TC, by
approximately half that factor (viz, 128), assuming the translations
are distributed evenly over the classes.

The whole business is more complex and difficult than I would like.

A detailed comment will later be added.

Very thorough sanity checking has been added
(sanity_check_eclasses_in_sector).  This is engaged at
--sanity-level=4 and above.

The TT hash function (HASH_TT) has been improved to reduce its
tendency to cluster TT entries in some circumstances.  This has
allowed the TT maximum loading factor to be increased from 66% to 80%
and so the absolute size of the TC (in each sector) to be less than
2^16 entries.  The latter change is important for the fast-deletion
changes.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4942
2005-10-18 02:30:42 +00:00
Julian Seward
6048f9c854 Add a new arena (VG_AR_TTAUX) for holding auxiliary TT/TC structures
(see next commit).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4941
2005-10-18 02:20:18 +00:00
Julian Seward
cd5eb80553 Fix socket stuff on ppc32, so that --log-socket actually works.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4940
2005-10-18 02:15:39 +00:00
Tom Hughes
c0c5256036 Removed remaining traces of address space padding technology as it
is not longer relevant with the new address space manager.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4938
2005-10-16 13:52:50 +00:00
Nicholas Nethercote
b692589152 Clarify the disInstr message.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4932
2005-10-15 17:18:08 +00:00
Nicholas Nethercote
cf39f65c7d OSet-ify m_redir.c.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4930
2005-10-15 15:48:52 +00:00
Julian Seward
04bb445744 Various fixes to reduce noise level on SuSE 10 (PPC). Also fix some
ppc32 syscalls.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4927
2005-10-15 02:00:41 +00:00
Julian Seward
62f6e91ab4 Unfortunately gcc4 doesn't like recently added prototypes. Comment
out for the time being.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4926
2005-10-15 00:58:26 +00:00
Julian Seward
100db4b3eb Add comments re loss of pointercheck.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4925
2005-10-15 00:41:50 +00:00
Julian Seward
e095f8f780 Add a large comment giving an overview of what it does and how it
works.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4924
2005-10-14 19:05:45 +00:00
Julian Seward
880222a537 Comment-only change: add comments re self-checking translations and
self-modifying code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4923
2005-10-14 17:22:31 +00:00
Nicholas Nethercote
297b4059a2 Choose a less-similar variable name when avoiding -Wshadow warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4922
2005-10-14 13:51:33 +00:00
Nicholas Nethercote
04d5174fd1 Avoid two compiler warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4921
2005-10-14 13:48:54 +00:00
Julian Seward
dfc6b6ef3e Get rid of various compilation warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4920
2005-10-14 11:25:49 +00:00
Julian Seward
5efea53246 Rename a local variable so as to make -Wshadow shut up.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4919
2005-10-14 11:13:14 +00:00
Nicholas Nethercote
82c3ab0af9 Overhaul the way programs are loaded at startup and exec() works. Now the
checking of programs done in these two places are combined, which avoids
duplicate code and greatly reduces the number of cases in which exec()
fails causing Valgrind to bomb out.

Also, we can now load some programs we could not previously, such as scripts
lacking a "#!" line at the start.  Also, the startup failure messages for
bad programs match the shell's messages very closely.

And I added a whole bunch of regtests to test all this.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4918
2005-10-14 03:11:30 +00:00
Tom Hughes
014fc8c051 Use an soname of libc.so* for libc redirects so that we catch a wider
range of libc's such as uclibc as well as glibc. Fixes bug 114289.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4916
2005-10-13 15:51:12 +00:00
Julian Seward
273557e5f7 C90 fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4914
2005-10-13 12:41:09 +00:00
Julian Seward
00c09f8f0d Build fixes for gcc-2.96. The system now builds and regtests with the
default gcc-2.96 on Red Hat 7.3.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4911
2005-10-12 12:53:20 +00:00
Julian Seward
fa41cb30d8 Notify the tool via tool_discard_basic_block_info() about translations
thrown away due to lack of space.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4908
2005-10-12 10:51:01 +00:00
Tom Hughes
fa32067e45 Fix x86 specific declaration-before-statement warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4907
2005-10-12 10:50:56 +00:00
Tom Hughes
6961dcf591 Fix statement-before-declaration warnings for the core code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4906
2005-10-12 10:45:27 +00:00
Julian Seward
5740bf2f53 Redo the way cachegrind generates instrumentation code, so that it can
deal with any IR that happens to show up.  This makes it work on ppc32
and should fix occasionally-reported bugs on x86/amd64 where it bombs
due to having to deal with multiple date references in a single
instruction.

The new scheme is based around the idea of a queue of memory events
which are outstanding, in the sense that no IR has yet been generated
to do the relevant helper calls.  The presence of the queue --
currently 16 entries deep -- gives cachegrind more scope for combining
multiple memory references into a single helper function call.  As a
result it runs 3%-5% faster than the previous version, on x86.

This commit also changes the type of the tool interface function
'tool_discard_basic_block_info' and clarifies its meaning.  See
comments in include/pub_tool_tooliface.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4903
2005-10-12 10:09:23 +00:00
Julian Seward
13e2f46531 ppc32 only: give debug info names for a couple of fns to make
cachegrind profiles more understandable.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4902
2005-10-12 10:00:56 +00:00
Julian Seward
9c9a4821f1 Make sync checking work on recent x86 kernels (eg SuSE 10) which mark
many 'r' sections also as 'x' because x86 can't really distinguish
them.  The change just regards 'x' and 'r' as equivalent on x86.
Checking on ppc32/amd64 is unchanged.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4901
2005-10-11 22:06:29 +00:00