Commit Graph

44 Commits

Author SHA1 Message Date
Nicholas Nethercote
78b8e2c67f Arch-abstraction:
- things I forgot to do when moving the insn_* tests...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2810
2004-10-19 19:07:32 +00:00
Nicholas Nethercote
66adb12133 Arch-abstraction:
- Moved all the insn_* tests into x86/ subdirectories.  What are the chances of
  me getting this right on the first attempt?


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2809
2004-10-19 18:54:11 +00:00
Tom Hughes
546afbe696 Add support for the POSIX message queue system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2585
2004-08-14 18:52:27 +00:00
Tom Hughes
1afbb3fc45 Modified the fcntl system call so that only those reason codes which
can block (ie F_SETLKW) are treated as blocking.

This resolves the F_SETOWN problem described in bug #85969.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2535
2004-07-29 21:20:11 +00:00
Nicholas Nethercote
e88865054f Minor Makefile.am fix (doesn't actually change behaviour, because automake's
default rules meant 'execve' was being built anyway... but the fix at least
avoids confusion).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2464
2004-07-10 16:11:00 +00:00
Tom Hughes
857d0841bb Fixed typo in makefile.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2448
2004-06-28 21:37:58 +00:00
Tom Hughes
f9a0e004f5 Implement an emulated soft limit for file descriptors in addition to
the current reserved area, which effectively acts as a hard limit. The
setrlimit system call now simply updates the emulated limits as best
as possible - the hard limit is not allowed to move at all and just
returns EPERM if you try and change it.

This should stop reductions in the soft limit causing assertions when
valgrind tries to allocate descriptors from the reserved area.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2440
2004-06-26 11:27:52 +00:00
Tom Hughes
827e3bebb6 Don't try and validate the contents of the environment passed to
the execve system call if the envp pointer is null as it causes
valgrind to die with a segmentation fault.

CCMAIL: 83573-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2427
2004-06-19 13:02:34 +00:00
Nicholas Nethercote
9ce21c9e69 Fixed up various command line option scenarios:
- If no tool is specified, V now gives a short message and a list of
    available tools.  This was meant to happen previously, but a bug prevented
    it from working properly;  it gave the usage message instead.

  - If a bad option is given, V now gives a short message rather than the full
    --help.  This make V consistent with all other programs I looked at.

  - Now returning 0 when you do 'valgrind --help' and 'valgrind --version'
    as other programs do.

  - Removed VG_(startup_logging)() and VG_(shutdown_logging)() as they were
    empty and have been for a long time (always?).

  - Added various tests for these scenarios.  Had to change the regtest
    script slightly to allow for malformed command lines.

This addresses bug (wishlist) #82999.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2418
2004-06-15 10:54:40 +00:00
Tom Hughes
05369f9e57 Add support for the semtimedop system call.
Based on patch from Peter Knaggs <sedragdnuon@yahoo.com>.

CCMAIL: 79714-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2410
2004-06-13 14:23:00 +00:00
Tom Hughes
cd101bf7b2 Extended instruction test system to handle x87 floating point instructions
and started working on adding tests for the x87 instruction set.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2338
2004-03-27 18:02:37 +00:00
Tom Hughes
67bb2b010d Commit rewrite of semaphore handling to avoid having a fixed upper
limit. Patch courtesy of Aleksander Salwa <A.Salwa@osmosys.tv>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2336
2004-03-23 19:48:54 +00:00
Jeremy Fitzhardinge
3ee834af04 Add susphello test, which has turned up a number of interesting bugs
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2333
2004-03-17 18:20:46 +00:00
Tom Hughes
0615a8eae6 Added the new badseg test to the list of things to build.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2325
2004-03-16 10:51:29 +00:00
Jeremy Fitzhardinge
82aaa16ef9 Fix "make distcheck", and also make sure that the generated archive
contains everything needed to "make regtest".  Bump the version.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2308
2004-03-12 10:51:39 +00:00
Tom Hughes
56a515fc49 Treat INT with an operand other than 0x80 as an undefined instruction.
CCMAIL: 76839-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2291
2004-03-06 12:53:24 +00:00
Tom Hughes
67f9196d17 Add support for 16 bit pushes and pops of segment registers to
fix bug #76762.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2288
2004-03-04 23:36:58 +00:00
Dirk Mueller
d03de4f1f0 sigh
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2256
2004-02-21 04:27:49 +00:00
Dirk Mueller
c87d4957a6 get rid of the thread local storage tests until somebody
writes a configure check for them.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2255
2004-02-20 14:45:52 +00:00
Nicholas Nethercote
1e90b8cb29 whoops
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2252
2004-02-15 16:12:35 +00:00
Nicholas Nethercote
500de31850 This patch fixes getrlimit(RLIMIT_FILENO) to return VG_(max_fd) as the soft
limit for file descriptors to try and prevent the target programming realising
that the reserved file descriptors exist. It also appears to fix
sysconf(_SC_OPEN_MAX) so that must be going through the same system call.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2250
2004-02-15 15:32:51 +00:00
Nicholas Nethercote
4c8ecb23c3 Heroic patch from Tom Hughes:
This patch adds translation tests for most of the basic x86 instructions and
  fixes a few missing/broken instructions to work properly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2242
