]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
14 years agoKeep the stack properly 16-aligned when delivering signals on
Julian Seward [Tue, 27 Mar 2012 09:24:54 +0000 (09:24 +0000)] 
Keep the stack properly 16-aligned when delivering signals on
amd64-darwin.  Fixes the failure shown in
https://bugs.kde.org/show_bug.cgi?id=254646#c13

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12461

14 years agoFill in missing signal handling macros for amd64-darwin.
Julian Seward [Tue, 27 Mar 2012 08:44:17 +0000 (08:44 +0000)] 
Fill in missing signal handling macros for amd64-darwin.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12460

14 years agoConsolidate guest state offset computation. There is only
Florian Krohm [Tue, 27 Mar 2012 03:09:49 +0000 (03:09 +0000)] 
Consolidate guest state offset computation. There is only
one way. No need to precompute them and have them named in
three different ways.... Get rid of libvex_guest_offsets.h
dependency.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2269

14 years agoDarwin: Fix a copy/paste error that was introduced in r12458
Bart Van Assche [Mon, 26 Mar 2012 18:13:29 +0000 (18:13 +0000)] 
Darwin: Fix a copy/paste error that was introduced in r12458

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12459

14 years agogcc seems to have taken to generating "orl $0xFFFFFFFF, %reg32" to get
Julian Seward [Mon, 26 Mar 2012 09:44:39 +0000 (09:44 +0000)] 
gcc seems to have taken to generating "orl $0xFFFFFFFF, %reg32" to get
-1 (32-bit) into a register.  [Is this wise?  Does the processor know
that this generates no dependency on the previous value of the
register?]  Teach the constant folder about such cases, therefore.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2268

14 years agoCheck whether the big lock is held before invoking pre_thread_ll_create.
Bart Van Assche [Sun, 25 Mar 2012 17:51:59 +0000 (17:51 +0000)] 
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

14 years agoRemove prototype for non-existing function.
Florian Krohm [Sun, 25 Mar 2012 16:17:18 +0000 (16:17 +0000)] 
Remove prototype for non-existing function.
Fix vpanic call.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2267

14 years agoRemove strange e which appeared in r12456, replace by a real e.
Philippe Waroquiers [Sun, 25 Mar 2012 14:55:17 +0000 (14:55 +0000)] 
Remove strange e which appeared in r12456, replace by a real e.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12457

14 years agoHave check_makẹfile_consistency run at the end of make regtest
Philippe Waroquiers [Sun, 25 Mar 2012 10:54:59 +0000 (10:54 +0000)] 
Have check_makẹfile_consistency run at the end of make regtest
This ensures that a missing file in the Makefile is detected,
without blocking the tests.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12456

14 years agoadd test-plo-no.stderr.exp-s390x-mvc in EXTRA_DIST.
Philippe Waroquiers [Wed, 21 Mar 2012 20:32:00 +0000 (20:32 +0000)] 
add test-plo-no.stderr.exp-s390x-mvc in EXTRA_DIST.

Note: such missing files in EXTRA_DIST are found
by check_makefile_consistency.
However, to avoid blocking the tests, the return code
of check_makefile_consistency is ignored, but the errors
it detects are pages before the end of the make regtest output.

=> it might be a good idea to move the check_makefile_consistency
as the last step of regtest: target, and not ignore its return code.
This means:
   trials tests will not block make regtest
   such errors will be noticed.

For the moment, just fixed the missing file in EXTRA_DIST

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12455

14 years agoSupport sys_fallocate on arm-linux.
Julian Seward [Wed, 21 Mar 2012 19:37:41 +0000 (19:37 +0000)] 
Support sys_fallocate on arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12454

14 years agoFor (T3) "ADD (SP plus register)", allow "add rX, SP, rY, lsl
Julian Seward [Wed, 21 Mar 2012 19:36:37 +0000 (19:36 +0000)] 
For (T3) "ADD (SP plus register)", allow "add rX, SP, rY, lsl
#{1,2,3}" as well as the non-shifted version.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2266

14 years agofix 295799 Missing \n with get_vbits in gdbserver when line is % 80 and there are...
Philippe Waroquiers [Tue, 20 Mar 2012 19:04:39 +0000 (19:04 +0000)] 
fix 295799  Missing \n with get_vbits in gdbserver when line is % 80 and there are some unaddressable bytes

patch from Marc Bessières

Thanks

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12453

14 years agoModify test so that scheduling events are generated.
Philippe Waroquiers [Mon, 19 Mar 2012 20:19:23 +0000 (20:19 +0000)] 
Modify test so that scheduling events are generated.
Even without fair scheduling, this ensures the progress
of each thread.
This avoids the test looping forever in an outer/inner
setup.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12452

14 years agoUpdate s390 opcode list.
Florian Krohm [Mon, 19 Mar 2012 13:22:21 +0000 (13:22 +0000)] 
Update s390 opcode list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12451

