8542 Commits

Author SHA1 Message Date
Julian Seward
25eb1856eb Track vex r2163 (en-mass renaming of vector narrowing and widening primops)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11819
2011-06-16 11:37:21 +00:00
Julian Seward
196c5d876c Fix safe_fd exhaustion in fork chain caused by non closing of shared_mem_fd
Patch that fixes the problem reported by Christian Borntraeger.
The problem was created by keeping the shared memory mapped file opened
without reason till the process does an exec.
In case of a chain of forked processes (without exec), the range of safe_fd
reserved for Valgrind own usage becomes exhausted.

* coregrind/m_gdbserver/remote-utils.c :
   do not VG_(safe_fd) shared_mem_fd (as it is now closed directly)
   close shared_mem_fd once file is mmap-ed and written.
* gdbserver_tests/nlfork_chain.stderr.exp,nlfork_chain.vgtest,
               fork_chain.c,nlfork_chain.stdout.exp:
     new files
* gdbserver_tests/Makefile.am:
  modified for new nlfork_chain test

(patch from #214909 c 103,
Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11818
2011-06-15 21:30:55 +00:00
Julian Seward
15107e7bdb Unbreak Altivec code following vex r2159 (renaming of
vector saturating narrowing primops)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11817
2011-06-15 19:07:26 +00:00
Julian Seward
0ff7a2f47e Valgrind-side fixes and tests for PACKUSDW, to track r2160.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11816
2011-06-15 16:07:15 +00:00
Julian Seward
01abe3ed83 Add debugging hack, if 0'd, to print a stack trace at each syscall.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11815
2011-06-15 15:11:50 +00:00
Julian Seward
e3cebf5b92 Track renaming of vector saturating narrowing primops in r2159.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11814
2011-06-15 15:11:07 +00:00
Julian Seward
eb6b2bffa0 Add rough list of bugs that have been fixed since 3.6.1 (74, + 3 n-i-bz,
probably some more I missed)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11813
2011-06-13 13:36:59 +00:00
Julian Seward
a12e858c35 Try to handle LL caches which are of size 50% above a power of 2 (eg,
6MB, 12MB) and have a non-power-of-2 number of sets.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11812
2011-06-13 13:14:00 +00:00
Josef Weidendorfer
170911abdf Add cpuid cache values from Intel SDM 5/11
For a Sandybridge desktop, previously this resulted in
...
--14842-- warning: Unknown Intel cache config value (0x76), ignoring
...
with Cachegrind/Callgrind

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11811
2011-06-10 20:29:27 +00:00
Tom Hughes
c5931781bc Teach cachegrind/callgrind how to parse the cache description
in the CPUID data on recent Intel processors.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11810
2011-06-10 15:04:22 +00:00
Tom Hughes
ba58058f83 Use the precomputed sets_min_1 value consistently when masking
off bits from an address to find which cache set it is in.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11809
2011-06-09 12:26:42 +00:00
Tom Hughes
d74a1f2d39 Fix perf_event open on s390.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11808
2011-06-08 20:55:29 +00:00
Tom Hughes
1017470b36 Fix some warnings I introduced in r11804.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11807
2011-06-08 09:57:54 +00:00
Tom Hughes
42bc84e869 Add support for prlimit64 on x86 and amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11806
2011-06-08 09:55:54 +00:00
Tom Hughes
8bc495c8d7 Update system call lists to match current kernel source.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11805
2011-06-08 09:12:07 +00:00
Tom Hughes
912fe51553 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
2011-06-08 09:10:40 +00:00
Julian Seward
532b65e337 Add a simple but (to me, at least) useful thing, if (0)'d by default,
to print a line of text approximately every 20 million SBs.  This is
useful for monitoring the progress of long running programs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11803
2011-06-07 22:54:32 +00:00
Tom Hughes
af8ec0a591 Define _GNU_SOURCE for access to CLONE_XXX flags with gibc 2.14 headers.
Based on patch from Dmitry Djachenko <dimhen@gmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11802
2011-06-07 22:53:21 +00:00
Julian Seward
d9ce3d3cc8 Fix the computation of debuginfo bias values, in the case where the
debuginfo object has been not been prelinked but the main object has.
Fixes a segfault observed running any C++ application (eg,
drd/tests/annotate_smart_pointer) on Fedora 14 (32-bit), when the
debuginfo RPM for libstdc++ is installed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11801
2011-06-07 22:44:09 +00:00
Tom Hughes
db1a5172ce Add glibc 2.14 support. Patch from Dmitry Djachenko <dimhen@gmail.com>.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11800
2011-06-07 21:52:26 +00:00
Julian Seward
0d56e0ef2b find_nsegment_idx: double size of the lookup cache in an attempt
to mitigate the probable increase in miss rates resulting from
r11798 (which causes increased numbers of such queries).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11799
2011-06-07 21:42:07 +00:00
Julian Seward
da49be7c14 Add a fourth --smc-check= variant, --smc-check=all-non-file. This
adds self-modifying-code checks to all guest code taken from mappings
which are not file backed, but omits checks in code from file backed
mappings.  This has the effect of giving complete smc-coverage of JIT
generated code -- since that is invariably generated into anonymous
mapped areas -- without burdening non-JIT generated code with such
checks.  Running Firefox 6, --smc-check=all-non-file reduces by a
factor of between 3 and 10 the number of translations requiring a self
check, compared to --smc-check=all.  These changes depend on the vex
interface changes in r2158.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11798
2011-06-07 21:39:28 +00:00
Bart Van Assche
953f93f969 Mention the "3.x" Linux kernel version explicitly in the kernel version configure message
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11797
2011-06-05 10:01:48 +00:00
Bart Van Assche
e0518c5f9c Make Valgrind build on Linux kernel 3.0 and beyond. Closes #274926. An official
statement that the Linux kernel 3.0 API and ABI is compatible with Linux kernel
2.6 can be found here: http://lkml.org/lkml/2011/5/29/204.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11796
2011-06-05 08:51:47 +00:00
Julian Seward
c1841e384b Followup fix to r11794 (generalise processing of PT_LOAD entries):
change some incorrect "rx->bias" (which due to lameness of C's type
system was valid) to "inrx->bias".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11795
2011-06-03 23:27:39 +00:00
Julian Seward
35756a6d62 ML_(read_elf_debug_info): when processing PT_LOAD entries from the
program header, don't make the following assumptions

- that there is only one r-x and one rw- entry

- that the r-x entry appears before the rw- entry

This makes it possible to handle ELF objects processed by Mike
Hommey's elfhack program.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11794
2011-06-02 10:06:25 +00:00
Julian Seward
68f57d0181 On arm-linux, give gcc "-mcpu=cortex-a8" so as to persuade it to
accept the armv6t2 (I think) insns (movt, movw) in
dispatch-arm-linux.S.  Some older gccs apparently think they are
compiling for armv6 by default and reject them (gcc 4.4.1 on Ubuntu
9.10, for one.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11793
2011-05-31 07:17:54 +00:00
Julian Seward
d2a4c327d0 Add file missing from r11791 due to insufficient coffee.
#214909 c 101.  (Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11792
2011-05-31 07:14:42 +00:00
Julian Seward
62e0d0b316 More gdbserver test fixes, from #214909 c 101:
fix mcsig(no)pass on arm Ubuntu10, arm thumb internal doc, improve
simulate_control_c

* new file docs/internals/arm_thumb_notes_gdbserver.txt
  documentation about the subtilities of the thumb bit handling in gdbsrv.
* made the SIGFPE backtrace filtering less dependent on gdb/os/libc/...
* improved simulate_control_c : runs faster/less dependent on timeout value


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11791
2011-05-31 07:09:06 +00:00
Julian Seward
f06ee2d1e1 Handle ELF objects with two .eh_frame sections. This fixes a problem
handling libxul.so when linked by gold on x86_64.  (n-i-bz)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11790
2011-05-30 10:18:59 +00:00
Julian Seward
cba2893074 Un-break all non x86/amd64 targets following r11786, duh.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11789
2011-05-30 06:29:39 +00:00
Julian Seward
a6ffae5ac9 Un-break Darwin build following r2155/r11786 -- use dual-entry
dispatchers for x86 and amd64, and add corresponding improvements.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11788
2011-05-29 12:40:27 +00:00
Julian Seward
9b93938907 Remove a load from the s390x dispatcher loop, as per r11781.
(Florian Krohm <britzel@acm.org>).  #274378.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11787
2011-05-29 09:38:58 +00:00
Julian Seward
ffc3968ff2 Give the amd64-linux and x86-linux dispatchers two entry points, not one,
so as to avoid a GSP-changed check in the common case.  See vex r2155.
(amd64-darwin and x86-darwin are now temporarily unbuildable.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11786
2011-05-29 09:34:30 +00:00
Julian Seward
3a131dc867 dispatch-x86-linux.S:
use test-based detection of GSP pointer changes.
   Saves one load per SB.

dispatch-amd64-linux.S:
   ditto

dispatch-amd64-linux.S:
   use movabsq to get &VG_(tt_fast) into a register,
   instead of an rsp-relative load from a constant pool.
   Saves a second load per SB.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11785
2011-05-28 17:07:53 +00:00
Julian Seward
84fa16228a Undo bogus comment changes committed in r11783.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11784
2011-05-28 16:58:45 +00:00
Julian Seward
55daaf1836 Test for guest-state-pointer changes by checking its lowest bit.
Removes one memory reference from the dispatcher loop.  As per r11781
for arm-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11783
2011-05-28 15:58:13 +00:00
Julian Seward
176e7d6218 Fix ppc64-linux build following introduction of IRStmt_Mark::delta
in vex r2153.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11782
2011-05-28 15:34:17 +00:00
Julian Seward
f8e9ab3607 Remove another memory reference from the arm dispatcher loop, by using
the fact that all {VG,VEX}_TRC_VALUES have their lowest bit set.  All
other targets can benefit from this trick too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11781
2011-05-28 11:05:44 +00:00
Julian Seward
3bcd288100 Get rid of a bunch of loads in the arm dispatcher inner loops, and
make some attempt to schedule for Cortex-A8.  Improves overall IPC
for none running perf/bz2.c "-O" from 0.879 to 0.925.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11780
2011-05-28 10:16:58 +00:00
Julian Seward
dd51367883 Further fixes for GDB server on Thumb code:
* Disabled several tests on ARM when gdb version < 7.1
  gdb 7.0 has problems with next/step/... in ARM thumb code.

* Documented in manual-core.xml that ARM thumb code implies
  a gdb version >= 7.1

* m_gdbserver.h/.c : take into account the thumb bit at several places

* use new IRStmt_IMark::delta field to distinguish ARM vs Thumb
  instructions as committed in vex r2153

Patch from bug 214909 comment 99 (valgrind part).
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11779
2011-05-27 13:23:44 +00:00
Bart Van Assche
4c5fcff44c DRD: eliminate two redundant global variable definitions. See also #273536.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11778
2011-05-18 16:09:54 +00:00
Bart Van Assche
4bdf51c14b Define pass_signals[] only once such that Valgrind can be built with -fno-common. This is a modified version of the second patch attached to #273536.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11777
2011-05-18 16:08:28 +00:00
Bart Van Assche
da5eddc400 Follow-up for r11770: added missing 'void' keyword.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11776
2011-05-18 16:04:46 +00:00
Bart Van Assche
97a0c3e5d1 Reverted r11774 because it didn't make sense.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11775
2011-05-18 15:51:51 +00:00
Bart Van Assche
1de28c3b2a Added missing extern keywords. Patch provided by Daniel Richard G. - closes #275536.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11774
2011-05-18 10:12:36 +00:00
Bart Van Assche
4ba7af4366 Updated Subversion ignore list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11773
2011-05-18 06:04:00 +00:00
Julian Seward
27d230b660 gdbserver: (#214909 c 91)
add cleanup: line to none/tests/require-text-symbol-2.vgtest
In case Valgrind terminates abnormally, then no cleanup is done.
In this case, the abnormal termination is in the test which checks
--require-text-symbol=:*libc.so*:doesntexist
This patch adds a cleanup: line to the test.

(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11772
2011-05-17 21:35:41 +00:00
Julian Seward
77ea74b82e gdbserver: (#214909 c 82)
ensure proper cleanup of gdbsrv FIFOs/shmem files with untraced fork/exec

* syswrap-{generic|darwin|aix5}.c : in PRE(sys_execve) : terminate gdbserver
* pub_core_gdbserver.h and m_gdbserver.c : add VG_(gdbserver_prerun_action),
  factorising the actions to do by gdbserver at "startup" (i.e. a traced
  fork or a traced exec).
* scheduler.c : implement startup action using VG_(gdbserver_prerun_action)

(Philippe Waroquiers, philippe.waroquiers@skynet.be)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11771
2011-05-17 18:14:53 +00:00
Julian Seward
739bc05601 gdbserver: misc fixes (#214909 c 77)
Fix some tests on ppc-debian6,s390x + handled Nick Nethercote, Josef
Weidendorfer comments

* improved testing & related doc
  - added option --vex-iropt-precise-memory-exns=yes to mcsig(no)pass.vgtest
    + updated manual-core.xml
  - cleanup some comments in *.vgtest 
  - modified filter_gdb and filter_memcheck_monitor to
    handle specific ppc/debian6.0 mcsig(no)pass output
    handle specific s390x 'missing debug info'
  - added more information in README_DEVELOPPERS on how to
    investigate failing gdbserver tests.

* handled Nick Nethercote comment:
  Replaced kludgy ms.snapshot detailed
              by  ms.detailed_snaphot
  Updated documentation and test.

* handled Josef Weindendorfer comments:
   - do not report an error if ptrace_scope file can't be read.
     Instead, a debug trace is done if -d (debug) option given
   - added an option -l to give the list of active Valgrind
     gdbserver. Useful a.o. to support callgrind_control.
     Updated documentation
   - added ref. to  vgdb help in the vgdb --help message

(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11770
2011-05-17 17:15:07 +00:00