12529 Commits

Author SHA1 Message Date
Philippe Waroquiers
11671ae1d3 352395 - Please provide SVN revision info in --version -v
Finally committed ... :)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16164
2016-11-29 22:32:27 +00:00
Petar Jovanovic
dee49c2144 mips64: fix fadvise64 syscall wrappers
Use platform specific pre-wrapper for fadvise64 system call and respect
size of parameters, instead of using generic wrapper written for 32bit
architectures.

Issue reported by Marcin Juszkiewicz.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16163
2016-11-29 14:57:51 +00:00
Petar Jovanovic
9a6096841e mips32: fix fadvise64 system call
For fadvise64 system call, 7th 32-bit argument slot (third on the stack)
will also be used due to MIPS O32 calling convention in passing 64-bit
values.

sys_fadvise64(int fd, loff_t offset, loff_t len, int advice);

NR_fadvise64 -> v0               (sysno)
fd           -> a0               (ARG1)
offset       -> a2, a3           (ARG3, ARG4)
len          -> SP + 16, SP + 20 (ARG5, ARG6)
advise       -> SP + 24          (ARG7)

Change the code according to it.

Patch by Aleksandar Rikalo.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16162
2016-11-29 14:27:25 +00:00
Ivo Raisr
adb196abf3 Fix compiler warning on Solaris.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16161
2016-11-28 22:14:58 +00:00
Ivo Raisr
02a02e7bf9 Use NULL_STK_ID consistently throughout whole Valgrind.
Follow up to SVN r16159, BZ#373046. 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16160
2016-11-28 21:41:28 +00:00
Philippe Waroquiers
260f165999 Fix 373046 - Stacks registered by core are never deregistered
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16159
2016-11-28 19:34:06 +00:00
Philippe Waroquiers
ed9721f0f4 Addition of helgrind client request VALGRIND_HG_GNAT_DEPENDENT_MASTER_JOIN
See helgrind.h for description


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16158
2016-11-28 18:16:27 +00:00
Philippe Waroquiers
d280a9f9a5 Ensure the 'too early msg to use vgdb stop at valgrind abnormal exit' is produced
For this, we must directly check the command line option, as
the VG_(gdbserver_stop_at) function returns False if the gdbserver
is not yet initialised



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16157
2016-11-27 10:25:15 +00:00
Bart Van Assche
14362fe2e2 include/valgrind.h: Fix spelling in a source code comment
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16156
2016-11-26 02:42:11 +00:00
Julian Seward
4f8c8acb28 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16155
2016-11-25 10:18:04 +00:00
Petar Jovanovic
4b49c4ee66 make bar_bad tests more deterministic
Canceling the thread slp2 before the case 5 makes behaviour of this test
more deterministic.
Also, as Philippe W. pointed out, adding --fair-sched=try seems to avoid
variable and sometimes very long run time for these tests.

Related BZ #358213


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16154
2016-11-23 17:38:29 +00:00
Julian Seward
cad347059e Bug 348616 - Wine/valgrind: Warning: noted but unhandled ioctl 0x5390
with no size/direction hints. (DVD_READ_STRUCT)

Patch from Austin English (austinenglish@gmail.com).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16153
2016-11-23 13:26:23 +00:00
Julian Seward
15f0421b15 Bug 352767 - Wine/valgrind: Warning: noted but unhandled ioctl 0x5307
with no size/direction hints. (CDROMSTOP).

