Commit Graph

498 Commits

Author SHA1 Message Date
Bart Van Assche
fbdd04d5a9 syswrap/Linux: trace ioctl() calls only once / do not report two-argument
ioctl() calls as an error. Patch provided by Mark Hills. Closes #272730.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11717
2011-04-28 18:36:49 +00:00
Robert Walsh
7671cab5c8 Fix no-arg ioctls on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11714
2011-04-27 19:04:31 +00:00
Bart Van Assche
d077061870 Linux/syswrap: add support for USBDEVFS_RESET (patch contributed by Brad Hards <bradh@frogmouth.net>).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11702
2011-04-18 10:37:56 +00:00
Julian Seward
945eccc8e4 Make MacOS builds work again following fixes for #259977
(revs 11687,8,9)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11690
2011-04-11 22:08:06 +00:00
Julian Seward
b3827d6c33 Create new module m_libcsetjmp, which wraps up uses of
__builtin_setjmp and __builtin_longjmp so that they can be selectively
replaced, on a platform by platform basis.  Does not change any
functionality.  Related to #259977.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11687
2011-04-11 16:17:51 +00:00
Julian Seward
adb0e3b18d Remove a bunch more warnings generated by gcc-4.6 about dead
assignments ("[-Wunused-but-set-variable]"), on ppc32-linux and
ppc64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11674
2011-03-28 20:33:52 +00:00
Julian Seward
d6740217a1 Add support for sys_ptrace. Fixes #269079.
(Ulrich Weigand, uweigand@de.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11664
2011-03-24 11:34:12 +00:00
Bart Van Assche
a170de4e78 Linux/ppc: Added support for the ppoll() system call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11655
2011-03-18 17:47:38 +00:00
Julian Seward
6107fd666c Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>).  Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604
2011-03-07 16:05:35 +00:00
Julian Seward
30dcecc9c9 Un-break the trunk build on OSX (broken by r11483 on 6 Dec '10).
Fixes #261654.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11489
2011-01-04 14:18:35 +00:00
Nicholas Nethercote
c318a53a2a When a shmat() size is passed to the tool, round it up to a page size. This
is how mmap() sizes are treated.  It fixes an assertion failure in Massif
with --pages-as-heap=yes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11485
2010-12-08 02:51:43 +00:00
Julian Seward
906915e79b New command line option: --trace-children-skip-by-arg, which allows
chase/nochase decisions for child processes to be made on the basis
of their argv[] entries rather than on the name of their executables.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11483
2010-12-06 11:40:04 +00:00
Julian Seward
1a7379bf89 Enable support for sys_ppoll on arm-linux (Rodrigo Belem, rodrigo.belem@openbossa.org).
See #253636.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11428
2010-10-11 19:09:53 +00:00
Julian Seward
bee9b6b321 chmod_extended and fchmod_extended: handle NULL xsecurity argument correctly.
Fixes #247510.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11412
2010-10-07 15:38:51 +00:00
Julian Seward
566a25cf7e Make client sys_shmat work properly on arm-linux by taking into
account rounding requirements to SHMLBA.  Modified version of a patch
by Kirill Batuzov, batuzovk@ispras.ru.  This fixes the main bug in
#222545.  Temporarily breaks the build on all other platforms though.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11399
2010-10-06 15:24:39 +00:00
Julian Seward
12dd8bd181 get_shm_size(): pass VKI_IPC_64 to our shmctl call if it is available,
except on amd64-linux.  This fixes a secondary problem discussed
in bug 222545.  (Kirill Batuzov, batuzovk@ispras.ru)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11398
2010-10-06 12:59:44 +00:00
Julian Seward
669d87bcc1 Support sys_readahead on Linux.
(Sean Bartell, wingedtachikoma@gmail.com)  Fixes #247894.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11394
2010-10-04 20:03:27 +00:00
Tom Hughes
00ae2c5c8c Calling VG_(am_relocate_nooverlap_client) will destroy the descriptor
for the old segment so we need to save the permissions from it before
the call so that we can use them when notifying tools of the new space
afterwards, or we will notify them of the wrong permissions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11384
2010-09-27 15:08:34 +00:00
Julian Seward
61f940977a Enable sys_pwrite64 on arm-linux. Fixes #249996.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11334
2010-09-03 14:25:10 +00:00
Julian Seward
371f1ef15e darwin: support sys_open_extended, sys_removexattr, sys_fremovexattr.
open_extended has the same kludge as chmod_extended/fchmod_extended.
Fixes #246549.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11332
2010-09-02 22:42:14 +00:00
Tom Hughes
3d13995189 Add support for F_DUPFD_CLOEXEC. Fixes #238696.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11316
2010-09-02 08:23:35 +00:00
Julian Seward
d8f43a43a1 Update comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11291
2010-08-26 09:41:18 +00:00
Tom Hughes
72abd5958d The argument to FIBMAP is an int, not an unsigned long. Fixes #248822.
Patch from Christian Borntraeger <borntraeger@de.ibm.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11289
2010-08-25 09:13:44 +00:00
Julian Seward
f3a7b3a8b9 arm-linux: make restarting interrupted syscalls work in Thumb mode.
This isn't exactly right, in the sense that the if the SVC instruction
was conditional, then it will be restarted with the condition for the
following instruction.  IOW we should back up ITSTATE too, but don't.
This doesn't happen in glibc, though, afaics.

Also tighten up the checks for restarting in ARM mode.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11287
2010-08-22 22:18:31 +00:00
Julian Seward
65e5f2fd0a Merge from branches/THUMB: add support for sys_pselect6, sys_pipe2,
sys_inotify_init1 on arm-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11280
2010-08-22 12:08:59 +00:00
Julian Seward
e91f05bc48 Merge from branches/THUMB: track renaming of guest_R15 to guest_R15T.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11278
2010-08-22 12:00:40 +00:00
Julian Seward
ad6190eace Support sys_proc_info on 32-bit darwin as well as 64-bit. This
gets rid of complaints about "unsupported syscall unix:336".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11231
2010-07-27 09:09:55 +00:00
Julian Seward
e2046a7652 pthread_hijack: start the new thread with all signals blocked,
as with the x86-darwin version.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11224
2010-07-22 08:59:07 +00:00
Julian Seward
4f6ca13404 Add a fix equivalent to r10751 for amd64-darwin: Resync after
{wq,p}thread_hijack rather than merely doing a check.  Also, some
whitespace changes that make it easier to diff by eye relative to the
x86-darwin versions.  "Fixes" the problem reported at
https://bugs.kde.org/show_bug.cgi?id=205241#c74



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11223
2010-07-22 08:47:19 +00:00
Julian Seward
8981f6c7e6 Support sys_audit_session_self on MacOSX 10.6 (Dave MacLachlan,
dmaclach@gmail.com).  Fixes #244670.  I'm assuming this also compiles
on 10.5 but haven't tried it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11222
2010-07-21 19:54:43 +00:00
Julian Seward
3270201d65 Use the wrapper for sys___semwait_signal for 10.5 also on 10.6,
rather than have a different one for 10.6.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11221
2010-07-21 16:34:47 +00:00
Julian Seward
18ac942546 Support sys_symlink on Darwin. Fixes #237485.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11220
2010-07-21 16:21:43 +00:00
Julian Seward
bb88383593 Fix compiler warnings with the proc_info wrapper.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11218
2010-07-21 15:28:34 +00:00
Julian Seward
ca846cfb0a Get rid of a whole bunch of format string warnings, by the probably
excessively blunt-instrument approach of casting all offending values
to 64-bits.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11205
2010-07-01 14:17:32 +00:00
Julian Seward
df1eec38c3 Add a handler for syscall proc_info, 64-bit Darwin only atm.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11202
2010-07-01 10:47:23 +00:00
Nicholas Nethercote
6fd0eb7b07 Merged the MACOSX106 branch to the trunk. Merge command:
svn merge -r11143:HEAD svn://svn.valgrind.org/valgrind/branches/MACOSX106

There were some easy-to-resolve conflicts.

Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT.  I just
overwrote the trunk versions with the branch versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11194
2010-07-01 00:20:20 +00:00
Bart Van Assche
9db21fdc0d Fix for bug #242814 (Linux): made sure that Valgrind tools do not crash when the first argument of the mount() system call is NULL.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11191
2010-06-29 06:16:52 +00:00
Tom Hughes
725752d4ea Fixed bogus check of RES in the ioctl PRE handler introduced
in r11124 while fixing #235642.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11171
2010-06-10 15:01:02 +00:00
Tom Hughes
f26002da90 Fix amd64 and ppc64 to correctly mark mq_timedreceive as LINXY so that
the post handler is run to mark the retrieved message as correct.

Also change the post handler to only mark the number of bytes actually
returned as defined, rather than the whole buffer.

Fixes #238679.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11133
2010-05-24 13:40:10 +00:00
Tom Hughes
ef5b3e48b6 Add support for some EVIO ioctls. These are a bit abnormal because
the length part of the ioctl is not fixed so they are essentially
families of ioctls.

Based on patch from Peter Korsgaard. Fixes #235642.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11124
2010-05-07 15:32:04 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +00:00
Julian Seward
578d74d4fa Fix the definedness handling of the last argument of sys_socketpair.
The last argument is really a pointer to an array of two ints and so
we need to say it is an int* and not an int [2].  This just happens to
work on amd64-linux because sizeof(int [2]) == 8 == sizeof(int*).  On
arm-linux it duly craps out w/ an assertion because sizeof(int [2]) !=
sizeof(UWord).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11083
2010-03-08 14:45:26 +00:00
Tom Hughes
2373f0c096 On amd64 all IPC calls behave as if the IPC_64 flag is set in the
command, so pretend that it is set when calling the generic wrapper
functions in pre and post handlers. Fixes #229509.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11064
2010-03-05 10:11:41 +00:00
Tom Hughes
0e95308259 Add a wrapper for the splice system call and wire it up on
x86 and amd64 systems. Closes #205788.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11055
2010-02-23 10:49:48 +00:00
Tom Hughes
2a70cf0b01 Add support for the getcpu system call on x86, ppc32 and ppc64. There
is no support for amd64 because there is no getcpu system call on that
platform - it is always done as a vsyscall in user space.

Based on patch from Aleksander Salwa. Closes #223758.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11054
2010-02-23 10:02:55 +00:00
Julian Seward
e6c318c531 When creating a child thread, initially set its os_state.threadgroup
to have the same value as the parent.  This avoids exit races leading
to hangs and strange behaviour in heavily multithreaded apps, in the
situation where threads are rapidly being created, and at the same
time an existing thread does sys_exit_group so as to terminate the
entire process.  Thanks to Konstantin S for chasing this down to a
small test case.  Fixes #226116.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11053
2010-02-22 11:03:10 +00:00
Tom Hughes
4219823412 Add parentheses round the "zzarg" macro argument when using it as it
may expand to an expression which may mean we wind up doing the cast
before evaluating the expression... Closes #227570.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11051
2010-02-19 16:50:45 +00:00
Tom Hughes
3985923259 Fix up a few issues with OSS ioctls. Fixes #227325.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11050
2010-02-18 15:54:45 +00:00
Tom Hughes
e548bda0ec Neither FUTEX_WAKE or FUTEX_WAKE_BITSET actually dereference the
futex at all (they just use the address) so we shouldn't insist on
it's contents being define. Fixes #224723.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11048
2010-02-16 15:05:55 +00:00
Julian Seward
6b95f1cd4c arm-linux: remove wrappers for __NR_ipc, __NR_mmap, __NR_sigsuspend
and __NR_sigaction, which all did I_die_here and therefore can never
have been used.  I think they were here as a result of this file being
derived from the x86-linux version, and that arm-linux uses more
modern equivalents (mmap2, rt_sig*, and the broken-out versions of
ipc).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11019
2010-01-06 11:08:18 +00:00