History log of /external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b3a1e4bffbdbbf38304f216af405009868f43628 21-Aug-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates, to include 2015. No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
b26101c4d128f0bfed780434c4e4f8d67f8aeee4 08-Aug-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15510 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
ad4e979f408239dabbaae955d8ffcb84a51a5c85 05-Jul-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru).
Fixes BZ #349874


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15394 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9e2645c0b8d76ece8eed2d08d1b7a8021da41252 07-May-2015 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the syncfs system call.

Based on patch from j@eckel.me on BZ#347389.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15191 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
faaf86055a7af8ff13c591cdf692724aab94c960 18-Apr-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove a few unneeded header files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15111 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9d7592e571487e08e2166212890e65b87e2905a4 19-Jan-2015 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle the memfd_create system call.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14875 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
e6366711ec586437958764b451145749c7bcded1 10-Nov-2014 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the getrandom system call. BZ#340788.

Requires r14705 for updated system call lists.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14709 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
77eb20b3865e7b17c7695c7e7a526b52935f593e 11-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Use wrapper functions VG_(malloc) and friends consistently across the
board (instead of e.g. VG_(arena_malloc)(VG_AR_CORE,...). This change
also benefits static analysers. We can tell tools that VG_(malloc) allocates
and VG_(free) deallocates and that they are a pair. But we cannot do that for
arena_malloc/free.
Also provide a wrapper VG_(realloc_shrink).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14517 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
8a3377f03c4865cda1dd1e9a152861fdb77315fa 08-Sep-2014 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for sys_pivot_root and sys_unshare. Patch from
Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>.
n-i-bz (patch on dev@, 27 Aug 2014)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14494 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
2fee8701a03de747cf0d112e13efdb9151b0154c 04-Sep-2014 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for sys_kcmp. Patch from Chris Jones
(cjones.bugs@gmail.com). Fixes #338106.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14451 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
38a74d2cc4670e3eb559adff51a376cd6ec98005 30-Aug-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> The semantic of the stack bounds is not consistent or is not described.
At various places, there were either some assumption that the 'end'
boundary (highest address) was either not included, included,
or was the highest addressable word, or the highest addressable byte.
This e.g. was very visible when doing:
./vg-in-place -d -d ./helgrind/tests/tc01_simple_race|&grep regi
giving
--24040:2:stacks register 0xBEDB4000-0xBEDB4FFF as stack 0
--24040:2:stacks register 0x402C000-0x4A2C000 as stack 1
showing that the main stack end was (on x86) not the highest word
but the highest byte, while for the thread 1, the registered end
was a byte not part of the stack.

The attached patch ensures that stack bounds semantic are documented and
consistent. Also, some of the stack handling code is factorised.

The convention that the patch ensures and documents is:
start is the lowest addressable byte, end is the highest addressable byte.
(the words 'min' and 'max' have been kept when already used, as this wording is
consistent with the new semantic of start/end).

In various debug log, used brackets [ and ] to make clear that
both bounds are included.

The code to guess and register the client stack was duplicated
in all the platform specific syswrap-<plat>-<os>.c files.
Code has been factorised in syswrap-generic.c

The patch has been regression tested on
x86, amd64, ppc32/64, s390x.
It has been compiled and one test run on arm64.
Not compiled/not tested on darwin, android, mips32/64, arm


More in details, the patch does the following:

coregrind/pub_core_aspacemgr.h
include/valgrind.h
include/pub_tool_machine.h
coregrind/pub_core_scheduler.h
coregrind/pub_core_stacks.h
- document start/end semantic in various functions
also in pub_tool_machine.h:
- replaces unclear 'bottommost address' by 'lowest address'
(unclear as stack bottom is or at least can be interpreted as
the 'functional' bottom of the stack, which is the highest
address for 'stack growing downwards').
coregrind/pub_core_initimg.h
replace unclear clstack_top by clstack_end
coregrind/m_main.c
updated to clstack_end

coregrind/pub_core_threadstate.h
renamed client_stack_highest_word to client_stack_highest_byte
coregrind/m_scheduler/scheduler.c
computes client_stack_highest_byte as the highest addressable byte
Update comments in call to VG_(show_sched_status)
coregrind/m_machine.c
coregrind/m_stacktrace.c
updated to client_stack_highest_byte, and switched
stack_lowest/highest_word to stack_lowest/highest_byte accordingly

coregrind/m_stacks.c
clarify semantic of start/end,
added a comment to indicate why we invert start/end in register call
(note that the code find_stack_by_addr was already assuming that
end was included as the checks were doing e.g.
sp >= i->start && sp <= i->end

coregrind/pub_core_clientstate.h
coregrind/m_clientstate.c
renames Addr VG_(clstk_base) to Addr VG_(clstk_start_base)
(start to indicate it is the lowest address, base suffix kept
to indicate it is the initial lowest address).

coregrind/m_initimg/initimg-darwin.c
updated to VG_(clstk_start_base)
replace unclear iicii.clstack_top by iicii.clstack_end
updated clstack_max_size computation according to both bounds included.

coregrind/m_initimg/initimg-linux.c
updated to VG_(clstk_start_base)
updated VG_(clstk_end) computation according to both bounds included.
replace unclear iicii.clstack_top by iicii.clstack_end

coregrind/pub_core_aspacemgr.h
extern Addr VG_(am_startup) : clarify semantic of the returned value
coregrind/m_aspacemgr/aspacemgr-linux.c
removed a copy of a comment that was already in pub_core_aspacemgr.h
(avoid double maintenance)
renamed unclear suggested_clstack_top to suggested_clstack_end
(note that here, it looks like suggested_clstack_top was already
the last addressable byte)

* factorisation of the stack guessing and registration causes
mechanical changes in the following files:
coregrind/m_syswrap/syswrap-ppc64-linux.c
coregrind/m_syswrap/syswrap-x86-darwin.c
coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-arm-linux.c
coregrind/m_syswrap/syswrap-generic.c
coregrind/m_syswrap/syswrap-mips64-linux.c
coregrind/m_syswrap/syswrap-ppc32-linux.c
coregrind/m_syswrap/syswrap-amd64-darwin.c
coregrind/m_syswrap/syswrap-mips32-linux.c
coregrind/m_syswrap/priv_syswrap-generic.h
coregrind/m_syswrap/syswrap-x86-linux.c
coregrind/m_syswrap/syswrap-s390x-linux.c
coregrind/m_syswrap/syswrap-darwin.c
coregrind/m_syswrap/syswrap-arm64-linux.c
Some files to look at more in details:
syswrap-darwin.c : the handling of sysctl(kern.usrstack) looked
buggy to me, and has probably be made correct by the fact that
VG_(clstk_end) is now the last addressable byte. However,unsure
about this, as I could not find any documentation about
sysctl(kern.usrstack). I only find several occurences on the web,
showing that the result of this is page aligned, which I guess
means it must be 1+ the last addressable byte.
syswrap-x86-darwin.c and syswrap-amd64-darwin.c
I suspect the code that was computing client_stack_highest_word
was wrong, and the patch makes it correct.
syswrap-mips64-linux.c
not sure what to do for this code. This is the only code
that was guessing the stack differently from others.
Kept (almost) untouched. To be discussed with mips maintainers.

coregrind/pub_core_libcassert.h
coregrind/m_libcassert.c
* void VG_(show_sched_status):
renamed Bool valgrind_stack_usage to Bool stack_usage
if stack_usage, shows both the valgrind stack usage and
the client stack boundaries
coregrind/m_scheduler/scheduler.c
coregrind/m_gdbserver/server.c
coregrind/m_gdbserver/remote-utils.c
Updated comments in callers to VG_(show_sched_status)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14392 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
ec905f7ed1659f2251045114c785659fbb11ea88 17-Aug-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> The attached patch cleanups the clo processing
of clo which are (or should be) 'enum set'.

* pub_tool_options.h : add new macrox VG_USET_CLO and VG_USETX_CLO to
parse an 'enum set' command line option (with or without "all" keyword).

* use VG_USET_CLO for existing enum set clo options:
memcheck --errors-for-leak-kinds, --show-leak-kinds, --leak-check-heuristics
coregrind --vgdb-stop-at

* change --sim-hints and --kernel-variants to enum set
(this allows to detect user typos: currently, a typo in a sim-hint
or kernel variant is silently ignored. Now, an error will be given
to the user)

* The 2 new sets (--sim-hints and --kernel-variants) should not make
use of the 'all' keyword => VG_(parse_enum_set) has a new argument
to enable/disable the use of the "all" keyword.

* The macros defining an 'all enum' set definition was duplicating
all enum values (so addition of a new enum value could easily
give a bug). Removing these macros as they are unused
(to the exception of the leak-kind set).
For this set, the 'all macro' has been replaced by an 'all function',
coded using parse_enum_set parsing the "all" keyword.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14301 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
ddc4a18e6aeaf9124b9d86cd515e1093ff00eeed 30-Jan-2014 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the clock_adjtime system call.

Based on a patch from Stefan Sørensen on BZ#330469.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13785 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
4f5be8cb2f8e83559648578e5d2098425a6a3068 30-Jan-2014 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Both eventfd and eventfd2 have post handlers that we were failing
to call on most platforms. Fixes BZ #330459.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13784 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
0f157ddb404bcde7815a1c5bf2d7e41c114f3d73 18-Oct-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates (20XY-2012 ==> 20XY-2013)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
cec24b5ef2b4414b223bbbcb9e6f8bfc5e8dfb95 17-Jul-2013 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for fanotify_init and fanotify_mark, based on patches
from Heinrich Schuchardt. BZ#320895.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13460 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
43ca097004b406779c2f62301dff5717c0c817dc 17-Jul-2013 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for open_by_handle_at and fix name_to_handle_at
to check the file handle argument correctly. BZ#316761.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13459 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
f93bbd90a4e8b5c73270f230a5d7a5fadba540bd 17-Jul-2013 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle the sethostname system call. BZ#311922.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13458 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
f666d20249ff381dfc9bf5a621c544560527af40 22-May-2013 mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9> Support PTRACE_GET/SET_THREAD_AREA on x86.
BZ#320063. (Josh Stone, jistone@redhat.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13403 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
f9e5b5e2833d5a24224f54485e7b06bdc01b42e6 03-Mar-2013 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement the name_to_handle_at system call for x86 and amd64.
Based on patch from Asmadeus to fix BZ#308930.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13304 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
66826ece25fc70c7437c38170f2a4312504bd7ff 19-Nov-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a couple of x86 char-signedness stragglers


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13128 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
b2cd1bc0abb95119df1b9b8e6dcc71e48b828a94 08-Nov-2012 cborntra <cborntra@a5019735-40e9-0310-863c-91ae7b9d1cf9> also wire up arm, x86 and amd64 regarding ptrace regsets
original patch from
Andreas Arnez <arnez AT linux DOT vnet DOT ibm DOT com>

Seems that ppc and mips dont have ptrace support....



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13113 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
f2a7bbe64a8a2e3bd91c8b9f344d8a343453b52a 04-Nov-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> factorise sys_socketcall
sys_socketcall was duplicated in syswrap-{ppc64|ppc32|arm|mips32|s390x}-linux.c
=>
* Similarly for what was done for sys_ipc, factorise the code in syswrap-linux.c
* re-enabled PRE_MEM_READ for VKI_SYS_SENDMSG and VKI_SYS_RECVMSG
(PRE_MEM_READ calls were commented out around 2003, for what
was supposed a glibc bug.
The PRE_MEM_READ calls were already re-enabled in s390x)
* s390x also had some more checking to verify the addressibility of
the args and fail the syscall with EFAULT if not addressable
=> same checks are now done for all platforms.

(tested on x86/amd64/mips32/s390x/ppc32/ppc64,
compiled for arm-android-emulator)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13104 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
4eefc8c5ad997e8d925711ebcb07afef2658100d 21-Oct-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> restructure code for future fixing of 123837 (semctl GETVAL false positive)

Regrouped identical code (except for indentation)
from syswrap-ppc64-linux.c, syswrap-ppc32-linux.c,syswrap-mips32-linux.c
syswrap-x86-linux.c, syswrap-s390x-linux.c
into
syswrap-linux.c

(compiled/regtested on x86, amd64, ppc64, mips32, s390x)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13076 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
5db7a79503f7720d3f3d5f40e4d1a411bb56b2bd 08-Aug-2012 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the tee and vmsplice system calls. BZ#304561.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12861 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
03f8d3fc25f5a45c5826259d1b33b7f310117279 05-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to include 2012.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9fdca565049e35998c06d96ca97beb84d9c7f39d 17-Apr-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> add some .globl or used attribute to avoid link failures with gold linker + LTO

When doing experiment with gcc 4.7.0 and link time optimisation,
encountered link failures on amd64 which were solved by adding
.globl and used attribute.
=> added .globl in similar places for arm/x86/ppc32/s390.
Did not touch darwin (which asm seems somewhat different).




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12506 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
d5fb58e1285b1d094e81fb584386f5cfd9bf5953 03-Apr-2012 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the move_pages system call. BZ#282790.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12485 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9a2b80d276717c327e5d3c7dad78625166df7340 25-Mar-2012 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Check whether the big lock is held before invoking pre_thread_ll_create.

If the pre_thread_ll_create tracking function would be invoked without the
big lock being held, that would trigger a race condition in the tools that
implement this tracking function.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12458 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
8b3a6094d817ca6677592ce7f1147eb24c1a94f4 10-Feb-2012 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Only mark data which has actually been filled in by recvmsg as defined.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12380 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
2764000a537721165ba211bb0fea0158f0b741c0 10-Feb-2012 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> It turns out sendmmsg also updates the msg_len fields.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12377 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
a4991237861dd834a58620b6a9eeca0e6e843f24 10-Feb-2012 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the sendmmsg and recvmmsg system calls. Fixes BZ#277779.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12376 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9e4b636f786d7d105cb8ead0a4c9f0b403e82e71 10-Feb-2012 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for process_vm_readv and process_vm_writev system calls.
Patch from Lénaïc Huard to fix BZ#292995.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12374 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
ec062e8d96a361af9905b5447027819dfbfee01a 23-Oct-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update all copyright dates, from 20xy-2010 to 20xy-2011.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
cc3de2dfcb3b724ecd305d9a30e9095fae6664c5 18-Aug-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a new simulation hint, --sim-hints=fuse-compatible, which causes
a bunch of file-related syscalls to be handled on the might-block
syscall path rather than the fast syscall path. This fixes deadlocks
when running some FUSE-specific filesystem codes. Fixes #278057.
(Mike Shal, marfey@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11993 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
5f7a1a2a4ed6e7ac83723ba21ec4dea618f67426 11-Jul-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle sigaction, sigsuspend, sigprocmask on arm-linux; comment-only
changes for x86-linux and ppc32-linux. Derived from patch in bug
266035 comment 10 (Jeff Brown, jeffbrown@google.com).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11871 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
de9264c4676922d24236a18a44267dbc71297cb6 11-Jul-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove identical copies of convert_sigset_to_rt, PRE(sys_sigaction)
and POST(sys_sigaction) in syswrap-x86-linux.c and
syswrap-ppc32-linux.c, and replace them with a single version in
syswrap-linux.c instead. Derived from patch in bug 266035 comment 10
(Jeff Brown, jeffbrown@google.com).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11870 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
46d02abf94a41586ef84aebf974db51a470e10da 08-Jun-2011 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for prlimit64 on x86 and amd64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11806 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
c8232f94b88c0b9ea62399fa5abe5a5a34d35c40 08-Jun-2011 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> It seems that the perf_counter_open system call was renamed to
perf_event_open some time after we added it, so correct the name
wherever it appears to match the current kernel source.

Also fixup the PRE handler to do the check correctly, using the
size field of the structure to work out how much data there is.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11804 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
6c591e15c1d6402a2a755310f005f795b68e7e38 11-Apr-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> 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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
792e00ab0267d6ac7143b7d6d3a8ecd86270ea90 04-Oct-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Support sys_readahead on Linux.
(Sean Bartell, wingedtachikoma@gmail.com) Fixes #247894.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11394 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9eecbbb9a9cbbd30b903c09a9e04d8efc20bda33 03-May-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to 2010.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
110743c026aeefc4c952373a1887cfc44ff553e5 23-Feb-2010 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> 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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
472a34b16c3703e8d3adcb12abd194e20a021963 23-Feb-2010 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> 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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
ce21563b673c3b62cf896cb71df6da66d787514b 22-Feb-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> 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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
59570ffbe31930ab4d678754daaeec0715117a3d 01-Jan-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge from branches/ARM, all parts of the ARM-Linux port except for
the changes to do with reading and using ELF and DWARF3 info.
This breaks all targets except amd64-linux and x86-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10982 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
710f7cb43578a9b23a11aa7f9cfaea0311bc5ad9 25-Nov-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for accept4 system call based on patch
from Dodji Seketeli. Part fix for #215973.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10955 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
d709b1d05769eb335d42fd790e3e6490a3753d82 25-Nov-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for fallocate system call on 32 bit (x86/ppc32) linux
systems based on patch from Dodji Seketeli. Part fix for #215973.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10953 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9ceaa9781f4886e8f6a4309e19d0cbaeb7616714 24-Nov-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Re-enable old support for adjtimex system call based on patch
from Dodji Seketeli. Part fix for #215973.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10948 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
d18b541df83952925fc4eb2bd98843ad447124ff 24-Nov-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for rt_tgsigqueueinfo system call based on patch
from Dodji Seketeli. Part fix for #215973.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10947 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
b8b4848fd1006533130f49437369e73a636b6144 24-Nov-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for sched_rr_get_interval system call based on patch
from Dodji Seketeli. Part fix for #215973.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10946 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
f43793ad48d3cb1577ac637472bfb9b9b1188ad9 23-Nov-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle the dup3 system call. Closes #215448.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10945 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
d8feb70c360acdd48bc3b72507f58d74bccf9998 28-Oct-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for preadv and pwritev. Fixes #212149.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10914 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
7bb1b1c0c69d84b3d660e360cb5ce43c630b2aef 27-Oct-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the inotify_init1 system call, based on patches
from Dodji Seketeli and Jakub Jelinek. Fixes #202315.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10909 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
3fbcceef22610e2b0b7eec05b5f612c9b22b2cdc 27-Oct-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the perf_counter_open system call. Fixes #211498.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10907 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
4969c79e4ec456a106ac13e272c0de8991647ccf 27-Oct-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update linux system calls lists to match 2.6.31.5 kernel.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10906 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
6431e308474c88cd5da785b639816cc4321db4c7 28-Aug-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a couple of nits picked up by gcc-4.5, which is more warningful than 4.4.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10876 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
a262f62d4fdd6e1b2e57070510573bcbfccaaf33 20-Jul-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Improve handling of clone() on x86/Linux. Based on a patch from Jeroen
Witmond. This fixes bug 117564.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10493 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
738856f99eea33d86ce91dcb1d6cd5b151e307ca 15-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge coregrind/ changes from branches/MESSAGING_TIDYUP r10464.

This commit tidies up and rationalises what could be called the
"messaging" system -- that part of V to do with presenting output to
the user. In particular it brings significant improvements to XML
output.

Changes are:

* XML and normal text output now have separate file descriptors,
which solves longstanding problems for XML consumers caused by
the XML output getting polluted by unexpected non-XML output.

* This also means that we no longer have to hardwire all manner
of output settings (verbosity, etc) when XML is requested.

* The XML output format has been revised, cleaned up, and made
more suitable for use by error detecting tools in general
(various Memcheck-specific features have been removed). XML
output is enabled for Ptrcheck and Helgrind, and Memcheck is
updated to the new format.

* One side effect is that the behaviour of VG_(message) has been
made to be consistent with printf: it no longer automatically
adds a newline at the end of the output. This means multiple
calls to it can be used to build up a single line message; or a
single call can write a multi-line message. The ==pid==
preamble is automatically inserted at each newline.

* VG_(message)(Vg_UserMsg, ..args..) now has the abbreviated form
VG_(UMSG)(..args..); ditto VG_(DMSG) for Vg_DebugMsg and
VG_(EMSG) for Vg_DebugExtraMsg. A couple of other useful
printf derivatives have been added to pub_tool_libcprint.h,
most particularly VG_(vcbprintf).

* There's a small change in the core-tool interface to do with
error handling: VG_(needs_tool_errors) has a new method
void (*before_pp_Error)(Error* err) which, if non-NULL, is
called just before void (*pp_Error)(Error* err). This is to
give tools the chance to look at errors before any part of them
is printed, so they can print any XML preamble they like.

* coregrind/m_errormgr.c has been overhauled and cleaned up, and
is a bit simpler and more commented. In particular pp_Error
and VG_(maybe_record_error) are significantly changed.

The diff is huge, but mostly very boring. Most of the changes
are of the form

- VG_(message)(Vg_UserMsg, "this is a message %d", n);
+ VG_(message)(Vg_UserMsg, "this is a message %d\n", n);

Unfortunately as a result of this, it touches a large number
of source files.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10465 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
0bd7177a9f2fb45e9e54608f0577f4cd672d8d67 15-Jul-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle fallocate() on 64-bit platforms. Fixes bug 185794.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10456 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
7271588235cfca5ae3b6e355d7ad054f0d6d46fd 10-Jul-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle epoll_create1. Patch from Sam Varshavchik. Fixes bug 188427.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10427 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
8b68b64759254d514d98328c496cbd88cde4c9a5 24-Jun-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
preprocessor, rather than via the build system. This is more consistent
(we use the pre-processor for small arch/OS/platform-specific chunks
within files) and makes the build system much simpler, as the sources for
all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out. If a
new platform is implemented, you need to add 11 extra Makefile.am lines.
Previously it was over 100 lines.

- Vex has been autotoolised. Dependency checking now works in Vex (no more
incomplete builds). Parallel builds now also work. --with-vex no longer
works; it's little use and a pain to support. VEX/Makefile is still in
the Vex repository and gets overwritten at configure-time; it should
probably be renamed Makefile-gcc to avoid possible problems, such as
accidentally committing a generated Makefile. There's a bunch of hacky
copying to deal with the fact that autotools don't handle same-named files
in different directories. Julian plans to rename the files to avoid this
problem.

- Various small Makefile.am things have been made more standard automake
style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
own.

- The existing five top-level Makefile.am include files have been
consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
headers separating sections, declarations relating to the same things next
to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed. And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
3e606a4234c4c70868d69c00f70c572dc32fdcc9 05-Jun-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> x86-linux: sys_set_thread_area: don't allocate GDT entry number zero,
and reject attempts to use it. This is because the hardware does not
allow entry zero to be used, and apparently doing so confuses some
code (perhaps Windows apps running on Wine). Derived from a patch by
John Reiser.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10251 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
7b1edbdf64325be8000b0662a2f9695c0fa53465 19-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> DARWIN sync: pread64 and pwrite64 wrappers.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9971 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
cda2f0fbda4c4b2644babc830244be8aed95de1d 18-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged non-Darwin-specific parts of r9397,r9423,r9490, 9461, 9462 from the
DARWIN branch. A big ugly DARWIN/trunk sync commit, mostly to do with
changing the representation of SysRes and vki_sigset_t. Functionality of
the trunk shouldn't be changed by it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9876 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9f207460d70d38c46c9e81996a3dcdf90961c6db 10-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright years.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
096ccdd670d4e4eabdafb18598b1cd06d790fda8 23-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge a large chunk of r8949 (the part that moved fcntl and ioctl wrappers
out of syswrap-generic into syswrap-linux) from the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9219 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
f37a81bac9893b05fdb7166be94734babc7ad2c4 17-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged r9185 (fix up getsockopt mess) from the DARWIN branch, minus the
Darwin-specific parts.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9186 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
6c67ef5f17464cd608e27ce06566a8874e0de7a1 09-Jan-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add signalfd4 support.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8930 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
16dfea421cc650175c3458788e7bc5928643a951 15-Dec-2008 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support ioprio_get and wire up ioprio_set on all platforms.
Fixes bug #177819.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8826 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
84eb41fea45f85c284e6cca9543ff40e176ef4e5 10-Dec-2008 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for eventfd2 (and wire up pipe2 on PPC platforms).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8815 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
d3263e575dc9e84fd1a7aca4d10075257e54a5a7 16-Nov-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle sys_lookup_dcookie on amd64-linux (Andrew Haley). Also take
the opportunity to move the handlers from syswrap-generic.c (which
they certainly aren't) to syswrap-linux.c. Fixes #175044.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8769 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
6d652777c984c280f3385c7716a2fe5e8dcde875 07-Nov-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Support sys_stime on x86-linux. Fixes #159285.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8736 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
586c81539ed8c4d033d8b2385bca57bdb7e7a9a1 05-Nov-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Support sys_pipe2 on {amd64,x86}-linux. Also, update syscall numbers
for all supported Linuxes to those in linux-2.6.28-rc3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8730 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9c606bd8634cd6b67bb41fa645b5c639668cfa2d 18-Sep-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge all remaining changes from branches/PTRCHECK. These are some
relatively minor extensions to m_debuginfo, a major overhaul of
m_debuginfo/readdwarf3.c to get its space usage under control, and
changes throughout the system to enable heap-use profiling.

The majority of the merged changes were committed into
branches/PTRCHECK as the following revs: 8591 8595 8598 8599 8601 and
8161.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8621 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
edc9547bf4ab4268fd2273ff91dde7f22ab692f8 07-Aug-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Tidy up the wrappers for pread64 and pwrite64, and make these two
syscalls available on ppc64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8519 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
a0b6b2cf9abc7b0d87be1215a245eaccc0452af9 07-Jul-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged FORMATCHECK branch (r8368) to trunk.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
10ac144c88e5fd1791345237b14d5bc73eb68fa1 21-Jun-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved support for Linux-specific system call sys_init_module from generic to Linux wrappers. Added wrapper for sys_delete_module system call.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8266 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
6bd721aa9d62ad938f88066180dbd3ed2f4429a9 25-May-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Removed superfluous #include directive.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8124 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
7cf4e6b6aed533af53339f36099ed244dc4a5b7f 01-May-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge branches/OTRACK_BY_INSTRUMENTATION into the trunk. This adds
support to Memcheck for tracking the origin of uninitialised values,
if you use the --track-origins=yes flag.

This currently causes some Memcheck regression tests to fail, because
they now print an extra line of advisory text in their output. This
will be fixed.

The core-tool interface is slightly changed. The version number for
the interface needs to be incremented.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7982 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
5fc7da201dec005bec8d9a5e71581c2de8f9b5da 27-Apr-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Added support for timerfd_create(), timerfd_gettime() and timerfd_settime() system calls.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7942 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
f5ceec82074e18723069cdea025041f19000df24 26-Apr-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Added support for epoll_pwait(), utimensat(), eventfd(), timerfd() and signalfd(). Fixes bug 160907.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7917 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
3b2ab277c842b24f77a7ab263503491814b6ddc2 11-Feb-2008 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Always call ML_(generic_POST_sys_shmat) when a shmat call succeeds, even
if the memory was attached at address zero. Fixes bug #157665.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7399 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
4d474d086188fd1f29fa97dbd84d8ea2e589a9b8 11-Feb-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates ("200X-2007" --> "200X-2008").


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9084de7593a0c22f7aaeade0da5eb8a141a4e81f 11-Feb-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Include headers for VG_(register_stack) calls.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7396 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
690c3c807be3571951400b98d5136437dd957b65 08-Feb-2008 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make the clone system call wrappers call VG_(register_stack) to record
the new thread's stack, then make the stack unwinder use that information
to make a better guess at the stack bounds.

This helps avoid crashes trying to unwind the stack under wine when
the starting point is a routine without a proper stack frame.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7383 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
c4e466f788b6d768653d5a89fb5466df6fe9dfc3 08-Jan-2008 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the sync_file_range system call.

Based on patch from Russell Sears <sears@cs.berkeley.edu>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7324 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9d3f9d784936ba5ef83cd63610262cab302c8b0e 21-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Support sys_utimensat on x86-linux. (Dan McGee)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7195 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
adb102f8a53d100cf2d68a1a00bb24a4bcd2b049 10-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge (from branches/THRCHECK) the following two changes to the core-tool
interface:

r6805: Modify two thread-notification events in the core-tool
interface. This removes track_post_thread_create and
track_post_thread_join. The core can only see low level thread
creation and exiting, and has no idea about pthread-level concepts
like "pthread_create" and "pthread_join", so these are a bit
ambiguous.

Replace them with track_pre_thread_ll_create, which is notified before
a new thread makes any memory references, and
track_pre_thread_ll_exit, which is notified just before the new thread
exits, that is, after it has made its last memory reference.

r6823: Core-tool interface: give 'needs_tool_errors' an extra Boolean
indicating whether or not the core should print thread id's on error
messages.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7123 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
cba8f436f93390f672a5c7e626c6c88fadc471d2 19-Mar-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Followup to r6650: tidy up sys_sigreturn/sys_rt_sigreturn on ppc32/64-linux.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6651 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
1829053b0355a28f1dc71c56f1bba6773e299e40 19-Mar-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Document and tidy up one of the more arcane corners of signal
handling: why PRE(sys_sigreturn) has to construct a fake syscall
return value which, when written back to the guest state, leaves it
unchanged. It's only taken me about 3 years to realise why :-)
Fixes to ppc platforms to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6650 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
7f4d7e42a880cd0872f93f5178a723beb56941a4 07-Mar-2007 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for linux key management system calls.
Based on patch from Ezra Peisach <epeisach@bu.edu>.
Fixes bug #139300.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6632 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
b807a78ac64d06eb04977044035d665d8a3c4f68 07-Mar-2007 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle some additional ptrace reason codes. Based on a patch
from Magnus Vesterlund <magnus_vesterlund@hotmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6630 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9ebd6e0c607fa30301b1325874eb8de871c21cc5 08-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
e66f2e09ec1aa9bab7a0fd6b02a6a6150ea85190 30-Dec-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge (from 3_2_BRANCH) r6457/8 (Support 64k pages on ppc32/64-linux
(Jakub Jelink, Dave Nomura) )



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6459 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
a39ebc8e9f7e1b2cdee6c263a3898677a3296e56 18-Dec-2006 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Improve prctl support - based on patch from Eric Pouech in bug #138627.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6410 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
ef1cf8b3583107c7d918c60895937f09969d5b3e 17-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r6140 (some of):

- track SysRes changes

- track VG_(am_find_nsegment) const-ness change

- increase number of client syscall args supported from 6 to 8

- simplify type SyscallStatus. Simply hold a copy of the SysRes
for the syscall rather than have this be a data structure
incorporating something very similar to the fields of a SysRes,
and more besides. Change various macros in priv_types_n_macros.h
to match.

- syswrap-main.c: instantiate the various impedance-matching
functions for AIX.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6276 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
4cfea4f9480393ed6799db463b2e0fb8865a1a2f 14-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Create a new module, m_vki, and move all knowledge about the kernel
interface, except for the syscall numbers, into that. Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.

include/pub_tool_basics.h previously dragged in the entire kernel
interface. I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly. This is why there are many modified .c files -- they have
all acquired an extra #include line.

This certainly breaks all platforms except x86. Will fix shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
4eee476691a0648b893665d3227277eb60f30cdf 14-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Create a new module, m_vkiscnums, and move all the system call numbers
into that. Mostly this means moving vki_unistd-<plat>.h to
include/vki/vki-scnums-<plat>.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6224 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
e4b0bf07b0ee0a18eacc5aba91686ab5fc1d327b 06-Jun-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
05b1f9a0d68e6d2c497ed4b671b8ff65e4ddbab9 17-May-2006 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement the set_robust_list and get_robust_list system calls.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5905 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
a170a3f9bd6d90d065802a3bf5ba188949a69e7a 04-May-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix printing bug in PRE(sys_stat64).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5881 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
313639fbf0bbb03ea14c5af3ac93b9d4925ce35c 03-Apr-2006 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Enable sigsuspend on x86-linux and ppc32-linux.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5819 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
363ec7610ee649b946edf5c1a5546b94bbf0844d 21-Mar-2006 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add wrappers for a load of new 2.6.16 system calls. Fixes bug #123248.

Also expands pathname arguments as strings in a lot more system call
trace messages and fixed the poll wrapper to not be x86 specific.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5785 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
c8cfca6dbe3c261e09d37ac4e864699721177c9f 15-Feb-2006 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix the tkill system call wrapper and enable it on x86 and amd64.
Fixes bug #121901.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5651 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
c1369aa0930694618c641c5d73ef20ec18b64102 11-Feb-2006 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement the vm86 and vm86old system calls based on a patch
from Alper Akcan. Fixes bug #118939.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5635 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
2fedc648b91676a18d736dcb641b6dae6ab32b7a 19-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Counterpart to r5202: restore previous assembler state with .previous


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5204 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
d9fc382d8dcfb8da3602e0feef3155e3c98deba2 19-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Hmm. Perhaps all those top-level pieces of assembly weren't such a
clever idea. There's no reason to assume the assembler is in
.text-mode when it encounters them, and as gcc 2.96 rudely
demonstrates, sometimes it isn't. So put .text in front of all of
them.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5202 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
ffd9c1d52f20865d57a0d05577b73bcd557d5cae 10-Nov-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Try to avoid compiler warnings on AMD64.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5065 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
e14866697a430053751e599416ddb9fb9887ddaf 10-Nov-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Factor out some common code in m_syswrap.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5062 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
a3afdfbcb25683c6f5fbde43ba07d7e1c6b3f268 09-Nov-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Factor out some common code in m_syswrap.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5049 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
de2b1606bd5b774bbe02e3e5ab761620d3bc0acf 05-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Liberalise x86 clone flag handling, so it's as per amd64/ppc32.
However, leave the old code in place, disabled, for documentary
reasons.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5023 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
70a5cb0068c128edaf36a70b38061dee20b7f818 20-Oct-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the mbind system call on x86 and amd64. Fixes bug #114756.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4958 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
d4561963eb0a3e1c545210e59fcce76a6bf982cb 12-Oct-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix x86 specific declaration-before-statement warnings.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4907 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
ce5a566e128da79452a69db9cfe2ecb81395fdcc 06-Oct-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> The m_syswrap subsystem is Valgrind's model of how the kernel behaves
with respect to syscalls. It is detailed and comprehensive but does
not offer a way to deal with minor deviations in behaviour from the
vanilla kernel sources, either due to running a hacked kernel or
running a vanilla kernel with a custom kernel module loaded.

This commit adds a flexible way to handle such cases without polluting
the vanilla handler syswrap-*.c files or their supporting vki_*.h
header files. For each OS, a syswrap-OS-variants.c file is added,
containing wrappers for variants of OS. A new command line flag
--kernel-variants= carries a comma separated list of variant names
that apply to the current run. There are no other changes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4873 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
274461dcb67f680196c97e8afb7028a79b97dcb7 02-Oct-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Plumb 64-bit file offsets throughout the address space manager.
Untested.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4844 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9548a16a2cf8a0de3f4d9d72e5777e9b70481f14 30-Sep-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Rationalise the mmap system call handling - after examining the kernel
source it turns out that there are five different versions of mmap for
the three platforms we currently support:

- On x86-linux there is mmap (aka old_mmap) which takes the
arguments in a memory block and the offset in bytes; and
mmap2 (aka sys_mmap2) which takes the arguments in the normal
way and the offset in pages.

- On ppc32-linux there is mmap (aka sys_mmap) which takes the
arguments in the normal way and the offset in bytes; and
mmap2 (aka sys_mmap2) which takes the arguments in the normal
way and the offset in pages.

- On amd64-linux everything is simple and there is just the one
call, mmap (aka sys_mmap) which takes the arguments in the normal
way and the offset in bytes.

To reconcile all this I have created a generic handler and then
written five platform specific wrappers which normalise all the
arguments and then call the generic handler.

I have also modified the address space manager to use mmap2 rather
than mmap on x86 and ppc32 so that large offsets can be correctly
handled.

There is still an issue of OffT truncating offsets as we go through
the address space manager that will need to be addressed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4834 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
7d15e51cf7cd1f2380676cad3bcda906b946e998 30-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of duplicated STRINGIFY macros.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4829 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
ae3ae82e422630e9f6e656053d3d7f7a6a5ab1cd 30-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Oh Arse. This'll teach me to edit the x86-specific sources on a ppc32
box.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4825 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
260667d2c299878ec61edd30c8e666fc31397c22 30-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> A corresponding fix to 4823: don't deal with MAP_FIXED case directly
here; instead uniformly pass all requests to VG_(am_get_advisory), so
that layout policy is controlled from one place only.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4824 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
98eee482704697c5acd774b19b71875c69c11e70 29-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Comment-only changes


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4818 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
1ae3f3ae5188a7da990be18406c7920b89f19043 28-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of pub_core_main.h, so that m_main is not imported by anyone,
and so is not part of a module cycle. This requires a moderately
grotty hack of passing a continuation-function pointer in a global
variable.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4806 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
45f4e7c91119c7d01a59f5e827c67841632c9314 27-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive). That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome. The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
and include it in a couple of places. Building etc seems to still
work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
stuff was moved from -generic to -linux after the branch was created.
I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
is strange, and makes it hard to diagnose regtest failures. In
particular memcheck/tests/x86/scalar.stderr.exp remains in a
conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable. I'll
attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
5c691751e72bf121d533f69fa7a80f4eb7419084 31-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved sys_mmap2 wrapper from "generic" to "linux".



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4595 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
cd405eab1a2e6942ca50ca2230cea2264f73e859 31-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved some more syscall wrappers from "generic" to "linux".



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4594 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
b2480c95e596b733048b3d13ccf6ffff6088c4a1 30-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved sched_* from "generic" to "linux"; Darwin doesn't have them.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4576 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
65ccc5099570541b315c6e854b223b64363ad19a 30-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move *xattr from "generic" to "linux". Darwin has them, but with an extra
parameter.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4575 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
efc957cdd12ed80a74a1a547341f8b1329d3b71e 26-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move *chown16 syscalls from "generic" to "linux".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4523 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
a3b67b704ea20a46010d4fedf2bfee203ce31922 26-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move get*16 and set*16 syscalls from "generic" to "linux".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4521 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9fe7b129d7e04fcad5f8a6d84a68aba1ea73dfe3 26-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move cap{get,set} syscalls from "generic" to "linux".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4520 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
424c056d1799ca01936273515aafd9e45448944b 26-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move timer_* syscalls from "generic" to "linux".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4519 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
1588bc0274dc3363b97c006d63efd2c4a66523a4 26-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move clock_* syscalls from "generic" to "linux".



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4518 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
4279a8884ad1aee46dfe34b5df5950b51e93532c 26-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move mq_* syscalls from "generic" to "linux".



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4517 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
9b52a3438042e287f40374194797210c714c5152 08-Aug-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix system call name in error messages.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4346 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
d9cac2fbf1b0b2dd737ee6552a95799acc10bef1 07-Aug-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Check the fields of the new structure passed to sigaction individually
and only check sa_restorer if the SA_RESTORER flag is set.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4338 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
0605fd637aa61794feb99a49b8c472e23d782036 05-Aug-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement the waitid system call. Fixes bug #110202.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4329 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
0bcaf2ac3aee09e5c37b4c62665cdc54b9aaaf54 25-Jul-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for the inotify system calls based on a patch
from John McCutchan <ttb@tentacle.dhs.org>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4250 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
3d7c2f0b8e6d8e4a70b6aaaa6f14a29f3b88ef4c 24-Jul-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of --support-elan3=. This flag wasn't doing anything since
the Elan3 user-space driver now works on unmodified Valgrind.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4238 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
2af58f27aa3d05dfd31613c9c61971cb7879c94a 22-Jul-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Yet more system calls.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4227 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
1b1a22395014bad0778dc0d346ac433bdc6ab29e 20-Jul-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> More system call fixups.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4213 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
b33fc68c5dcb0a089303fe93f038ab4b73c4b2aa 20-Jul-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix mistaken comments.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4202 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
10c4b5275169eecd2439db0c5fea49d10b8696de 20-Jul-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Return success when get_thread_area succeeds.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4199 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
f5d62bedda8385a42a55525c70883ce626668a56 18-Jul-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Preserve %esi across VG_(clone) as the caller may be relying on it
not being changed. Fix to bug #106713.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4160 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
310ed28d40c8d1302fbead2f41c81bc5734ed6c5 26-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Simplify atfork to only provide the functionality we need.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4032 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
6140074fc59cf8b9cbccefe02579400b8c65312a 24-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove out-of-date comments.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4013 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
7b2c38c2ed00b4214d199184a50837a009e1acc0 23-Jun-2005 cerion <cerion@a5019735-40e9-0310-863c-91ae7b9d1cf9> VG_() -> ML() for ppc32, amd64
(plus a few scattered ones in comments etc)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4003 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
af839f52d74df156d655201a889954133ab01be7 23-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Removed the VGA_/VGO_/VGP_ prefixes for arch/OS/platform-specific
things. These made sense when the arch/OS/platform-specific code was in
one module, but as that code got mixed in with generic code the boundary
between generic and non-generic blurred, and the distinction made less
sense. So let's get rid of them.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4002 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
7eb7c58d166ac00515ec757dcf9c7b0d177d28c9 23-Jun-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> For symbols which have C-level global scope but which we regard as
module-local, use the new ML_ prefix instead of VG_. This makes it
trivial to see which names are those exported from public module
interfaces: precisely those using VG_.

/* VG_ is for symbols exported from modules. ML_ (module-local) is
for symbols which are not intended to be visible outside modules,
but which cannot be declared as C 'static's since they need to be
visible across C files within a given module. It is a mistake for
a ML_ name to appear in a pub_core_*.h or pub_tool_*.h file.
Likewise it is a mistake for a VG_ name to appear in a priv_*.h
file.
*/



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4000 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
899ce73b9eb1f679562e93f8e5c162aa049413f1 21-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't #include pub_core_debuginfo.h in pub_core_aspacemgr.h. So have
to #include it explicitly in lots of other places, but at least the
dependency is clear now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3974 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
85665ca6fa29dd64754dabe50eb98f25896e752a 20-Jun-2005 cerion <cerion@a5019735-40e9-0310-863c-91ae7b9d1cf9> Finally, valgrind on ppc32.
Plenty still to do, but simple programs like ls seem to run ok

Thanks, Paul, for having your ppc port of valgrind 2.4 to work from!




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3969 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
f4c50164b9a89e3421cd6650f7187bd46b936cbd 20-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove some unnecessary #includes, comment some others.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3968 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
c7561b931e249acf3768ead77638545b0ccaa8f1 19-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Final commit for the initial modularisation pass:

- Broke part of m_scheduler off into a new module m_threadstate. It
contains ThreadState, VG_(threads)[] and some basic operations on the
thread table. All simple stuff, the complex stuff stays in m_scheduler.
This avoids lots of circular dependencies between m_scheduler and other
modules.

- Managed to finally remove core.h and tool.h, double hurrah!

- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
include by every single C file.

- Lots of little cleanups and changes related to the above.

- I even did a small amount of documentation updating.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
fcb7c3e7a1b5d1654d309438036c5a3e6a76512d 18-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved call_on_new_stack_0_1 and jump_and_switch_stacks to better places.
This enabled the removal of $ARCH/jmp_with_stack.c, hurrah!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3938 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c
8a4eeaf314e696d5f2abe261159bf761ed3c05ee 18-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Rename m_syscalls/ as m_syswrap/ to complete the module renaming.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3924 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-linux.c