Patch from Austin English (austinenglish@gmail.com).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16152
2016-11-23 13:15:22 +00:00
Philippe Waroquiers
482d87b925 Comments change only: add the profile of the hook called by the gnat runtime
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16151
2016-11-22 21:16:37 +00:00
Julian Seward
f3144ff5ff Add a tracking file for bugs in 3.12.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16150
2016-11-21 12:18:29 +00:00
Julian Seward
e9097b806a Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16149
2016-11-21 12:18:08 +00:00
Mark Wielaard
2608a8da6a Fix none/tests/pth_2sig.c build with (default) -std=gnu90.
error: ‘for’ loop initial declarations are only allowed in C99 mode

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16148
2016-11-21 08:28:07 +00:00
Ivo Raisr
b25f61d6ff Fix test none/tests/pth_2sig on Solaris.
When signal SIGINT was used, it got propagated to the parent shell
and therefore the regression test suite was terminated.
With SIGTERM only the parent exits, as is supposed.
Verified that this changed test case still reproduces the original problem
on Linux and Solaris, when r16140 is temporarily undone.
Follow up to r16140 and r16143 and BZ#372600.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16147
2016-11-20 15:06:08 +00:00
Philippe Waroquiers
d513fcfe77 xtree: some documentation and --help-debug fine tuning
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16146
2016-11-20 11:41:25 +00:00
Ivo Raisr
8f6ff4a27b Solaris: Add syscall wrapper for sigsendsys(108)
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16145
2016-11-20 05:19:02 +00:00
Ivo Raisr
8e08fc91ec Solaris: Add syscall wrapper for sigsuspend(95)
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16144
2016-11-20 00:20:34 +00:00
Ivo Raisr
bd60092f11 Disable test none/tests/pth_2sig on Solaris for now until
it is investigated why it messes so badly with the regression test suite.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16143
2016-11-19 23:28:18 +00:00
Ivo Raisr
452db17ca7 Fix the configure test for presense of __xpg[4,6] symbols
on Solaris so that only shared library is considered.
Previously a binary was checked which now started to produce
incorrect results with regards to vg_preload.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16142
2016-11-19 15:15:10 +00:00
Philippe Waroquiers
d208bc934b Fix 372504 Hanging on exit_group
Note that it is unclear if the PRE syscall for rt_sigsuspend
is properly setting up a temporary mask in the thread state
tmp_sig_mask:  if an handler is called while a thread is
calling sigsuspend, the mask during the handler run must be
the temporary mask set by sigsuspend.
It is not clear if/where the valgrind sigframe builder/handler
sets the tmp_sig_mask to the value as expected by the user
(i.e. the value of the temporary mask which was given to
the sigsuspend syscall)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16141
2016-11-19 14:54:44 +00:00
Philippe Waroquiers
4e139bdead Fix Bug 372600 - process loops forever when fatal signals are arriving quickly
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16140
2016-11-19 13:51:41 +00:00
Philippe Waroquiers
39c197ef4d Improve the outer/inner setup: have the outer reporting the inner guest stacktrace
Note: the outer now unconditionally report the inner guest stacktrace.
If that would be a problem, we might add a sim-hint no-inner-guest-stacktrace
to optionally disable such outer behaviour.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16139
2016-11-19 13:24:13 +00:00
Philippe Waroquiers
471900460d Add typedef Alloc_Fn_t/Free_Fn_t in pub_tool_basics.h, use them everywhere
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16138
2016-11-18 21:54:09 +00:00
Philippe Waroquiers
8ec0762735 Activate perf tests on arm64
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16137
2016-11-13 11:13:48 +00:00
Philippe Waroquiers
7646bee8ed Fix sym name cache: handles the difference between text and data, + match in symbol
* sym name cache to cache the 'isText' characteristic of the cached sym_name
* implement the match anywhere also in the cache
Not handling matchAnywhere has bad performance effect on callgrind, as almost many
IPs were considered as a fn entry, while they were not.
* use the same convention to name the findText argument



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16136
2016-11-12 22:55:35 +00:00
Philippe Waroquiers
5a340ec0c6 When --show-below-main=no, search main from the outermost stackframe
* main is more likely to be an outermost frame rather than an innermost
  frame. So, searching from the outermost frame will more quickly find it.

* Also, in case the stacktrace contains twice the main functionn, this
  ensures we only removes the functions below the outermost main.
  Having 2 mains in a stacktrace does not happen normally.
  However, this prepares for some future commit that improves
  the outer/inner setup: the outer will append the inner guest stack trace.
  The inner stack trace sometimes already contains main.
  Searching from outermost frame main allows to keep the interesting
  part of the stacktrace.
  


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16135
2016-11-12 20:11:25 +00:00
Mark Wielaard
2fb506df7a Cleanup none/tests/nocwd.vgtest tmp dirs.
The none/tests/nocwd creates a really deep temporary directory structure
that is also inaccessible after the test. This causes issues with some
build wrappers like koji which fail to cleanup such deep subdirectories.
So explicitly cleanup the directory after the test.

