summaryrefslogtreecommitdiff
path: root/exp-ptrcheck/h_main.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-11Rename 'exp-ptrcheck' to 'exp-sgcheck' and hope this does not causesewardj1-729/+0
too much build carnage. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11745 a5019735-40e9-0310-863c-91ae7b9d1cf9
2011-05-11Remove heap checking from exp-ptrcheck, leaving only the ability tosewardj1-4870/+6
check for overruns of stack and global arrays. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11741 a5019735-40e9-0310-863c-91ae7b9d1cf9
2011-04-15Add support for IBM Power ISA 2.06 -- stage 1. Valgrind-side changessewardj1-130/+212
and test cases. Bug #267630 and followup fix #270794. (Maynard Johnson, maynardj@us.ibm.com) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11697 a5019735-40e9-0310-863c-91ae7b9d1cf9
2011-03-29Fix yet another gcc-4.6 assigned-to-but-not-used warning.sewardj1-2/+2
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11677 a5019735-40e9-0310-863c-91ae7b9d1cf9
2011-03-07Add a port to IBM z/Architecture (s390x) running Linux -- Valgrindsewardj1-1/+23
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
2010-10-12Changes to make exp-ptrcheck work reasonable on Fedora 14 x86:sewardj1-9/+10
* looks_like_a_pointer: x86-linux: halve lower threshold value to take account of evident address space randomisation done by Fedora 14 on x86 * handle __NR_lgetxattr * move __NR_mq_* entries to the correct place (tidyup only) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11435 a5019735-40e9-0310-863c-91ae7b9d1cf9
2010-10-06Handle mq_* syscalls. Fixes #243884. (David Fenger, dkfenger@gmail.com)sewardj1-0/+8
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11396 a5019735-40e9-0310-863c-91ae7b9d1cf9
2010-08-22Merge from branches/THUMB: tool-side handling of new primops requiredsewardj1-1/+3
for NEON support. Requires further checking. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11277 a5019735-40e9-0310-863c-91ae7b9d1cf9
2010-07-29Handle sys_ioperm on Linux. Fixes #237723.sewardj1-0/+1
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11232 a5019735-40e9-0310-863c-91ae7b9d1cf9
2010-07-21Handle (on Linux) syscalls: sendfile, setgid, setgroups. Fixes sewardj1-0/+3
#242606 and #244009. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11216 a5019735-40e9-0310-863c-91ae7b9d1cf9
2010-05-03Update copyright dates to 2010.sewardj1-2/+2
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
2010-03-14Enabled getsid in ptrcheck. Fixe #230593.tom1-0/+1
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11092 a5019735-40e9-0310-863c-91ae7b9d1cf9
2010-03-09Add mlockall support to ptrcheck. Closes #230020.tom1-0/+1
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11086 a5019735-40e9-0310-863c-91ae7b9d1cf9
2010-02-15Handle sys_inotify_init1.sewardj1-0/+3
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11043 a5019735-40e9-0310-863c-91ae7b9d1cf9
2010-01-01Make Callgrind, DRD and Ptrcheck build on arm-linux.sewardj1-7/+54
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10985 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-12-31Track changes in the names of a few IR primops to do with int<->fpsewardj1-13/+13
conversions, as introduced in vex r1949. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10980 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-11-26Track vex r1930 (Change the IR representation of load linked and storesewardj1-300/+349
conditional.) Completes the fix of #215771. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10957 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-11-03Support pipe2 in exp-ptrcheck. Fixes #212739.tom1-0/+3
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10924 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-10-27Add epoll_ctl, epoll_pwait and epoll_wait to exp-ptrcheck. Fixes #207668.tom1-0/+3
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10908 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-08-07Tidy up of messaging:sewardj1-1/+7
* For all tools and the core, don't show statistics when -v is in effect. Instead, try to restrict -v to mostly user-useful stuff. * A new flag --stats=no|yes [no] produces statistics output instead. * Fix longstanding problem in that Memcheck's leak checker ran after the core's error manager module shut down, thereby not showing use counts of leak suppressions. This fixes #186790. * As a consequence, the leak checker text output of Memcheck has changed a bit -- leak check is done before the final error summary is done (much more logical), and the output has been tidied up a bit. * Helgrind, Drd and Ptrcheck now also print "For counts of detected and suppressed errors, rerun with: -v", which makes them consistent with Memcheck in this regard. These are filtered out by the regtest filter scripts. For all tools except Memcheck, the regtests are unchanged. On Memcheck regtests still fail due to rearrangements of the leak checker output. This will be fixed by a followup commit. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10746 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-07-27Support epoll_create and epoll_create1 in ptrcheck. Fixes #189762.tom1-0/+2
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10635 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-07-16More ptrcheck system calls. Fixes #187416tom1-0/+3
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10481 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-07-15Add some more system calls to exp-ptrcheck. Closes #186507 and #197966.tom1-1/+17
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10479 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-07-15Merge exp-ptrcheck/ changes from branches/MESSAGING_TIDYUP r10464.sewardj1-10/+11
See trunk r10465 commit message for details. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10469 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-07-13Fix breakage on ppc{32,64}-linux in post_reg_write_nonptr followingsewardj1-1/+9
r10084 and also update a comment. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10439 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-07-12Track vex r1907 (introduce Iop_CmpCas{EQ,NE}{8,16,32,64} and use themsewardj1-36/+43
for CAS-success? tests). Detailed background and rationale in memcheck/mc_translate, comment "COMMENT_ON_CasCmpEQ". This commit changes the Memcheck instrumentation of IRCAS so as not to do a definedness check on the success/failure indication. Also, by being able to identify via the Iop_CasCmpEQ primitives any such checks independently created by front ends, it can avoid instrumenting these too. All this is to avoid reporting new false positives observed on Fedora 7 (x86?) and openSUSE 10.2 (x86) following the recent merge of branches/DCAS. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10432 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-07-09Add support for IRStmt_CAS to the h_ instrumenter. This should stopsewardj1-32/+262
exp-ptrcheck asserting on threaded programs on x86 and amd64. Vast amounts of fiddly complication that makes my head hurt. Urr. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10418 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-07-09Liberalise IRTemp bookkeeping in the h_ instrumenter, so as to allowsewardj1-78/+176
addition of non-shadow IRTemps without causing it to collapse into assertion failures. This changes is a simplified version of what was committed in svn://svn.valgrind.org/valgrind/branches/DCAS/memcheck/mc_translate.c r10109. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10417 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-07-01Merge in branches/DCAS.sewardj1-57/+235
This branch adds proper support for atomic instructions, proper in the sense that the atomicity is preserved through the compilation pipeline, and thus in the instrumented code. These changes track the IR changes added by vex r1901. They primarily update the instrumentation functions in all tools to handle the changes, with the exception of exp-ptrcheck, which needs some further work in order to be able to run threaded code. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10392 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-06-05For no apparent reason, the machine-dependent syscallnjn1-1/+1
thread_fast_set_cthread_self was being called pthread_set_self. This commit fixes this. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10249 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-06-03A number of changes relating to syscall numbering:njn1-12/+1
- Introduced VG_SYSNUM_STRING and VG_SYSNUM_STRING_EXTRA which factor out differences in the way syscall numbers are printed on different platforms. This gets rid of seven "DDD" fixme-style comments. - This also meant that Darwin syscall numbers are now printed in a non-ambiguous way -- previously Unix, machine-dependent and diagnostic syscalls were all printed the same way, even though their numbers overlap. Now each number is prefixed with "unix", "mdep", etc. And Mach trap numbers aren't printed as negative numbers now that they have a "mach" prefix. - Split each of pub_core_vkiscnums.h and pub_tool_vkiscnums.h into two parts, one suitable for inclusion in asm files, one suitable for inclusion in C files; in both cases the latter includes the former. This makes this module more like other modules that have asm-only components (eg. m_transtab); it also allows the hacky VG_IN_ASSEMBLY_SOURCE macros and tests to be removed. - Removed some of the VG_DARWIN_SYSNO_* macros that were no longer needed, and renamed some of the existing ones to make their meanings clearer. - Added comments on the encoding of Darwin syscall numbers so it's possible for mortals to understand without reading the kernel code.. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10218 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-05-28Merge the DARWIN branch onto the trunk.njn1-7/+40
I tried using 'svn merge' to do the merge but it did a terrible job and there were bazillions of conflicts. So instead I just took the diff between the branch and trunk at r10155, applied the diff to the trunk, 'svn add'ed the added files (no files needed to be 'svn remove'd) and committed. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-05-18Merged non-Darwin-specific parts of r9397,r9423,r9490, 9461, 9462 from thenjn1-2/+2
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
2009-03-30Handle accesses to new pseudo-register IP_AT_SYSCALL. Related to, butsewardj1-0/+2
not actually the cause or fix for, #188161. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9498 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-03-20Track renaming of guest_CIA_AT_SC to guest_IP_AT_SYSCALL (vex r1886).sewardj1-2/+2
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9468 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-03-15Fix all the non-VEX problems identified with the Clang Static Analyzer.njn1-17/+1
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9416 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-03-10Updated copyright years.njn1-2/+2
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-02-23- handle a couple more syscalls, sys_fallocate and sys_getresuid32sewardj1-0/+4
- make suppressions for ld.so be a bit more aggressive git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9243 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-02-17In the core, include malloc_usable_size() as one of the functions that mustnjn1-0/+9
be replaced if malloc() et al are replaced by a tool. This is because different tools implement the function in different ways. Add an appropriate malloc_usable_size() replacement to each of Memcheck, Helgrind, DRD, Ptrcheck, Massif. Update memcheck/tests/malloc_usable and add massif/tests/malloc_usable. Merged from the DARWIN branch. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9193 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-01-29* get_Seg_containing_addr: fix incorrect test guarding assertionsewardj1-1/+7
(which then failed) * support some more syscalls git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9083 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-01-26Minor refinements:sewardj1-0/+12
* h_main.c: handle a few more syscalls * exp-ptrcheck.supp: ignore errors in glibc's getenv -- is highly optimised * pc_common.c: fix small error in error message printing --> 3_4_BRANCH git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9061 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-01-24Handle a few more syscalls, as per #179618.sewardj1-0/+6
MERGE TO 3_4_BRANCH. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9056 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-01-15Introduce a new type, PtrdiffT. Replace lots of uses of OffT (all thosenjn1-6/+6
that are memory offsets) with PtrdiffT; OffT should only be used for file sizes and offsets. Change Off64T from a ULong to a Long, as it should be. Replace some uses of ULong in the address space manager with Off64T to match. Also add a comment explaining the meanings of the basic types like Addr, OffT, SizeT, etc. Also fix the prototype for VG_(pread) -- the last arg is an OffT, not an Int. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8959 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-01-07Handle __NR_socketpair in Ptrcheck.sewardj1-0/+3
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8917 a5019735-40e9-0310-863c-91ae7b9d1cf9
2009-01-05Add some more system calls to ptrcheck.tom1-0/+6
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8908 a5019735-40e9-0310-863c-91ae7b9d1cf9
2008-12-23Comment out unused code so as to get a warning free build.sewardj1-34/+34
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8868 a5019735-40e9-0310-863c-91ae7b9d1cf9
2008-10-30Handle a couple of syscalls needed to make Ptrcheck run bash.sewardj1-0/+2
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8716 a5019735-40e9-0310-863c-91ae7b9d1cf9
2008-10-21Handle ppc32/64 VRSAVE accesses.sewardj1-0/+6
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8688 a5019735-40e9-0310-863c-91ae7b9d1cf9
2008-10-20On ppc32/64 we don't have a reliable way to detect function entriessewardj1-3/+5
and exits at the moment. So disable stack array bounds checking for ppc32/64 platforms. Also (unnecessarily) disables global array bounds checking on those platforms. Add a flag --enable-sg-checks=no|yes [yes] so that stack and global checking can be optionally disabled on any platform. This is useful because stack and global checking is much more expensive than heap checking, and so it may be desirable to disable it. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8686 a5019735-40e9-0310-863c-91ae7b9d1cf9
2008-10-20Support a couple more syscalls needed for running KDE4 stuff on amd64-linux.sewardj1-6/+4
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8680 a5019735-40e9-0310-863c-91ae7b9d1cf9