]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
10 years agoCheck that vgdb ptrace actions do not cause a EINTR or whatever
Philippe Waroquiers [Thu, 28 Aug 2014 20:19:41 +0000 (20:19 +0000)] 
Check that vgdb ptrace actions do not cause a EINTR or whatever
to go out of the select syscall

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

10 years agoTypo fix + small improvement in comment
Philippe Waroquiers [Thu, 28 Aug 2014 19:57:32 +0000 (19:57 +0000)] 
Typo fix + small improvement in comment

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

10 years agoWorkaround bug 338633. gdbserver_tests/nlcontrolc.vgtest hangs on arm64.
Mark Wielaard [Thu, 28 Aug 2014 18:47:54 +0000 (18:47 +0000)] 
Workaround bug 338633. gdbserver_tests/nlcontrolc.vgtest hangs on arm64.

Disable the test on arm64 for now to keep make regtest from hanging.

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

10 years agoHandle ENOSYS instread of EINVAL for some helgrind tests.
Mark Wielaard [Thu, 28 Aug 2014 14:59:08 +0000 (14:59 +0000)] 
Handle ENOSYS instread of EINVAL for some helgrind tests.

Some arches (s390x and ppc64) return ENOSYS instead of EINVAL for
undefined futex operations. Adjust the helgrind filter_stderr to
handle that case.

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

10 years agoBug 338615 suppress glibc 2.20 optimized strcmp implementation for ARMv7.
Mark Wielaard [Thu, 28 Aug 2014 14:59:04 +0000 (14:59 +0000)] 
Bug 338615 suppress glibc 2.20 optimized strcmp implementation for ARMv7.

Add an add_hardwired_spec for strcmp in VG_(redir_initialise) for
ld-linux.so.3 and ld-linux-armhf.so.3 to use a simple strcmp
implementation in m_trampoline.S (compiled from the trivial .c code
to asm with gcc like the other implementations in that file).

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

10 years agoAdd configure check for 32 bit build support on arm64-linux.
Mark Wielaard [Wed, 27 Aug 2014 18:29:34 +0000 (18:29 +0000)] 
Add configure check for 32 bit build support on arm64-linux.

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

10 years agonone/tests/Makefile.am (DIST_SUBDIRS): Add arm64.
Mark Wielaard [Wed, 27 Aug 2014 13:39:53 +0000 (13:39 +0000)] 
none/tests/Makefile.am (DIST_SUBDIRS): Add arm64.

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

10 years agoFix typo in syswrap ppoll param, equate ppoll and poll for memcheck testcase.
Mark Wielaard [Tue, 26 Aug 2014 22:15:58 +0000 (22:15 +0000)] 
Fix typo in syswrap ppoll param, equate ppoll and poll for memcheck testcase.

ppoll argument is called ufds like the poll argument.
Newer architectures (aarch64) implement poll by calling ppoll directly.

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

10 years agoAdd a missing entry to all_archs[], the lack of which was causing
Julian Seward [Tue, 26 Aug 2014 21:06:31 +0000 (21:06 +0000)] 
Add a missing entry to all_archs[], the lack of which was causing
the test system to run arm64 tests on non-arm64 platforms.

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

10 years agoBack out a line inadvertantly committed in r14363.
Julian Seward [Tue, 26 Aug 2014 19:58:26 +0000 (19:58 +0000)] 
Back out a line inadvertantly committed in r14363.

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

10 years agoAdd test config files and expected outputs.
Julian Seward [Tue, 26 Aug 2014 19:53:08 +0000 (19:53 +0000)] 
Add test config files and expected outputs.

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

10 years agoAdd socket.S to memcheck/tests/filter_stderr.
Mark Wielaard [Tue, 26 Aug 2014 19:41:51 +0000 (19:41 +0000)] 
Add socket.S to memcheck/tests/filter_stderr.

sendmsg.vgtest shows socket.S on some arches instead of syscall-template.S
to indicate "in ...libc...".

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

10 years agoBuild system stuff, to hook the tests in none/tests/arm64
Julian Seward [Tue, 26 Aug 2014 19:28:09 +0000 (19:28 +0000)] 
Build system stuff, to hook the tests in none/tests/arm64
to the build system.

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

10 years agoHandle the new IROps introduced to support ARM64 SIMD.
Julian Seward [Tue, 26 Aug 2014 18:35:13 +0000 (18:35 +0000)] 
Handle the new IROps introduced to support ARM64 SIMD.

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

10 years agoIop_Rol64x2 was handled as if it were a 32x4 case. This moves
Julian Seward [Tue, 26 Aug 2014 17:30:07 +0000 (17:30 +0000)] 
Iop_Rol64x2 was handled as if it were a 32x4 case.  This moves
it to the right place.

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