https://bugzilla.redhat.com/show_bug.cgi?id=1390282

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16134
2016-11-12 19:51:51 +00:00
Philippe Waroquiers
ec6077e25a Outer/inner setup : allow append to outer args, use a bigger --num-callers
* Similarly to what was done in revision r16104 for vg_perf, have a way
  to append to predefined vg_regtest outer args, rather than only be able
  to replace them.
* increase the num callers for outer tool to 40.
  (This is in preparation of a future commit, that will allow outer tool
  to append the inner guest stack trace to reported errors in the inner)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16133
2016-11-12 11:22:50 +00:00
Ivo Raisr
c6620c6eea Provide a paragraph about Solaris agent thread in advanced concepts
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16132
2016-11-12 09:09:29 +00:00
Philippe Waroquiers
3be4b5ba1c Update documentation and NEWS for xtree concept.
Final patch of the xtree serie, which provides the documentation.

The xtree concept was committed in the revisions
16120 : Support pool of unique string in pub_tool_deduppoolalloc.h
16121 : Implement a cache 'address -> symbol name' in m_debuginfo.c
16122 : Add VG_(strIsMemberXA) in pub_tool_xarray.h
16123 : Addition of the pub_tool_xtree.h and pub_tool_xtmemory.h modules, and of the --xtree-memory* options
16124 : Addition of the options --xtree-memory and --xtree-memory-file
16125 : Small changes in callgrind_annotate and callgrind manual
16126 : Locally define vgPlain_scrcmp in 2 unit tests
16127 : Support for xtree memory profiling and xtmemory gdbsrv monitor command in helgrind
16128 : Support for xtree memory profiling and xtmemory gdbsrv monitor command in memcheck
16129 : Update massif implementation to xtree

Some smaller follow-up patches to be expected to add some regtests,
and refine documentation.

Thanks to Ivo, Julian and Josef for the review comments.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16131
2016-11-11 15:11:49 +00:00
Ivo Raisr
7a3b6b860f Provide Solaris specifics in coregrind/m_gdbserver/README_DEVELOPERS
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16130
2016-11-11 14:47:33 +00:00
Philippe Waroquiers
e2edc5eb81 Update massif implementation to xtree
* update massif code so as to replace the massif specific XTree implementation
  by calls to pub_tool_xtree.h
  This improves the massif performance in CPU (a few percents to a factor
   2 gained, depending on the implementation). The memory use is also
   decreased.
  With this patch, massif behaves similarly to the previous implementation.
  The differences are:
     * some massif stats output have changed, as the new implementation
       differs completely from the previous one.
     * when 2 'branches' of the call tree have consumed the same amount
       of  heap, the order in which the branches are output in the massif
       output file can differ between the old and new implementation.
  No other functional difference is expected, waiting for new bugs to
  be discovered.
  
* Also add support for xtree memory profiling and xtmemory gdbsrv monitor
  command in massif :
  * massif will produce xtree memory profiling according to the options
    --xtree-memory.
  * addition of the xtmemory gdbserver monitor command.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16129
2016-11-11 14:44:42 +00:00
Philippe Waroquiers
b10e381272 Support for xtree memory profiling and xtmemory gdbsrv monitor command in memcheck
* memcheck will produce xtree memory profiling according to the options
  --xtree-memory.
* addition of the xtmemory gdbserver monitor command.

(this is the second real xtree functional difference)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16128
2016-11-11 14:36:36 +00:00
Philippe Waroquiers
8c86667f1a Support for xtree memory profiling and xtmemory gdbsrv monitor command in helgrind
* helgrind will produce xtree memory profiling according to the options
  --xtree-memory.
* addition of the xtmemory gdbserver monitor command.

(this is the first real xtree functional difference)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16127
2016-11-11 14:33:27 +00:00
Philippe Waroquiers
aa630a3169 Locally define vgPlain_scrcmp in 2 unit tests
Humph, this should have been part of :
   16122 Add VG_(strIsMemberXA) in pub_tool_xarray.h