14 years agoAdd script that assists with updating s390-opcodes.csv.
Florian Krohm [Sun, 18 Mar 2012 01:52:07 +0000 (01:52 +0000)] 
Add script that assists with updating s390-opcodes.csv.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12450

14 years agoAdd spreadsheet that lists all s390 opcodes in the following format:
Florian Krohm [Sun, 18 Mar 2012 01:51:12 +0000 (01:51 +0000)] 
Add spreadsheet that lists all s390 opcodes in the following format:
1. column:  mnemonic
2. column:  description
3. column:  implementation status
4. column:  comments, if any

Prepared by Divya Vyas (divyvyas@linux.vnet.ibm.com).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12449

14 years agoRename function. We want to be able to extract implemented
Florian Krohm [Sat, 17 Mar 2012 23:38:39 +0000 (23:38 +0000)] 
Rename function. We want to be able to extract implemented
opcodes by matching  /^s390_irgen_[A-Z]+/

git-svn-id: svn://svn.valgrind.org/vex/trunk@2265

14 years agoAdd expected output for s390x with compilers using mvc.
Florian Krohm [Sat, 17 Mar 2012 17:37:50 +0000 (17:37 +0000)] 
Add expected output for s390x with compilers using mvc.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12448

14 years agoAdd expected results for 32-bit little endian platform.
Florian Krohm [Sat, 17 Mar 2012 17:27:17 +0000 (17:27 +0000)] 
Add expected results for 32-bit little endian platform.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12447

14 years agoMake a more precise reference to the g++ version.
Philippe Waroquiers [Fri, 16 Mar 2012 15:03:08 +0000 (15:03 +0000)] 
Make a more precise reference to the g++ version.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12446

14 years ago(for x86 and amd64): Change the type of the shadow regs for floating point registers
Philippe Waroquiers [Wed, 14 Mar 2012 21:27:35 +0000 (21:27 +0000)] 
(for x86 and amd64): Change the type of the shadow regs for floating point registers

Similar to r12444 (see Log below), but this is doing it for x86 and amd64.
The xmm registers are using uint32 or uint64 for their float
union components. For the i387 80 bits float registers, as there is
no uint80, a struct uint16 + uint64 is defined.

  Log:
    Change the type of the shadow regs for floating point registers
    to be uint64. Previously the value in such a shadow reg would
    be interpreted by gdb as a floating point value which would
    produce non-sensible output for e.g   p/x $f1s1.
    This patch covers the power and arm architectures.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12445

14 years agoChange the type of the shadow regs for floating point registers
Florian Krohm [Wed, 14 Mar 2012 01:15:59 +0000 (01:15 +0000)] 
Change the type of the shadow regs for floating point registers
to be uint64. Previously the value in such a shadow reg would
be interpreted by gdb as a floating point value which would
produce non-sensible output for e.g   p/x $f1s1.
This patch covers the power and arm architectures.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12444

14 years agoAdd s390x register decsription to vgdb. This enables examination
Florian Krohm [Tue, 13 Mar 2012 02:13:50 +0000 (02:13 +0000)] 
Add s390x register decsription to vgdb. This enables examination
of V bits in vgdb.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12443

14 years agoFix leak in debuginfo.c
Philippe Waroquiers [Mon, 12 Mar 2012 22:06:57 +0000 (22:06 +0000)] 
Fix leak in debuginfo.c
di->soname was not freed, so was leaked when debug info is removed.
free(soname) added in free_Debuginfo, after having verified
and then ensured that all soname are allocated in dinfo.

regtested on deb6/amd64

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12442

14 years agoAllows to run regression tests in an outer/inner setup.
Philippe Waroquiers [Sun, 11 Mar 2012 22:24:03 +0000 (22:24 +0000)] 
Allows to run regression tests in an outer/inner setup.

A '3 lines how to':
   perl tests/vg_regtest --outer-valgrind=../trunk_untouched/install/bin/valgrind --all
           (the outer results for a test xxx is in xxx.outer.log)
   To run with another tool (e.g. drd), add the argument --outer-tool=drd

Still to do/things to improve:

* Most (inner) tests are successful when running under an outer
  memcheck. Need to analyse the reasons of remaining failures.

* The memcheck annotations in m_mallocfree.c can be improved:
  - A superblock is marked 'undefined', it should rather be marked
    'no access'.
  - When a free block is splitted, the remaining free block is
    not made 'no access'. Instead, it is made 'undefined'.
      => this decreases the chance to find bugs.
      => this is not very efficient (e.g. the rest of a superblock
         is often marked undefined repetitively).
    Similarly, the free block created by VG_(arena_memalign)
    is marked 'undefined'. 'No access' would be preferrable.
  - mkInuseBlock marks the new block as undefined. This is probably
    not needed, as VALGRIND_MALLOCLIKE_BLOCK will do it already.
  - VG_(arena_malloc) should give the requested size to
    VALGRIND_MALLOCLIKE_BLOCK, not the malloc usable size,
    as this decreases the chance to find buffer overrun bugs.
    But giving the requested size is tricky (see comments in
    the code).