10 years agoCleanup: remove unused macros.
Florian Krohm [Mon, 25 Aug 2014 22:04:01 +0000 (22:04 +0000)] 
Cleanup: remove unused macros.

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

10 years agoarm64: enable test cases for:
Julian Seward [Sun, 24 Aug 2014 20:37:39 +0000 (20:37 +0000)] 
arm64: enable test cases for:
  {zip,uzp,trn}{1,2} (vector)
  urecpe, ursqrte (vector)

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

10 years agoTrack renaming of {reciprocal, reciprocal sqrt}{estimate, step}
Julian Seward [Sun, 24 Aug 2014 14:02:22 +0000 (14:02 +0000)] 
Track renaming of {reciprocal, reciprocal sqrt}{estimate, step}
primops in vex r2932.

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

10 years ago338499 --sim-hints parsing broken due to wrong order in tokens (after introduction...
Philippe Waroquiers [Sun, 24 Aug 2014 11:24:10 +0000 (11:24 +0000)] 
338499  --sim-hints parsing broken due to wrong order in tokens (after introduction of no-nptl-pthread-stackcache)
Fix the token order in m_main.c

Somewhat retested by running the regression tests
(testing no-nptl-pthread-stackcache) and testing in an outer/inner setup
(testing enable-outer,no-inner-prefix).
It seems there is no regtest for the 2 other flags (lax-ioctls,fuse-compatible)

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

10 years agofilter_shell_output: filter out "Exec format error" added by newer bash.
Mark Wielaard [Sat, 23 Aug 2014 20:49:17 +0000 (20:49 +0000)] 
filter_shell_output: filter out "Exec format error" added by newer bash.

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

10 years agoRemove unused functions and prototypes.
Florian Krohm [Sat, 23 Aug 2014 19:42:52 +0000 (19:42 +0000)] 
Remove unused functions and prototypes.

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

10 years agoRemove unused function CLG_(sprint_cost).
Florian Krohm [Sat, 23 Aug 2014 19:13:48 +0000 (19:13 +0000)] 
Remove unused function CLG_(sprint_cost).

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

10 years agoMemcheck: add a new flag, --show-mismatched-frees=no|yes [yes], to
Julian Seward [Fri, 22 Aug 2014 19:26:23 +0000 (19:26 +0000)] 
Memcheck: add a new flag, --show-mismatched-frees=no|yes [yes], to
optionally disable allocator/deallocator mismatch checking.

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

10 years agomc_LOADV_128_or_256_slow: change a constant from V_BITS8_DEFINED
Julian Seward [Fri, 22 Aug 2014 19:07:12 +0000 (19:07 +0000)] 
mc_LOADV_128_or_256_slow: change a constant from V_BITS8_DEFINED
to V_BITS64_DEFINED so as to be consistent with the rest of the
types in this function.  Since both values are zero it gives no
functional change.

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

10 years agoCleanup. Cost array was never called anyway.
Josef Weidendorfer [Fri, 22 Aug 2014 17:36:05 +0000 (17:36 +0000)] 
Cleanup. Cost array was never called anyway.

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

10 years agoRemove benign macro redefinition.
Florian Krohm [Fri, 22 Aug 2014 16:55:07 +0000 (16:55 +0000)] 
Remove benign macro redefinition.
Give current_jccs internal linkage.

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

10 years agoTweak gdbserver_tests/hgtls.stdoutB.exp filter_gdb a little for older GDB.
Mark Wielaard [Fri, 22 Aug 2014 10:14:28 +0000 (10:14 +0000)] 
Tweak gdbserver_tests/hgtls.stdoutB.exp filter_gdb a little for older GDB.

Older GDB (7.2 on i386) don't print out which variable+offset an argument
pointer in a breakpoint function points to. The hgtls test already tests
whether the p pointer/test points to the expected tests array element.
So don't expect gdb to print it also and filter it out with filter_gdb.

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

10 years agoAlign header comment with other files
Josef Weidendorfer [Fri, 22 Aug 2014 08:38:40 +0000 (08:38 +0000)] 
Align header comment with other files

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

10 years agoFollow up to r14313: disable stack cache earlier
Philippe Waroquiers [Thu, 21 Aug 2014 20:01:50 +0000 (20:01 +0000)] 
Follow up to r14313: disable stack cache earlier
glibc is recycling memory for detached threads before a thread
termination => disable the stack cache earlier (i.e. once
a 'non main thread' is seen)

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

10 years agoNEWS 330319 vex amd64->IR: unhandled instruction bytes: 0xF 0x1 0xD5 (xend)
Mark Wielaard [Thu, 21 Aug 2014 17:46:48 +0000 (17:46 +0000)] 
NEWS 330319 vex amd64->IR: unhandled instruction bytes: 0xF 0x1 0xD5 (xend)

VEX svn r2931

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

10 years agoBug 338445 amd64 vbit-test fails with unknown opcodes used by arm64 VEX.
Mark Wielaard [Thu, 21 Aug 2014 14:44:48 +0000 (14:44 +0000)] 
Bug 338445 amd64 vbit-test fails with unknown opcodes used by arm64 VEX.

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

10 years agoexp-sgcheck/tests/hackedbz2.c mark vex_strlen as noinline
Mark Wielaard [Thu, 21 Aug 2014 12:33:31 +0000 (12:33 +0000)] 
exp-sgcheck/tests/hackedbz2.c mark vex_strlen as noinline

Explicitly set noinline so the test can check it is in the backtrace.
Newer gcc versions happily optimize it away otherwise.

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

10 years agoCheck some known PATHs for mpicc in configure.
Mark Wielaard [Thu, 21 Aug 2014 10:04:04 +0000 (10:04 +0000)] 
Check some known PATHs for mpicc in configure.

On some distributions (fedora) mpicc not installed on the default PATH.
Add a search path for finding mpicc by default if it is installed.
The user can still override the used mpicc compiler using --with-mpicc=.

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

10 years agoImprove -mpreferred-stack-boundary configure message.
Mark Wielaard [Thu, 21 Aug 2014 10:03:52 +0000 (10:03 +0000)] 
Improve -mpreferred-stack-boundary configure message.

Explicitly say we are checking for -mpreferred-stack-boundary=2.
Only 2 is ever used when it is supported. Some gcc versions/arches
(e.g. GCC 4.8 for x86_64) support -mpreferred-stack-boundary, but
only between 4 and 12. The message that -mpreferred-stack-boundary
wasn't supported was a little confusing. So explicitly say we checked
for -mpreferred-stack-boundary=2.

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

10 years agoClean up confusion about VG_(args_the_exename) which was believed to
Florian Krohm [Wed, 20 Aug 2014 21:04:14 +0000 (21:04 +0000)] 
Clean up confusion about VG_(args_the_exename) which was believed to
possibly be NULL in several places. Nowadays, VG_(ii_create_image) will
terminate the process if VG_(args_the_exename) is NULL.

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

10 years agoUpdate in NEWS the gcc release needed to better support Ada tasks termination
Philippe Waroquiers [Wed, 20 Aug 2014 20:53:07 +0000 (20:53 +0000)] 
Update in NEWS the gcc release needed to better support Ada tasks termination

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

10 years agoRemove unused functions CLG_(get_out_file) and CLG_(get_out_directory).
Florian Krohm [Wed, 20 Aug 2014 20:37:33 +0000 (20:37 +0000)] 
Remove unused functions CLG_(get_out_file) and CLG_(get_out_directory).
Looks like these were leftovers from early days -- perhaps r7235.

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

10 years agoKind of a follow-up to r14237.
Julian Seward [Wed, 20 Aug 2014 17:45:00 +0000 (17:45 +0000)] 
Kind of a follow-up to r14237.
pre_mem_read_sockaddr: in the case where the caller doesn't
specify any address family (that is, the family is AF_UNSPEC)
don't perform any further checks on the supplied |sa| address
block, since doing so merely gives rise to false uninitialised
value errors.

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

10 years agoconfigure should check for warning flags supported to disable them (#338205).
Mark Wielaard [Wed, 20 Aug 2014 16:11:53 +0000 (16:11 +0000)] 
configure should check for warning flags supported to disable them (#338205).

Configure would check whether gcc supported -Wno... flags. But gcc always
does. It is happy to just not warn about anything. So flip all configure
checks to test for the warning and only when gcc accepts the warning flag
use -Wno-...

Introduces two helper functions to make it easier to add new flag checks.
AC_GCC_WARNING_COND and AC_GCC_WARNING_SUBST_NO.

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

10 years agoauxprogs: Update Subversion ignore list
Bart Van Assche [Wed, 20 Aug 2014 06:51:19 +0000 (06:51 +0000)] 
auxprogs: Update Subversion ignore list

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

10 years agohelgrind/tests: Update Subversion ignore list
Bart Van Assche [Wed, 20 Aug 2014 06:50:22 +0000 (06:50 +0000)] 
helgrind/tests: Update Subversion ignore list

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

10 years agodrd/tests/tls_threads: Add
Bart Van Assche [Wed, 20 Aug 2014 06:48:22 +0000 (06:48 +0000)] 
drd/tests/tls_threads: Add

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

10 years agoAdd option a new sim-hint no-nptl-pthread-stackcache.
Philippe Waroquiers [Tue, 19 Aug 2014 22:46:44 +0000 (22:46 +0000)] 
Add option a new sim-hint  no-nptl-pthread-stackcache.

Activating this hint using --sim-hints=no-nptl-pthread-stackcache
means the glibc nptl stack cache will be disabled.

Disabling this stack/tls cache avoids helgrind false positive race conditions
errors when using __thread variables.

Note: disabling the stack cache is done by a kludge, dependent on
internal knowledge of glibc code, and using libpthread debug info.
So, this kludge might be broken with newer glibc version.
This has been tested on various platforms and various
glibc versions 2.11, 2.16 and 2.18

To check if the disabling works, you can do:
valgrind --tool=helgrind --sim-hints=no-nptl-pthread-stackcache -d -v ./helgrind/tests/tls_threads |& grep kludge

If you see the below 2 lines, then hopefully the stack cache has been disabled.
--12624-- deactivate nptl pthread stackcache via kludge: found symbol stack_cache_actsize at addr 0x3AF178
--12624:1:sched    pthread stack cache size disabling done via kludge

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

10 years agoFix a typo.
Florian Krohm [Tue, 19 Aug 2014 16:53:02 +0000 (16:53 +0000)] 
Fix a typo.

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

10 years agoRemove a few unused macro definitions.
Florian Krohm [Mon, 18 Aug 2014 15:36:29 +0000 (15:36 +0000)] 
Remove a few unused macro definitions.
Move exported global variables to the proper section
in the header file.
No functional change.

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

10 years agoarm64: enable test cases for
Julian Seward [Mon, 18 Aug 2014 12:29:03 +0000 (12:29 +0000)] 
arm64: enable test cases for
srhadd, urhadd (vector)
suqadd, usqadd (scalar)
suqadd, usqadd (vector)

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

10 years agoAnnounce in NEWS the change of behaviour (i.e. validity checking)
Philippe Waroquiers [Sun, 17 Aug 2014 20:07:36 +0000 (20:07 +0000)] 
Announce in NEWS the change of behaviour (i.e. validity checking)
for the clo options --kernel-variant and --sim-hints

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

10 years agoThe attached patch cleanups the clo processing
Philippe Waroquiers [Sun, 17 Aug 2014 20:03:51 +0000 (20:03 +0000)] 
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

10 years agoarm64: enable test cases for
Julian Seward [Sun, 17 Aug 2014 18:34:08 +0000 (18:34 +0000)] 
arm64: enable test cases for
  sshr, ushr, ssra, usra (scalar, imm)
  srshr, urshr, srsra, ursra (scalar, imm)
  srshr, urshr, srsra, ursra (vector, imm)
  sshl, srshl, ushl, urshl (scalar, imm)
  sshl, srshl, ushl, urshl (vector, vector)
  ssra, usra (vector, imm)

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

10 years agoAdd comments in getoff.c to clarify its intended usage.
Philippe Waroquiers [Sun, 17 Aug 2014 13:33:57 +0000 (13:33 +0000)] 
Add comments in getoff.c to clarify its intended usage.

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

10 years agoFix build problems on MacOSX pertaining to r14283.
Julian Seward [Sun, 17 Aug 2014 12:23:56 +0000 (12:23 +0000)] 
Fix build problems on MacOSX pertaining to r14283.

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

10 years ago* Unbreak build on macos (and on other platforms) that do not have
Philippe Waroquiers [Sat, 16 Aug 2014 21:00:15 +0000 (21:00 +0000)] 
* Unbreak build on macos (and on other platforms) that do not have
HAVE_DLINFO_RTLD_DI_TLS_MODID.
* add the copyright notice in auxprogs/getoff.c
* add more prereq to hgtls.vgtest

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

10 years agocreating the lind from none/tests/ppc64/round.c to none/tests/ppc32/round.c
Carl Love [Fri, 15 Aug 2014 16:44:32 +0000 (16:44 +0000)] 
creating the lind from none/tests/ppc64/round.c to none/tests/ppc32/round.c

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

10 years agoRemoving the file none/tests/ppc64/round.c so I can change it to a link.
Carl Love [Fri, 15 Aug 2014 16:40:03 +0000 (16:40 +0000)] 
Removing the file none/tests/ppc64/round.c so I can change it to a link.

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

10 years agoSome cleanup post QGetTlsAddr commit
Philippe Waroquiers [Fri, 15 Aug 2014 13:03:24 +0000 (13:03 +0000)] 
Some cleanup post QGetTlsAddr commit
* remove useless commented line in hgtls.vgtest
* avoid some #ifdef in arch specific code, hoping to discover more compile
  time errors.

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

10 years agofix 338160: Implement QGetTlsAddr query so that GDB+V gdbsrv can print __thread varia...
Philippe Waroquiers [Fri, 15 Aug 2014 10:27:52 +0000 (10:27 +0000)] 
fix 338160: Implement QGetTlsAddr query so that GDB+V gdbsrv can print __thread variables.

To implement QGetTlsAddr, gdbsrv has to know how to get the glibc dtv
address and the module id from the link_map.
These 2 things are dependent on the internals of glibc.
The dependency is mostly isolated in a few lines of arch dependent
code or in an external utility that used a hack + -ldl lib to find
the offset of the modid in the link_map structure.

Tested on x86/amd64/ppc64/s390x. Somewhat tested on ppc32 and arm64.
Untested/a few #ifdef-ed lines not compiled on arm/mips32/mips64
and darwin.

For more background info about thread local storage handling, see
'ELF Handling For Thread-Local Storage' http://www.akkadia.org/drepper/tls.pdf

Changes:
* auxprogs/getoff.c new auxilliary program to get platform specific offsets
  (currently only the offset for the module id in struct link_map).
* configure.ac : check for dlinfo(RTLD_DI_TLS_MODID) needed for getoff.c
* new gdbserver_tests/hgtls, testing various types of __thread variables
* various m_gdbserver files:
  - implement decoding of the QGetTlsAddr query
  - for each platform: platform specific code to get the dtv
  - call to external program getoff-<platform> the first time an
    __thread variable is printed.

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

10 years agoTrack vex r2924 (Renaming of Iop_QSalN*, Iop_QShlN* and Iop_QShlN*S)
Julian Seward [Fri, 15 Aug 2014 09:12:28 +0000 (09:12 +0000)] 
Track vex r2924 (Renaming of Iop_QSalN*, Iop_QShlN* and Iop_QShlN*S)

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

10 years agoarm64: enable test cases for:
Julian Seward [Fri, 15 Aug 2014 05:39:42 +0000 (05:39 +0000)] 
arm64: enable test cases for:
{uqshl, sqshl, sqshlu} (vector, imm)
{uqshl, sqshl, sqshlu} (scalar, imm)
{uqshrn, sqrshrun, sqshrun} (scalar, imm)

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

10 years agoChoose some floating point numbers that are hopefully easier to write out.
Florian Krohm [Thu, 14 Aug 2014 17:32:26 +0000 (17:32 +0000)] 
Choose some floating point numbers that are hopefully easier to write out.

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

10 years agoThis commit is an update to Bugzilla 334836
Carl Love [Thu, 14 Aug 2014 16:54:48 +0000 (16:54 +0000)] 
This commit is an update to Bugzilla 334836

There are two copies of the round test in none/tests/ppc32/round.c
and none/tests/ppc64/round.c.  The two source files should be
identical. The LE functional test commit updated the round.c test for
ppc64 but was missing the ppc32 round updates.  The round.c test was
updated to fix an issue where we were getting different outputs
depending on the compiler.  The output is now consistent for the
compilers allowing the removal of the additional expect files for
ppc32 and ppc64.

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

10 years agoUpdate list of ignored files.
Florian Krohm [Thu, 14 Aug 2014 14:14:55 +0000 (14:14 +0000)] 
Update list of ignored files.

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

10 years agoMake suppression more flexible.
Florian Krohm [Thu, 14 Aug 2014 14:12:38 +0000 (14:12 +0000)] 
Make suppression more flexible.
Needed for s390 running Fedora 20.

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

10 years agoAdd a couple more OSX109 libc leak suppressions.
Julian Seward [Thu, 14 Aug 2014 09:46:52 +0000 (09:46 +0000)] 
Add a couple more OSX109 libc leak suppressions.

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

10 years agoUnbreak the MacOS port following recent r14273 (further reduction
Julian Seward [Thu, 14 Aug 2014 09:38:19 +0000 (09:38 +0000)] 
Unbreak the MacOS port following recent r14273 (further reduction
in symbol table storage requirements for non-ppc64 targets).

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

10 years agoReduce memory needed for symbols, by having the tocptr and local_ep
Philippe Waroquiers [Wed, 13 Aug 2014 21:25:45 +0000 (21:25 +0000)] 
Reduce memory needed for symbols, by having the tocptr and local_ep
(used for ppc64 platforms) #ifdef-ed and accessed by macros
that becomes NOP on non ppc64 platforms.
This decreases the debuginfo memory by about 2.5 Mb on a big 32 bit application.

Note : doing that, some questions were encountered in the way
tocptr and local_ep have (or do not have) to be copied/maintained
in storage.c canonicaliseSymtab

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

10 years agoRemove benign macro redefinition.
Florian Krohm [Wed, 13 Aug 2014 14:31:04 +0000 (14:31 +0000)] 
Remove benign macro redefinition.

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

10 years agoFix some comments
Philippe Waroquiers [Wed, 13 Aug 2014 09:53:18 +0000 (09:53 +0000)] 
Fix some comments

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

10 years agoUnbreak the MacOS port following the recent ppc64le port merge.
Julian Seward [Wed, 13 Aug 2014 09:04:02 +0000 (09:04 +0000)] 
Unbreak the MacOS port following the recent ppc64le port merge.

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

10 years agoFollowup to r14264: Fix VG_(sysnum_string) for Darwin.
Florian Krohm [Tue, 12 Aug 2014 21:11:44 +0000 (21:11 +0000)] 
Followup to r14264: Fix VG_(sysnum_string) for Darwin.

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

11 years agoRemove function VG_(sysnum_string_extra) as it was just a wrapper
Florian Krohm [Tue, 12 Aug 2014 11:43:17 +0000 (11:43 +0000)] 
Remove function VG_(sysnum_string_extra) as it was just a wrapper
around VG_(sysnum_string). Also remove associated macro
VG_SYSNUM_STRING_EXTRA.
The VG_SYSNUM_STRING macro returned a pointer to a variable which
is out of scope. Using that value may cause undefined behaviour.
Change VG_(sysnum_string) to return pointer to static buffer instead.
Fix call sites.

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

11 years agocoregrind/m_syswrap/priv_syswrap-xen.h: Add copyright header
Bart Van Assche [Tue, 12 Aug 2014 09:53:32 +0000 (09:53 +0000)] 
coregrind/m_syswrap/priv_syswrap-xen.h: Add copyright header

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

11 years agoCorrect a comment. We really should not specify the default values
Florian Krohm [Mon, 11 Aug 2014 15:48:51 +0000 (15:48 +0000)] 
Correct a comment. We really should not specify the default values
here. Double maintenance.

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

11 years agoGive static variable function scope.
Florian Krohm [Mon, 11 Aug 2014 15:21:44 +0000 (15:21 +0000)] 
Give static variable function scope.

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

11 years agoRemove unused and possibly incorrectly defined macro.
Florian Krohm [Mon, 11 Aug 2014 15:21:11 +0000 (15:21 +0000)] 
Remove unused and possibly incorrectly defined macro.

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

11 years agoRemove unneeded include files.
Florian Krohm [Mon, 11 Aug 2014 14:39:28 +0000 (14:39 +0000)] 
Remove unneeded include files.

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

11 years agoarm64: enable test cases for:
Julian Seward [Mon, 11 Aug 2014 13:59:49 +0000 (13:59 +0000)] 
arm64: enable test cases for:
uqshrn{2}, sqrshrun{2}, sqshrun{2} (vector, imm)
sqxtn{2}, uqxtn{2}, sqxtun{2} (vector and scalar)

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

11 years agoarm64 Improve fpsr gdbsrv handling.
Philippe Waroquiers [Sun, 10 Aug 2014 10:42:10 +0000 (10:42 +0000)] 
arm64 Improve fpsr gdbsrv handling.
let the compiler handle the ULong to UInt conversion rather than
play with addresses.

Tested manually GDB+vgdb that reading and setting fpsr works, using
code such as (provided by Julian, I cannot write a single line of
arm64 asm :)
 void set_fpsr ( uint32_t val ) {
     __asm__ __volatile__( "msr fpsr, %0" : : "r"(val) : "cc" );
  }

  uint32_t get_fpsr ( void ) {
     uint32_t res;
     __asm__ __volatile__( "mrs %0, fpsr" : "=r"(res) : : "cc" );
     return res;
  }

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

11 years agodrd/tests/free_is_write: Reduce stack usage
Bart Van Assche [Sun, 10 Aug 2014 08:14:55 +0000 (08:14 +0000)] 
drd/tests/free_is_write: Reduce stack usage

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

11 years agoarm64 does not implement fork syscall. Use clone instead
Philippe Waroquiers [Sat, 9 Aug 2014 21:51:45 +0000 (21:51 +0000)] 
arm64 does not implement fork syscall. Use clone instead

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

11 years agoUse mkstemp_format in VG_(mkstemp). That way nothing breaks should
Florian Krohm [Sat, 9 Aug 2014 21:45:56 +0000 (21:45 +0000)] 
Use mkstemp_format in VG_(mkstemp). That way nothing breaks should
the format change.

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

11 years agoFix type.
Florian Krohm [Sat, 9 Aug 2014 16:55:59 +0000 (16:55 +0000)] 
Fix type.

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

11 years agodrd: Move VG_(getenv)("DRD_VERIFY_CONFLICT_SET")
Bart Van Assche [Sat, 9 Aug 2014 12:58:17 +0000 (12:58 +0000)] 
drd: Move VG_(getenv)("DRD_VERIFY_CONFLICT_SET")

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

11 years agodrd/Testing.txt: Document how to run all regression tests with conflict set verificat...
Bart Van Assche [Sat, 9 Aug 2014 12:47:17 +0000 (12:47 +0000)] 
drd/Testing.txt: Document how to run all regression tests with conflict set verification enabled

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

11 years agoMark argument of VG_(mkstemp) as const.
Philippe Waroquiers [Sat, 9 Aug 2014 11:26:51 +0000 (11:26 +0000)] 
Mark argument of VG_(mkstemp) as const.
Fix comment in pub_core_libcfile.h (and make it the only copy)

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

11 years agoThis commit is for Bugzilla 334834.
Carl Love [Fri, 8 Aug 2014 22:29:10 +0000 (22:29 +0000)] 
This commit is for Bugzilla 334834.

A performance regression was found due to the
-02 -m64 flags not being included when compiling
the VEX PPC64 code.  This commit fixes the Makefile
to pass the needed flags when compiling VEX PPC64
code.

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

11 years agoThis patch implements reading the directory information for source
Philippe Waroquiers [Fri, 8 Aug 2014 22:11:41 +0000 (22:11 +0000)] 
This patch implements reading the directory information for source
files in the dwarf3 reader.
Basically, the change consists in replacing in the DiInlLoc struct
      const HChar* filename;     /* caller source filename */
by
      UInt   fndn_ix;            /* index in di->fndnpool of caller source
                                    dirname/filename */

A similar change is done in  DiVariable struct, as the
read_filename_Table code is shared between the inline info reader
and the varinfo reader.
Note however that outputting dirname in variable description
is not done. Unclear if that is desired or not.
It should be trivially doable however.
Replacing filename by fndn_ix implies a bunch of semi-mechanical
changes.

The code to read the directory names is in the new function
static
XArray* read_dirname_xa (struct _DebugInfo* di, const HChar *compdir,
                         Cursor *c,
                         Bool td3 )

Note that readdwarf.c and readdwarf3.c have significant duplicated
logic. Would be nice to integrate these 2 dwarf readers in one
single reader. This function is directly inspired from
an equivalent piece of code in readdwarf.c.

Modified memcheck/tests/varinfo5.vgtest to test the dirname appears
in the inlined functions.

Impact on memory is neglectable (a few Kb on a big executable).

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

11 years agodrd: Clear conflict set after fork (#338115)
Bart Van Assche [Fri, 8 Aug 2014 16:27:30 +0000 (16:27 +0000)] 
drd: Clear conflict set after fork (#338115)

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

11 years agodrd/tests/threaded-fork-vcs: Add
Bart Van Assche [Fri, 8 Aug 2014 16:20:13 +0000 (16:20 +0000)] 
drd/tests/threaded-fork-vcs: Add

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

11 years agodrd: Add command-line option --verify-conflict-set
Bart Van Assche [Fri, 8 Aug 2014 16:17:58 +0000 (16:17 +0000)] 
drd: Add command-line option --verify-conflict-set

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

11 years agoAdd missing comment marker.
Julian Seward [Fri, 8 Aug 2014 08:58:03 +0000 (08:58 +0000)] 
Add missing comment marker.

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

11 years agoThis commit is for Bugzilla 334836. The Bugzilla contains patch 3 of 3
Carl Love [Thu, 7 Aug 2014 23:49:27 +0000 (23:49 +0000)] 
This commit is for Bugzilla 334836.  The Bugzilla contains patch 3 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334384 and 334834.  Note, there are no VEX changes in this patch.

PP64 Little Endian test case fixes.

This patch adds new LE and BE expect files where needed.  In other
cases, the test was fixed to run correctly on LE and BE using based on
testing to see which platform is being used.

Where practical, the test cases have been changed so that the output
produced for BE  and LE will be identical.  The test cases that require
a major rewrite to make the output identical for BE and LE simply
had an additional expect file added.

Signed-off-by: Carl Love <carll@us.ibm.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14240

11 years agoThis commit is for Bugzilla 334834. The Bugzilla contains patch 2 of 3
Carl Love [Thu, 7 Aug 2014 23:35:54 +0000 (23:35 +0000)] 
This commit is for Bugzilla 334834.  The Bugzilla contains patch 2 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334384 and 334836.

POWER PC, add the functional Little Endian support, patch 2

The IBM POWER processor now supports both Big Endian and Little Endian.
The ABI for Little Endian also changes.  Specifically, the function
descriptor is not used, the stack size changed, accessing the TOC
changed.  Functions now have a local and a global entry point.  Register
r2 contains the TOC for local calls and register r12 contains the TOC
for global calls.  This patch makes the functional changes to the
Valgrind tool.  The patch makes the changes needed for the
none/tests/ppc32 and none/tests/ppc64 Makefile.am.  A number of the
ppc specific tests have Endian dependencies that are not fixed in
this patch.  They are fixed in the next patch.

Per Julian's comments renamed coregrind/m_dispatch/dispatch-ppc64-linux.S
to coregrind/m_dispatch/dispatch-ppc64be-linux.S  Created new file for LE
coregrind/m_dispatch/dispatch-ppc64le-linux.S.  The same was done for
coregrind/m_syswrap/syscall-ppc-linux.S.

Signed-off-by: Carl Love <carll@us.ibm.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14239

11 years agoThis commit is for Bugzilla 334384. The Bugzilla contains patch 1 of 3
Carl Love [Thu, 7 Aug 2014 23:17:29 +0000 (23:17 +0000)] 
This commit is for Bugzilla 334384.  The Bugzilla contains patch 1 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334834 and 334836.  The commit does not have a VEX commit associated with it.

POWER PC, add initial Little Endian support

The IBM POWER processor now supports both Big Endian and Little Endian.
This patch renames the #defines with the name ppc64 to ppc64be for the BE
specific code.  This patch adds the Little Endian #define ppc64le to the

Additionally, a few functions are renamed to remove BE from the name if the
function is used by BE and LE. Functions that are BE specific have BE put
in the name.

The goals of this patch is to make sure #defines, function names and
variables consistently use PPC64/ppc64 if it refers to BE and LE,
PPC64BE/ppc64be if it is specific to BE, PPC64LE/ppc64le if it is LE
specific.  The patch does not break the code for PPC64 Big Endian.

The test files memcheck/tests/atomic_incs.c, tests/power_insn_available.c
and tests/power_insn_available.c are also updated to the new #define
definition for PPC64 BE.

Signed-off-by: Carl Love <carll@us.ibm.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14238

11 years agopre_mem_read_sockaddr: properly handle the NETLINK address family
Julian Seward [Wed, 6 Aug 2014 19:52:12 +0000 (19:52 +0000)] 
pre_mem_read_sockaddr: properly handle the NETLINK address family
rather than throwing to the default case.  This stops Memcheck
reporting false positives for the NETLINK case.

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

11 years agofix 338024 inlined functions are not shown if DW_AT_ranges is used
Philippe Waroquiers [Tue, 5 Aug 2014 19:34:35 +0000 (19:34 +0000)] 
fix 338024  inlined functions are not shown if DW_AT_ranges is used
Based on investigation and patch by Matthias Schwarzott.
(no small test found that reproduced the problem,
but the equivalent patch given in bug 338024 fixed the inlined stack
trace  in a big shared lib).
Would be nice however to have a small test case ...

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

11 years agoadd support for VKI_BLKDISCARDZEROES
Christian Borntraeger [Tue, 5 Aug 2014 15:14:52 +0000 (15:14 +0000)] 
add support for VKI_BLKDISCARDZEROES

this is used in some newer QEMU versions and other tools

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

11 years agoNEWS: Add #331829 (Unexpected ioctl opcode sign extension)
Bart Van Assche [Tue, 5 Aug 2014 12:03:51 +0000 (12:03 +0000)] 
NEWS: Add #331829 (Unexpected ioctl opcode sign extension)

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

11 years agoLinux: Add support for Lustre FID2PATH ioctl (#331829)
Bart Van Assche [Tue, 5 Aug 2014 12:01:26 +0000 (12:01 +0000)] 
Linux: Add support for Lustre FID2PATH ioctl (#331829)

This is a modified version of a patch provided by Frank Zago (fzago@cray.com).

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

11 years agoLinux system call wrappers: truncate ioctl request number to 32 bits
Bart Van Assche [Tue, 5 Aug 2014 11:35:48 +0000 (11:35 +0000)] 
Linux system call wrappers: truncate ioctl request number to 32 bits

As explained in https://bugs.kde.org/show_bug.cgi?id=331829, when passing
an ioctl request number as an int to a function the request number will
be sign-extended to 64 bits on 64-bit systems. Avoid that this causes
Valgrind to fail to recognize an ioctl by truncating the request number
to 32 bits.

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

11 years agoEnable tests for: sq{r}dmulh (scalar vs elem, vector vs elem),
Julian Seward [Mon, 4 Aug 2014 08:11:33 +0000 (08:11 +0000)] 
Enable tests for: sq{r}dmulh (scalar vs elem, vector vs elem),
sqshl, uqshl, sqrshl, uqrshl (reg) (vector and scalar).

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