Commit Graph

10941 Commits

Author SHA1 Message Date
Julian Seward
73df2fc86a 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
2014-08-22 19:07:12 +00:00
Josef Weidendorfer
3675ccd650 Cleanup. Cost array was never called anyway.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14334
2014-08-22 17:36:05 +00:00
Florian Krohm
147520eb27 Remove benign macro redefinition.
Give current_jccs internal linkage.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14332
2014-08-22 16:55:07 +00:00
Mark Wielaard
b89d33b962 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
2014-08-22 10:14:28 +00:00
Josef Weidendorfer
6962af41ae Align header comment with other files
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14330
2014-08-22 08:38:40 +00:00
Philippe Waroquiers
5f58068856 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
2014-08-21 20:01:50 +00:00
Mark Wielaard
4c64a05422 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
2014-08-21 17:46:48 +00:00
Mark Wielaard
262ce8ca11 Bug 338445 amd64 vbit-test fails with unknown opcodes used by arm64 VEX.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14327
2014-08-21 14:44:48 +00:00
Mark Wielaard
8d3e1da04c 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
2014-08-21 12:33:31 +00:00
Mark Wielaard
2506dd02ea 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
2014-08-21 10:04:04 +00:00
Mark Wielaard
5380c03091 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
2014-08-21 10:03:52 +00:00
Florian Krohm
75e1c18929 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
2014-08-20 21:04:14 +00:00
Philippe Waroquiers
bbf15483ab Update in NEWS the gcc release needed to better support Ada tasks termination
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14322
2014-08-20 20:53:07 +00:00
Florian Krohm
ab2090d31c 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
2014-08-20 20:37:33 +00:00
Julian Seward
4adcd21bf9 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
2014-08-20 17:45:00 +00:00
Mark Wielaard
b4ebc0e151 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
2014-08-20 16:11:53 +00:00
Bart Van Assche
b60a3a394d auxprogs: Update Subversion ignore list
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14316
2014-08-20 06:51:19 +00:00
Bart Van Assche
d1042554d0 helgrind/tests: Update Subversion ignore list
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14315
2014-08-20 06:50:22 +00:00
Bart Van Assche
2abde2195e drd/tests/tls_threads: Add
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14314
2014-08-20 06:48:22 +00:00
Philippe Waroquiers
8e605f14c5 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
2014-08-19 22:46:44 +00:00
Florian Krohm
d31fe530ff Fix a typo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14312
2014-08-19 16:53:02 +00:00
Florian Krohm
d3615cbbce 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
2014-08-18 15:36:29 +00:00
Julian Seward
de7abd40a9 arm64: enable test cases for
srhadd, urhadd (vector)
suqadd, usqadd (scalar)
suqadd, usqadd (vector)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14303
2014-08-18 12:29:03 +00:00
Philippe Waroquiers
d06e43ba80 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
2014-08-17 20:07:36 +00:00
Philippe Waroquiers
2f460aaec6 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
2014-08-17 20:03:51 +00:00
Julian Seward
1e5f3e37f5 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
2014-08-17 18:34:08 +00:00
Philippe Waroquiers
d73c4e2a34 Add comments in getoff.c to clarify its intended usage.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14299
2014-08-17 13:33:57 +00:00
Julian Seward
1fcc17e9a9 Fix build problems on MacOSX pertaining to r14283.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14298
2014-08-17 12:23:56 +00:00
Philippe Waroquiers
d08707f577 * 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
2014-08-16 21:00:15 +00:00
Carl Love
4a227327b7 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
2014-08-15 16:44:32 +00:00
Carl Love
cadab32c50 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
2014-08-15 16:40:03 +00:00
Philippe Waroquiers
2101636621 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
2014-08-15 13:03:24 +00:00
Philippe Waroquiers
bc353dfe97 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
2014-08-15 10:27:52 +00:00
Julian Seward
8ad42245b5 Track vex r2924 (Renaming of Iop_QSalN*, Iop_QShlN* and Iop_QShlN*S)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14282
2014-08-15 09:12:28 +00:00
Julian Seward
3b07ab47b2 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
2014-08-15 05:39:42 +00:00
Florian Krohm
895ab49a72 Choose some floating point numbers that are hopefully easier to write out.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14279
2014-08-14 17:32:26 +00:00
Carl Love
5f6905953b 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
2014-08-14 16:54:48 +00:00
Florian Krohm
d83e9ccbd4 Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14277
2014-08-14 14:14:55 +00:00
Florian Krohm
ea9d4bbbeb Make suppression more flexible.
Needed for s390 running Fedora 20.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14276
2014-08-14 14:12:38 +00:00
Julian Seward
fe4f064e32 Add a couple more OSX109 libc leak suppressions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14275
2014-08-14 09:46:52 +00:00
Julian Seward
ae0f90f228 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
2014-08-14 09:38:19 +00:00
Philippe Waroquiers
135719b57e 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
2014-08-13 21:25:45 +00:00
Florian Krohm
6897bf8d8b Remove benign macro redefinition.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14269
2014-08-13 14:31:04 +00:00
Philippe Waroquiers
04d542445c Fix some comments
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14267
2014-08-13 09:53:18 +00:00
Julian Seward
2254c18b04 Unbreak the MacOS port following the recent ppc64le port merge.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14266
2014-08-13 09:04:02 +00:00
Florian Krohm
dd93cc7ee4 Followup to r14264: Fix VG_(sysnum_string) for Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14265
2014-08-12 21:11:44 +00:00
Florian Krohm
c30cf0c674 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
2014-08-12 11:43:17 +00:00
Bart Van Assche
7daccec659 coregrind/m_syswrap/priv_syswrap-xen.h: Add copyright header
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14263
2014-08-12 09:53:32 +00:00
Florian Krohm
5d0841b870 Correct a comment. We really should not specify the default values
here. Double maintenance.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14262
2014-08-11 15:48:51 +00:00
Florian Krohm
275e864bc1 Give static variable function scope.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14260
2014-08-11 15:21:44 +00:00