which means that between 16122 and this revision, these 2 unit tests
will (very probably) not compile.
That will make bissect not easy :(


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16126
2016-11-11 14:26:54 +00:00
Philippe Waroquiers
48d506364c Small changes in callgrind_annotate and callgrind manual
* callgrind_annotate: ignore the lines giving the long names of the
  events: such lines are used by kcachegrind for the GUI, so are better
  accepted (and ignored) by callgrind_annotate
* Document in callgrind_annotate manual that thresholds can be given
  per event kind.
* Avoid a division by zero in callgrind_annotate, for 'special data'
  such as produced by (some) xtrees.
  


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16125
2016-11-11 14:22:34 +00:00
Philippe Waroquiers
907b31a9e0 Addition of the options --xtree-memory and --xtree-memory-file
Option is added, parsed, explained in --help
but is not used yet by any other code.
So, apart of the --help, no functional effect.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16124
2016-11-11 14:15:45 +00:00
Philippe Waroquiers
f9386afa89 Addition of the pub_tool_xtree.h and pub_tool_xtmemory.h modules, and of the --xtree-memory* options
This commit is the bulk of the new code.
There is however no functional impact yet : the new modules are not used by anybody.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16123
2016-11-11 14:07:03 +00:00
Philippe Waroquiers
b86956b6b9 Add VG_(strIsMemberXA) in pub_tool_xarray.h
This allows to search more efficiently a string in an xarray of string.
(support work for xtree)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16122
2016-11-11 13:55:07 +00:00
Philippe Waroquiers
72160b3fef Implement a cache 'address -> symbol name' in m_debuginfo.c
Support work for xtree: as xtree implementation makes a high
nr of calls to get_sym_name, this cache improves the performance
as usually, stacktraces are repeatitively querying the same
addresses.
The cache follows the same principle as the cfsi_m_cache.
In particular, cache is cleared together with the cfsi_m cache.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16121
2016-11-11 13:38:18 +00:00
Philippe Waroquiers
599a062f61 Support pool of unique string in pub_tool_deduppoolalloc.h
This is support code for the xtree implementation.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16120
2016-11-11 13:30:08 +00:00
Carl Love
63a7168c14 Fix xxsel parsing error
VEX commit 3284 listed Bugzilla 148000 which is incorrect.

Tweeked comments so the file VEX/priv/guest_ppc_toIR.c can be committed again.
VEX commit 3285.

Bugzilla is 372185.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16119
2016-11-07 20:01:47 +00:00
Mark Wielaard
696a45f8c9 Bug #372120 - c++ demangler demangles symbols which are not c++.
Explicitly check that the symbol starts with "_Z" to only demangle
modern style (gnu_v3) mangled C++ (and Rust) symbols.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16118
2016-11-07 14:24:26 +00:00
Petar Jovanovic
464c172041 mips: Add redir for index function in ld.so.1
Redirect index function in ld.so.1.
Optimize the existing strlen function implementations.
This removes warnings coming from optimized index and strlen functions
in ld.so.1.

Patch by Aleksandar Rikalo.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16117
2016-11-04 18:21:22 +00:00
Rhys Kidd
ccc8f80b4f Fix compile error on macOS introduced in r16111. n-i-bz.
m_syswrap/syswrap-generic.c:4148:26: error: use of undeclared identifier 'PID_EXEPATH'
      VG_(sprintf)(name, PID_EXEPATH, VG_(getpid)());
                         ^
m_syswrap/syswrap-generic.c:4150:56: error: use of undeclared identifier 'SELF_EXEPATH'
          && (VG_STREQ(arg1s, name) || VG_STREQ(arg1s, SELF_EXEPATH))) {
                                                       ^
m_syswrap/syswrap-generic.c:4150:56: error: use of undeclared identifier 'SELF_EXEPATH'
m_syswrap/syswrap-generic.c:4151:29: error: use of undeclared identifier 'SELF_EXEFD'
         VG_(sprintf)(name, SELF_EXEFD, VG_(cl_exec_fd));
                            ^

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16116
2016-11-04 03:43:28 +00:00
Julian Seward
4aefde3b13 Add demangling support for Rust symbols. Derived from a patch by
David Tolnay <dtolnay@gmail.com>.  n-i-bz.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16115
2016-11-03 10:50:42 +00:00