- factor out the setting of syscall results, which can be more complicated
than just putting a value in the result register (eg. PPC has to fiddle with
multiple registers).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2789
is a regular file and fail with EINVAL if it is not.
This problem was highlight by bug 89481 although this doesn't solve the
actual problem reported in that bug.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2723
to avoid older kernels returning EPERM due to it being run in a separate
thread. This fixes bug #89198.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2697
is made to raise either the soft or hard limit above the current hard
limit rather than just allowing it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2690
that limit when growing the stack. Also add a message when the stack in any
thread overflows.
CCMAIL: 73818-done@bugs.kde.org
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2689
- added x86-linux/core_platform.h
- factored out getting/setting of system call arguments, put it in
platform-specific part.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2685
- Added include/x86/: contains tool_arch.h, Makefile.am, .cvsignore.
- Added coregrind/x86/state.c. Contains some arch-specific code for dealing
with x86 registers -- eg. setting up the baseBlock, loading/saving the whole
register state. It is compiled into coregrind/x86/libarch.a and linked via
${VG_ARCH} with the core.
Relatedly, also added coregrind/x86/{core_arch.h,core_arch_asm.h}.
- Correspondingly abstracted the register state out of ThreadState. This
affected every place that touches registers, and there are a lot of them.
(Eventually all the register touching should be abstracted out in an
arch-neutral way, but not yet; one step at a time.)
- Added some declarations about register loading/saving functions to core.h;
all architectures will have to provide these functions.
- Rejigged the build system so that the arch-specific stuff is all done via
${VG_ARCH}, rather than naming e.g. x86/ directly. Appropriate -I arguments
are used so that all the headers are found, etc.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2656
- corrected a few mistakes, eg. when printing them out, in prototypes
- made printing of "%p(%s)" args consistent
- removed 'sizeof_struct_user_fpxregs_struct' from PRE(ptrace)/POST(ptrace)
- allowing for the two different versions of open()
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2591
opcodes are properly validated. Using memcheck on ipcs now produces
no warnings on my machine.
This commit fixes bug #86987.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2580
(fewer) functions.
Also fixed execve() so that it works better with .in_place.
Also added a regression test for --trace-children=yes (there were none!)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2577
- removed various things that are no longer used
- made (module-)local some things that were global
- improved the formatting in places
Removed about 160 lines of code, and non-trivially reduced the number
of global entities.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2541
are treated as blocking.
This fixes bug #86000 because shmat is no longer treated as blocking
and it is therefore no longer possible for two threads to try and use
the same address for the shared memory segment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2536
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
even when the system call fails, and allow the PRE function to modify the
system call flags.
Also fix nanosleep so that it only marks the returned time as defined
if the system call exited with EINTR due to be interrupted.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2534
requires padding of the address space around calls to io_setup in order
to constrain the kernel's choice of address for the I/O context.
Based on patch from Scott Smith <scott-kde@gelatinous.com> with various
enhancements, this fixes bug #83060.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2485
- removed an unnecessary VG_(unmap_range)() call in do_brk() -- the
VG_(munmap)() just before it does it anyway.
- inlined mprotect_segment() and munmap_segment() because it's more concise and
easier to understand that way.
- a couple of minor formatting changes
- added and cleaned up a couple of comments
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2469
add a segment mapping to the segment skip-list, and then often the caller of
VG_(mmap) would do another one for the same segment, just to change the SF_*
flags. Now VG_(mmap) gets passed the appropriate SF_* flags so it can do it
directly. This results in shorter, simpler code, and less work at runtime.
Also, strengthened checking in VG_(mmap), POST(mmap), POST(mmap2) -- now if the
result is not in the right place, it aborts rather than unmapping and
continuing. This is because if it's not in the right place, something has
gone badly wrong.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2466
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
--logfile-fd --> --log-fd
--logfile --> --log-file
--logsocket --> --log-socket
to be consistent with each other and other options (esp. --input-fd). Also
renamed some related variables. The old names still work, for backwards
compatibility, but they're not documented.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2429
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
improve the checking of other interface related ioctls.
Based in part on a patch from Jim McDonald <jim@mcdee.net> supplied
as a fix for bug #83344.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2424