2004-02-11 23:33:29 +00:00
Jeremy Fitzhardinge
75d6dc8434 This change implements the TLS extension to the x86 ABI. This allows
threads to have thread-private data which is quickly accessible via a
segment in the GDT, stored in %gs.  The patch implements the relevent
syscalls (setthreadarea), and also manages switching the VCPU's segment
information at thread context-switch time.  Mostly Tom Hughes' work.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2215
2004-01-21 01:27:27 +00:00
Nicholas Nethercote
5630025b84 Patch from Tom Hughes, for bug 72643:
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
2004-01-19 19:14:18 +00:00
Jeremy Fitzhardinge
7def6b371b Fix bug 72484. Set the process signal mask to match the client's before
running exec.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2198
2004-01-16 02:17:30 +00:00
Jeremy Fitzhardinge
aab639348b Fix bug 72650. Only restart syscalls on signal if the client asked for it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2197
2004-01-16 02:15:23 +00:00
Jeremy Fitzhardinge
88892fd58d Re-add proper support for mremap(). Also, fix a bug in munmap().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2142
2003-12-22 08:48:50 +00:00
Jeremy Fitzhardinge
4623bc042c mmap/munmap exerciser test
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2134
2003-12-19 21:56:04 +00:00
Jeremy Fitzhardinge
863238a720 Make rep; nop (pause) yield the thread. Based on a patch by Tom Hughes;
I added a test case and cleaned up vg_dispatch.S while I was about it.
CCMAIL: 69529-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2129
2003-12-18 09:06:09 +00:00
Jeremy Fitzhardinge
918c3a7b7e This jumbo-checkin is the Full Virtualization checkin. This eliminates
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
2003-12-16 02:05:15 +00:00
Nicholas Nethercote
136c7fba2c Fixed cpuid regtest, which was broken by the switch to using the machine's real
CPUID.

Also added filters to Makefiles where missing;  "make regtest" was broken
within distributions created using "make dist", now fixed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1709
2003-06-29 10:12:58 +00:00
Nicholas Nethercote
83ef1ca2ed Some Makefile.am changes. Lots of them affected:
- 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
2003-06-12 14:13:05 +00:00
Dirk Mueller
02b63b3ba8 reapply automake fixes. make check will now generate the binaries which
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
2003-04-17 17:00:43 +00:00
Nicholas Nethercote
b304e50952 Added regression test from Dominic Mazzoni for FPU lazy eflags update bug that
was fixed in coregrind/vg_from_ucode.c v1.42.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1520
2003-04-08 10:04:32 +00:00
Nicholas Nethercote
0756a50bc3 Removed support for the 1.0.X series from the regression test suite -- this
was present from before the core/skin split, which is now dead.  Means the
script is slightly simpler, and we can dispense with lots of expected
foo.stderr.hd files.

Also undid accidental change to required Automake version in main Makefile.am
from my last commit, whoops.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1518
2003-04-08 00:47:05 +00:00
Julian Seward
2d2a15abbf Change a bunch of AM_CFLAGS, AM_CXXFLAGS to CFLAGS, CXXFLAGS.
The AM_ versions totally break compilation on RH6.2.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1447
2003-02-28 23:22:44 +00:00
Julian Seward
b891391739 Make CXXFLAGS be the same as AM_CXXFLAGS, so the correct options are
used to build the regression tests.  I don't know if this is really
the correct way to fix this problem.  I don't understand why
AM_CXXFLAGS aren't used by default for C++, seeing as how AM_CFLAGS
evidently are used for C sources.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1445
2003-02-25 23:49:46 +00:00
Dirk Mueller
8f9785b1eb fix make distcheck with newer automake
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1443
2003-02-25 01:48:15 +00:00
Nicholas Nethercote
dc372ac1de Added a regression test that checks if command line arguments with spaces work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1442
2003-02-24 22:05:38 +00:00
Nicholas Nethercote
db419f2bdc Moved discard, clientperm and clientstackperm from tests/ into the test
suite-proper, giving them .vgtest files and all that.  They don't make sense
for 1.0.X because the client request constants are different in HEAD, indeed
one of them (clientperm) fails with --stable.

Also moved blocked_syscall.c from tests/ to tests/unused/.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1181
2002-10-04 14:16:38 +00:00
Nicholas Nethercote
06a95f2392 Added seg_override test. Note this test fails on the 1.0.X branch (if you use
the --stable option to the regression test script).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1162
2002-10-02 10:36:46 +00:00
Nicholas Nethercote
124f1cd350 Moved `resolv' into the test-suite-proper.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1155
2002-10-01 11:45:34 +00:00
Nicholas Nethercote
9a0718281f Fixups to get "make dist" to work -- mostly involving regression test files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1099
2002-09-23 16:09:39 +00:00
Nicholas Nethercote
afebe61b37 Files updated, added and removed in order to turn the ERASER branch into HEAD
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1086
2002-09-23 09:36:25 +00:00