* need to do memcheck annotations in m_poolalloc.c
   so as to allow leak checking for pool allocated elements.

* vg_regtest.in
  - should analyse the results of the outer and should
    produce a separate result for the tests for which
    the outer detects an error or a memory leak or ...

Changes done:
   README_DEVELOPERS: document the new outer/inner features.
   manual-core.xml: document the new sim-hint no-inner-prefix
   tests/outer_inner.supp: new file, containing the suppressions for inner.
   vg_regtest.in: implement new args --outer-valgrind, --outer-tool, --outer-args.
   m_mallocfree.c: annotations for memcheck.
   m_libcprint.c: handle the new sim-hint no-inner-prefix
   m_main.c: do an (early) parse of --sim-hints

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12441

14 years agoModify none/tests/execve.c so to avoid infinite loop with --trace-children=yes
Philippe Waroquiers [Sun, 11 Mar 2012 20:47:41 +0000 (20:47 +0000)] 
Modify none/tests/execve.c so to avoid infinite loop with --trace-children=yes

With --trace-children=yes, none/test/execve exec ve forever.

This avoids an infinite loop when running outer on inner regression
tests (for which --trace-children=yes is mandatory for the outer).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12440

14 years agoEnsure VALGRIND_MALLOCLIKE_BLOCK protects the red zones.
Philippe Waroquiers [Sun, 11 Mar 2012 17:59:00 +0000 (17:59 +0000)] 
Ensure VALGRIND_MALLOCLIKE_BLOCK protects the red zones.

* Redzones for custom alloc were not protected by VALGRIND_MALLOCLIKE_BLOCK.
  mc_main.c client request handling completed with protection
  of the redzones.
* custom_alloc.c test modified to test this case.
* mc_errors.c modified so as to first search for a malloc-ed block
  bracketting the error : for a custom allocator, a recently freed
  block can have just been re-allocated.
  In such a case, describing the address (e.g. in case of error)
  points to the block freed rather than to the block just allocated.
  If there is *also* a recently freed block bracketting the address,
  the block description is changed to indicate that.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12439

14 years agoFinally understood why an outer on inner on a 32 bit application
Philippe Waroquiers [Thu, 8 Mar 2012 23:42:05 +0000 (23:42 +0000)] 
Finally understood why an outer on inner on a 32 bit application
is failing on a 64 bit host.

The bug might or might not be related to some
errors "failed in UME with error 22"
(such as bug https://bugs.kde.org/show_bug.cgi?id=138424).

The bug is: when aspacem_maxAddr is very close to the upper limit,
and aspacem_minAddr is somewhat not close to 0, then
the computation of
   aspacem_vStart = VG_PGROUNDUP((aspacem_minAddr + aspacem_maxAddr + 1) / 2);
can overflow.
The vStart value will then silently wrap around.
(please, give me my Ada language back :).

When overflowing, vStart will then be below the client cStart.
At least when running outer on inner on a 32 bit application on
a 64 bit system, this was causing strange problems.

I suppose that on a 64 bit system, a 32 bit application can use more
of the 4 Gb, and then the max address is higher and can more easily
overflow than on a 32 bit system.

Tested on f12/x86, debian6/amd64 (bi-arch).
+ run a few outer on inner x86 regression tests : these were all failing
and are now succesfully running.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12438

14 years agoSuppress race reports on ticket lock state variables
Bart Van Assche [Thu, 8 Mar 2012 19:17:56 +0000 (19:17 +0000)] 
Suppress race reports on ticket lock state variables

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12437

14 years agoSuppress race reports on VG_(threads)[tid].os_state.exitcode
Bart Van Assche [Thu, 8 Mar 2012 19:07:08 +0000 (19:07 +0000)] 
Suppress race reports on VG_(threads)[tid].os_state.exitcode

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12436

14 years agoUse ANNOTATE_BENIGN_RACE_SIZED() to suppress race reports on owner_lwpid
Bart Van Assche [Thu, 8 Mar 2012 19:02:39 +0000 (19:02 +0000)] 
Use ANNOTATE_BENIGN_RACE_SIZED() to suppress race reports on owner_lwpid

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12435

14 years agohelgrind: Implement ANNOTATE_BENIGN_RACE_SIZED()
Bart Van Assche [Thu, 8 Mar 2012 18:58:41 +0000 (18:58 +0000)] 
helgrind: Implement ANNOTATE_BENIGN_RACE_SIZED()

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12434

14 years agoUpdate Subversion ignore list
Bart Van Assche [Thu, 8 Mar 2012 17:11:03 +0000 (17:11 +0000)] 
Update Subversion ignore list

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12433

14 years agoWhen analyzing Valgrind with drd, suppress uninteresting race reports on VG_(threads...
Bart Van Assche [Thu, 8 Mar 2012 14:59:25 +0000 (14:59 +0000)] 
When analyzing Valgrind with drd, suppress uninteresting race reports on VG_(threads)[].status

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12432

14 years agoUpdate Subversion ignore list
Bart Van Assche [Thu, 8 Mar 2012 14:57:55 +0000 (14:57 +0000)] 
Update Subversion ignore list

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12431

14 years agoChange the behaviour of --partial-loads-ok=yes to avoid false
Julian Seward [Thu, 8 Mar 2012 14:51:01 +0000 (14:51 +0000)] 
Change the behaviour of --partial-loads-ok=yes to avoid false
negatives, by marking the V bits that come from out of range parts of
the access as undefined; and hence any use of them leads to an value
error.  Prior to this they were marked as defined and could be used
without error.

Behaviour of --partial-loads-ok=no (the default case) is unchanged.

Also add some testing thereof.

Fixes #294523.  Modified version of a patch and testcase by Patrick
J. LoPresti (lopresti@gmail.com).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12430

14 years agoMake it possible to #include <valgrind/drd.h> after <valgrind/helgrind.h>
Bart Van Assche [Thu, 8 Mar 2012 14:44:57 +0000 (14:44 +0000)] 
Make it possible to #include <valgrind/drd.h> after <valgrind/helgrind.h>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12429

14 years agoSuppress uninteresting race reports on sema->owner_lwpid
Bart Van Assche [Thu, 8 Mar 2012 10:14:12 +0000 (10:14 +0000)] 
Suppress uninteresting race reports on sema->owner_lwpid

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12428

14 years agonone/tests: Update Subversion ignore list
Bart Van Assche [Thu, 8 Mar 2012 10:11:22 +0000 (10:11 +0000)] 
none/tests: Update Subversion ignore list

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12427

14 years agoTurn no-op versions of INNER_REQUEST into statements, not values,
Julian Seward [Wed, 7 Mar 2012 17:11:44 +0000 (17:11 +0000)] 
Turn no-op versions of INNER_REQUEST into statements, not values,
since gcc complains about "statement with no effect" or some such for
the simple "0" version.  Also, make the formal parameter names a bit
more unique.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12426

14 years agoAh, the joys of applying patches by hand. Redo r12424 but get the
Julian Seward [Wed, 7 Mar 2012 16:38:12 +0000 (16:38 +0000)] 
Ah, the joys of applying patches by hand.  Redo r12424 but get the
patch in the right place this time.  re #295428.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12425

14 years agox86-darwin: _start: keep the stack 16-aligned. Fixes #295428.
Julian Seward [Wed, 7 Mar 2012 15:56:29 +0000 (15:56 +0000)] 
x86-darwin: _start: keep the stack 16-aligned.  Fixes #295428.
(Jack Howarth, howarth@nitro.med.uc.edu)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12424

14 years agoReinstate intercepts for plain "memcpy" and "memmove" on OSX <= 10.6
Julian Seward [Wed, 7 Mar 2012 15:26:50 +0000 (15:26 +0000)] 
Reinstate intercepts for plain "memcpy" and "memmove" on OSX <= 10.6
(not on Lion).  Fixes #285662.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12423

14 years agoMacOS only: VG_(get_changed_segments) callback
Julian Seward [Wed, 7 Mar 2012 13:28:05 +0000 (13:28 +0000)] 
MacOS only: VG_(get_changed_segments) callback
remove_mapping_callback: if the kernel tells us of a gap that
partially, but does not exactly, overlap a V segment, only record
directives to remove that part of the segment that actually falls
within the gap.  Removing the entire V segment is incorrect and can
cause Memcheck to believe that memory not within the hole is
inaccessible, leading to floods of invalid errors.  Fixes
https://bugzilla.mozilla.org/show_bug.cgi?id=715750

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12422

14 years agoAdd support for the HCIINQUIRY ioctl.
Tom Hughes [Wed, 7 Mar 2012 11:22:42 +0000 (11:22 +0000)] 
Add support for the HCIINQUIRY ioctl.
Patch from Andrew Brampton to fix BZ#283961.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12421

14 years agoAdd support for the I2C_RDWR ioctl.
Tom Hughes [Wed, 7 Mar 2012 10:21:33 +0000 (10:21 +0000)] 
Add support for the I2C_RDWR ioctl.
Patch from arnaud mouiche to fix BZ#286261.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12420

14 years agoFix leak of range_list (see below an example) in readdwarf3.c.
Philippe Waroquiers [Tue, 6 Mar 2012 20:35:20 +0000 (20:35 +0000)] 
Fix leak of range_list (see below an example) in readdwarf3.c.
(found by running regression tests with an outer memcheck).

(validated by running all regression tests "natively" on x86 and amd64,
and re-running regressions tests with outer memcheck).

==7500== 160 bytes in 2 blocks are definitely lost in loss record 75 of 246
==7500==    at 0x2803CEF7: vgPlain_arena_malloc (m_mallocfree.c:1599)
==7500==    by 0x280AAFA5: vgModuleLocal_dinfo_zalloc (misc.c:48)
==7500==    by 0x2804E2A4: vgPlain_newXA (m_xarray.c:68)
==7500==    by 0x280B3CD6: unitary_range_list (readdwarf3.c:703)
==7500==    by 0x280B66CF: parse_var_DIE (readdwarf3.c:1631)
==7500==    by 0x280BA0A6: read_DIE (readdwarf3.c:3248)
==7500==    by 0x280BA170: read_DIE (readdwarf3.c:3269)
==7500==    by 0x280BABC4: T.364 (readdwarf3.c:3611)
==7500==    by 0x280BC634: vgModuleLocal_new_dwarf3_reader (readdwarf3.c:4035)
==7500==    by 0x280609F4: vgModuleLocal_read_elf_debug_info (readelf.c:2529)
==7500==    by 0x2805BD31: vgPlain_di_notify_mmap (debuginfo.c:610)
==7500==    by 0x280362E3: valgrind_main (m_main.c:1944)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12419

14 years agoUpdate bug reporting URL.
Florian Krohm [Tue, 6 Mar 2012 15:54:28 +0000 (15:54 +0000)] 
Update bug reporting URL.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12418

14 years agoFix a testcase. Constraint was incorrect allowing r0 to be used
Florian Krohm [Mon, 5 Mar 2012 23:12:47 +0000 (23:12 +0000)] 
Fix a testcase. Constraint was incorrect allowing r0 to be used
for the EX insn. Patch by Christian Borntraeger (borntraeger@de.ibm.com).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12417

14 years ago* Improve documentation of --vgdb=full
Philippe Waroquiers [Mon, 5 Mar 2012 22:09:20 +0000 (22:09 +0000)] 
* Improve documentation of --vgdb=full
* make a reference to --vex-iropt-precise-memory-exns=yes
  to obtain up to date registers values.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12416

14 years agoAvoid possibly unaligned memory access.
Florian Krohm [Sat, 3 Mar 2012 18:46:05 +0000 (18:46 +0000)] 
Avoid possibly unaligned memory access.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12415

14 years ago* README_DEVELOPERS : complete/enhance the section about outer/inner
Philippe Waroquiers [Sat, 3 Mar 2012 12:01:48 +0000 (12:01 +0000)] 
* README_DEVELOPERS : complete/enhance the section about outer/inner
* manual-core.xml : fix a typo
* include/pub_tool_inner.h : new file, defining macros for inner annotation
  include/Makefile.am : reference this new file.
* syswrap-linux.c : when ENABLE_INNER, register the stacks for the outer.
   (otherwise, nothing works properly).
* m_redir.c : avoid inner interpreting the outer vgpreload instructions.
* sema.c : annotate the semaphore with RWLOCK annotations for helgrind
* ticket-lock-linux.c : similar.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12414

14 years agonone/tests/mq.c: Fix a copy-paste bug
Bart Van Assche [Fri, 2 Mar 2012 09:57:14 +0000 (09:57 +0000)] 
none/tests/mq.c: Fix a copy-paste bug

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12413

14 years agoIn case VALGRIND_MALLOCLIKE_BLOCK is wrongly used, output
Philippe Waroquiers [Thu, 1 Mar 2012 22:00:36 +0000 (22:00 +0000)] 
In case VALGRIND_MALLOCLIKE_BLOCK is wrongly used, output
the execontext where the overlapping blocks have been reported
before crashing.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12412

14 years agoHandle prlimit64 the same way we do getrlimit and setrlimit, with
Tom Hughes [Thu, 1 Mar 2012 13:42:18 +0000 (13:42 +0000)] 
Handle prlimit64 the same way we do getrlimit and setrlimit, with
some requests trapped and handled by valgrind.

Patch from Matthias Schwarzott via BZ#294047.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12411

14 years agoAfter a fork, gdbserver_init can be called again.
Philippe Waroquiers [Tue, 28 Feb 2012 22:37:44 +0000 (22:37 +0000)] 
After a fork, gdbserver_init can be called again.
Buffers should not be re-allocated in such a case.
(memory leak detected by running memcheck on memcheck)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12410

14 years agoFix leak found by running memcheck/tests/varinfo[1-6].vgtest
Philippe Waroquiers [Tue, 28 Feb 2012 20:10:05 +0000 (20:10 +0000)] 
Fix leak found by running memcheck/tests/varinfo[1-6].vgtest

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12409

14 years agoIncrease the size of buffers used for showing names when
Julian Seward [Tue, 28 Feb 2012 18:02:41 +0000 (18:02 +0000)] 
Increase the size of buffers used for showing names when
--trace-flags= is set.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12408

14 years agoFix one more leak detected by running memcheck in memcheck
Philippe Waroquiers [Mon, 27 Feb 2012 21:52:45 +0000 (21:52 +0000)] 
Fix one more leak detected by running memcheck in memcheck
(started to run regression tests in an outer)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12407

14 years agoThis is a followup to r2263. Use offsetof.
Florian Krohm [Mon, 27 Feb 2012 15:38:34 +0000 (15:38 +0000)] 
This is a followup to r2263. Use offsetof.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2264

14 years agoAndroid only: make the debuginfo mapping hack more flexible.
Julian Seward [Mon, 27 Feb 2012 11:02:20 +0000 (11:02 +0000)] 
Android only: make the debuginfo mapping hack more flexible.
Previously it looked for the debuginfo object for "/system/X" in
"/sdcard/symbols/system/X".  This commit removes the requirement for
"system" as the first path component, so the mapping is now "/X" (viz,
any absolute path) to "/sdcard/symbols/X".

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12406

14 years agoFix some memory leaks found by running memcheck on annotated memcheck.
Philippe Waroquiers [Sun, 26 Feb 2012 21:26:00 +0000 (21:26 +0000)] 
Fix some memory leaks found by running memcheck on annotated memcheck.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12405

14 years agoTighten up initial guest/shodow state on s390x.
Florian Krohm [Sun, 26 Feb 2012 17:51:28 +0000 (17:51 +0000)] 
Tighten up initial guest/shodow state on s390x.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12404

14 years agoAnnounce.
Florian Krohm [Sun, 26 Feb 2012 17:01:22 +0000 (17:01 +0000)] 
Announce.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12403

14 years agoDo not assume that a pointer is the worst-aligned data type.
Florian Krohm [Sun, 26 Feb 2012 17:00:03 +0000 (17:00 +0000)] 
Do not assume that a pointer is the worst-aligned data type.
Fixes #283671

git-svn-id: svn://svn.valgrind.org/vex/trunk@2263

14 years agoIgnore redundant REX prefix on 4 byte form of PMOVMSKB. BZ#294736.
Tom Hughes [Fri, 24 Feb 2012 12:16:11 +0000 (12:16 +0000)] 
Ignore redundant REX prefix on 4 byte form of PMOVMSKB. BZ#294736.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2262

14 years agoFix buffer overflow bug when building the target file.
Philippe Waroquiers [Fri, 24 Feb 2012 11:25:58 +0000 (11:25 +0000)] 
Fix buffer overflow bug when building the target file.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12402

14 years agoRevision 12396 (replacing pkglib_DATA by vglib_DATA) missed
Philippe Waroquiers [Fri, 24 Feb 2012 08:33:56 +0000 (08:33 +0000)] 
Revision 12396 (replacing pkglib_DATA by vglib_DATA) missed
once place. This was breaking vg-in-place on platforms
needing gdbserver target description files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12401

14 years agoFedora 17 is merging /lib into /usr/lib so any suppression which
Tom Hughes [Thu, 23 Feb 2012 12:54:50 +0000 (12:54 +0000)] 
Fedora 17 is merging /lib into /usr/lib so any suppression which
explicitly matches /lib/... needs to match /usr/lib/... as well.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12400

14 years agoAdd a spec rule for SUBQ/NBE.
Julian Seward [Thu, 23 Feb 2012 07:36:43 +0000 (07:36 +0000)] 
Add a spec rule for SUBQ/NBE.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2261

14 years agoImplement malloc_size for the vg_default_zone on Darwin.
Julian Seward [Thu, 23 Feb 2012 07:36:03 +0000 (07:36 +0000)] 
Implement malloc_size for the vg_default_zone on Darwin.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12399

14 years agoDocument the new --fair-sched option.
Philippe Waroquiers [Wed, 22 Feb 2012 20:23:29 +0000 (20:23 +0000)] 
Document the new --fair-sched option.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12398

14 years agoAvoid having holes in the VgdbShared struct.
Philippe Waroquiers [Wed, 22 Feb 2012 19:47:27 +0000 (19:47 +0000)] 
Avoid having holes in the VgdbShared struct.

These holes are not initialized,
and writing these uninitialised bytes to the mapped file
causes an error being reported when running Valgrind
inside Valgrind. Having no holes avoid having this error.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12397

14 years agoHide our use of pkglibdir to stop automake 1.11.2 and later complaining.
Tom Hughes [Tue, 21 Feb 2012 15:53:35 +0000 (15:53 +0000)] 
Hide our use of pkglibdir to stop automake 1.11.2 and later complaining.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12396

14 years agoAdd test cases for MPSADBW. See #294048.
Julian Seward [Tue, 21 Feb 2012 11:03:38 +0000 (11:03 +0000)] 
Add test cases for MPSADBW.  See #294048.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12395

14 years agoImplementation of SSE 4.1 MPSADBW instruction. Fixes #294048.
Julian Seward [Tue, 21 Feb 2012 11:02:44 +0000 (11:02 +0000)] 
Implementation of SSE 4.1 MPSADBW instruction.  Fixes #294048.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2260

14 years agoDon't claim to support 3dnow or 3dnowext on the baseline x86_64
Julian Seward [Tue, 21 Feb 2012 08:53:54 +0000 (08:53 +0000)] 
Don't claim to support 3dnow or 3dnowext on the baseline x86_64
CPU.  Fixes #291568.  (Reimar Döffinger, Reimar.Doeffinger@gmx.de)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2259

14 years agox86: don't forget to initialise guest %es from the host %es when
Julian Seward [Tue, 21 Feb 2012 08:38:04 +0000 (08:38 +0000)] 
x86: don't forget to initialise guest %es from the host %es when
constructing the initial guest register state.  Fixes #291253.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12394

14 years agoARM/Thumb only: fix a bug in which stack unwinding halts in some
Julian Seward [Mon, 20 Feb 2012 15:33:24 +0000 (15:33 +0000)] 
ARM/Thumb only: fix a bug in which stack unwinding halts in some
functions that do FP arithmetic.  This is due to the Dwarf3 CFI
mentioning Dwarf registers above N_CFI_REGS, in particular FP
registers, which have values of about 80.  This fixes the problem by
increasing N_CFI_REGS to a level that covers all known registers.
(n-i-bz)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12393

14 years agoWith the change in VEX r2258 the guest IA will now also be accessed
Florian Krohm [Mon, 20 Feb 2012 15:03:02 +0000 (15:03 +0000)] 
With the change in VEX r2258 the guest IA will now also be accessed
in the low word only. Adjust code accordingly.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12392

14 years agoImprove code generation on s390x for assignment of constant
Florian Krohm [Mon, 20 Feb 2012 15:01:14 +0000 (15:01 +0000)] 
Improve code generation on s390x for assignment of constant
values to guest registers. Motivated by the observation that
piecing together a 64-bit value requires 4 insns on z900 and 2 insns
on newer models. Specifically:
(1) Assigning 0 can be done by using XC
(2) Assigning a value that differs by a small amount from the
    value previously assigned can be done using AGSI
    (Happens a lot for guest IA updates).
(3) If the new value differs from the previous one only
    in the lower word it is sufficient to assign the lower word.
(4) If the new value equals the old value the assignment is redundant
    and can be eliminated. This happens surprisingly often.
This buys us somewhere between 5% and 11.8% of insns (as measured
on the perf bucket).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2258

14 years agoUpdate status and build instructions for ICS (Android 4.0.3).
Julian Seward [Fri, 17 Feb 2012 15:13:55 +0000 (15:13 +0000)] 
Update status and build instructions for ICS (Android 4.0.3).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12391

14 years agoAccept DMB (mcr 15, 0, rT, c7, c10, 5) for any rT <= 14,
Julian Seward [Fri, 17 Feb 2012 15:07:09 +0000 (15:07 +0000)] 
Accept DMB (mcr 15, 0, rT, c7, c10, 5) for any rT <= 14,
not just when rT = r0.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2257

14 years agoAdd test cases for PHMINPOSUW (SSE 4.1). See #287301.
Julian Seward [Thu, 16 Feb 2012 22:02:47 +0000 (22:02 +0000)] 
Add test cases for PHMINPOSUW (SSE 4.1).  See #287301.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12390

14 years agoImplement PHMINPOSUW (SSE 4.1). Fixes #287301.
Julian Seward [Thu, 16 Feb 2012 22:02:14 +0000 (22:02 +0000)] 
Implement PHMINPOSUW (SSE 4.1).  Fixes #287301.
(Laurent Birtz, seerdecker@yahoo.com.au)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2256

14 years agoRe-enable RET $imm16 following insn decoding framework rework.
Julian Seward [Thu, 16 Feb 2012 19:09:43 +0000 (19:09 +0000)] 
Re-enable RET $imm16 following insn decoding framework rework.
Fixes #292430 (a regression).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2255

14 years agoAdd test cases for 16 bit PCMPxSTRx variants. See #293754.
Julian Seward [Thu, 16 Feb 2012 15:24:17 +0000 (15:24 +0000)] 
Add test cases for 16 bit PCMPxSTRx variants.  See #293754.
(Eliot Moss, moss@cs.umass.edu)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12389

14 years agoAdd support for some 16-bit PCMPxSTRx variants. Prior to this point
Julian Seward [Thu, 16 Feb 2012 15:21:08 +0000 (15:21 +0000)] 
Add support for some 16-bit PCMPxSTRx variants.  Prior to this point
only 8-bit variants were supported.

Fixes #293754.  (Eliot Moss, moss@cs.umass.edu)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2254

14 years agoAdds 16 and 32 bit fnsave/frstor, and 0x66 prefix on fldl, to guest
Julian Seward [Thu, 16 Feb 2012 14:18:56 +0000 (14:18 +0000)] 
Adds 16 and 32 bit fnsave/frstor, and 0x66 prefix on fldl, to guest
amd64.

The Oracle/Sun HotSpot Java virtual machine uses fnsave and frstor,
which valgrind supports for x86 but not amd64. Even more interesting,
HotSpot uses the 0x66 size prefix on these instructions, and on
fldl. This patch adds the 16- and 32-bit versions of fnsave/frstor to
the amd64 guest, and tolerates the 0x66 size prefix on fldl (but only
on these three fpu instructions, even though the AMD docs say all
other fpu instructions (except fnstenv and fldenv) *ignore* 0x66).

Fixes #294191.  (Eliot Moss, moss@cs.umass.edu)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2253

14 years agoRe-enable CLFLUSH in the new decoding framework. Fixes #293808.
Julian Seward [Thu, 16 Feb 2012 13:45:13 +0000 (13:45 +0000)] 
Re-enable CLFLUSH in the new decoding framework.  Fixes #293808.
(Eliot Moss, moss@cs.umass.edu)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2252

14 years agoBroadens the range on INT imm8 values that SIGSEGV, allowing Jikes RVM
Julian Seward [Thu, 16 Feb 2012 12:36:47 +0000 (12:36 +0000)] 
Broadens the range on INT imm8 values that SIGSEGV, allowing Jikes RVM
to work.

Jikes RVM uses INT 0x3F through 0x49, assuming that they result in a
SIGSEGV. The x86 guest currently does this only for INT 0x40 through
0x43. The attached patch extends the range to 0x3F through 0x4F,
covering all existing Jikes RVM INTs and leaving room for it to add a
few more before it runs into this problem again.

Fixes #294185.  (Eliot Moss, moss@cs.umass.edu)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2251

14 years ago* compare vgdb-error with n_errs_shown, not with n_errs_found.
Philippe Waroquiers [Wed, 15 Feb 2012 22:29:30 +0000 (22:29 +0000)] 
* compare vgdb-error with n_errs_shown, not with n_errs_found.
  Using n_errs_shown allows the user to stop on an error
  identified in a previous run by counting errors shown.
* shows also n_errs_shown in monitor command v.info n_errs_found
* slightly clarified the manual, updated to new output of v.info n_errs_found

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12388

14 years agoAdd a spec rule for HI after SUB. This turns up quite a lot
Julian Seward [Wed, 15 Feb 2012 19:11:44 +0000 (19:11 +0000)] 
Add a spec rule for HI after SUB.  This turns up quite a lot
on my Nexus S.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2250

14 years agoAnnounce bug fix.
Florian Krohm [Wed, 15 Feb 2012 04:05:52 +0000 (04:05 +0000)] 
Announce bug fix.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12387

14 years agoAdd some VEX sanity checks for ppc64 unhandled instructions.
Florian Krohm [Wed, 15 Feb 2012 04:05:05 +0000 (04:05 +0000)] 
Add some VEX sanity checks for ppc64 unhandled instructions.
Patch by Maynard Johnson (maynardj@us.ibm.com). Fixes #293088.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2249

14 years agoUse LC_ALL=C for a controlled environment.
Florian Krohm [Wed, 15 Feb 2012 03:57:27 +0000 (03:57 +0000)] 
Use LC_ALL=C for a controlled environment.
Patch by zzam@gentoo.org. Fixes #294055.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12386

14 years agoWire up a few more syscalls.
Florian Krohm [Wed, 15 Feb 2012 03:32:50 +0000 (03:32 +0000)] 
Wire up a few more syscalls.
Patch by Christian Borntraeger (borntraeger@de.ibm.com).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12385

14 years agoIn fold_Expr use a switch instead of an if-chain for clarity and
Florian Krohm [Wed, 15 Feb 2012 00:43:36 +0000 (00:43 +0000)] 
In fold_Expr use a switch instead of an if-chain for clarity and
efficiency.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2248

14 years ago* fix Bug 290655 - Add support for AESKEYGENASSIST instruction
Philippe Waroquiers [Tue, 14 Feb 2012 21:35:46 +0000 (21:35 +0000)] 
* fix Bug 290655 - Add support for AESKEYGENASSIST instruction
  (Valgrind part : test for AES instructions (AESKEYGENASSIST, AESIMC,
  AESENC, AESENCLAST, AESDEC, AESDECLAST).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12384