Commit Graph

10835 Commits

Author SHA1 Message Date
Tom Hughes
e73f9eaa9f Output details for the faulting thread first in a core dump.
Patch from Matthias Schwarzott via BZ#315199.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14181
2014-07-23 07:54:19 +00:00
Julian Seward
ef338c8739 Enable test cases for:
{sqdmlal,sqdmlsl,sqdmull}{d_s_s[],s_h_h[]}
{sqdmlal,sqdmlsl,sqdmull}{d_s_s,s_h_h}
{sqdmlal,sqdmlsl,sqdmull}{2d_(2s_2s)/(4s_4s), 4s_(4h_4h)/(8h_8h)}
sqrdmulh 4s,2s,8h,4h (vector)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14180
2014-07-22 09:28:52 +00:00
Philippe Waroquiers
6629c56543 Add a new heuristic 'length64' to detect interior pointers
pointing at offset 64bit of a block, when the first 8 bytes contains
the block size - 8. This is e.g. used by sqlite3MemMalloc.

Patch by Matthias Schwarzott (with small modif)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14179
2014-07-21 19:55:11 +00:00
Julian Seward
52dbd5df85 Track vex r2907, which amongst other things, renamed Iop_QDMulLong* to
Iop_QDMull*.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14178
2014-07-21 09:21:57 +00:00
Julian Seward
be6732dc77 Enable tests for: sqneg, {u,s}q{add,sub} (scalar),
{sqdmlal,sqdmlsl,sqdmull} (vector x element).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14177
2014-07-21 09:20:53 +00:00
Mark Wielaard
22bbeba086 Add configure check for arm64 user_regs_struct.
old glibc defined kernel user_pt_regs, but newer glibc instead
define user_regs_struct. Add a configure test to see what we need.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14176
2014-07-18 20:45:37 +00:00
Philippe Waroquiers
ef4e827246 Patch adding (or showing the proper/not confusing) helgrind thread nr for block
and stack address description.

* A race condition on an allocated block shows the stacktrace, but
  does not show the thread # that allocated the block.
  This patch adds the output of the thread # that allocated the block.

*  The patch also fixes the confusion that might appear between
  the core threadid and the helgrind thread nr in Stack address description:
  A printed stack addrinfo was containing a thread id, while all other helgrind
  messages are using (supposed to use) an 'helgrind thread #' which
  is used in the thread announcement.

    Basically, the idea is to let a tool set a "tool specific thread nr'
    in an addrinfo.
    The pretty printing of the addrinfo is then by preference showing this
    thread nr (if it was set, i.e. different of 0).
    Currently, only helgrind uses this addrinfo tnr.

    Note: in xml mode, the output is matching the protocol description.
    I.e., GUI should not be impacted by this change, if they properly implement
    the xml protocol.


* Also, make the output produced by m_addrinfo consistent:
  The  message 'block was alloc'd at'  is changed to be like all other
  output : one character indent, and starting with an uppercase



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14175
2014-07-18 00:03:58 +00:00
Philippe Waroquiers
2e2cea2af6 Simplify the code to get the function entry + avoids too many casts
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14174
2014-07-17 21:23:09 +00:00
Mark Wielaard
93ad03c5bb Omit frame pointer also for main in ppc ldst_multiple test.
Other functions already explicitly omitted the frame pointer. Also
do that for main to prevent gcc 4.8.2 complaining:

 ldst_multiple.c: In function ‘main’:
 ldst_multiple.c:180:5: error: frame pointer required, but reserved
  int main(void)
      ^
 ldst_multiple.c:31:18: note: for ‘r31’
  register HWord_t r31 asm("r31");

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14173
2014-07-17 13:29:43 +00:00
Mark Wielaard
c07cc50ab1 ppc64 ifunc_wrapper add casts suggested by gcc warning.
vg_preloaded.c: In function ‘_vgnU_ifunc_wrapper’:
vg_preloaded.c:91:13: warning: assignment makes integer from pointer without a cast [enabled by default]

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14172
2014-07-17 10:56:26 +00:00
Philippe Waroquiers
e8fa6306ad Unbreak ppc32 compilation (remove last usage of host_ppc32_regalign_int64_args)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14171
2014-07-17 05:22:06 +00:00
Philippe Waroquiers
44cc7cb053 Fix name of the file in the header comment
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14170
2014-07-16 21:16:10 +00:00
Florian Krohm
a3989a1fd9 Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14169
2014-07-16 08:20:54 +00:00
Florian Krohm
53785bf372 Add testcase from BZ #324149 which was forgotten in r13641.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14168
2014-07-16 08:18:17 +00:00
Mark Wielaard
c8e8680376 Fix pointer qualifier discard warnings in memcheck/tests/varinforestrict.c.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14167
2014-07-15 21:55:53 +00:00
Philippe Waroquiers
a6ffc04b1c produce cfsi and str dedup pa at the same verbosity level
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14166
2014-07-15 19:46:15 +00:00
Mark Wielaard
91c93d3896 Bug 336619 valgrind --read-var-info=yes doesn't handle DW_TAG_restrict_type.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14165
2014-07-15 15:47:25 +00:00
Julian Seward
b8805a006b arm64: get_Dwarf_Reg: at least handle the case of requesting XSP
instead of failing.  This makes some of the memcheck/tests/varinfo*
tests work somewhat correctly on arm64-linux.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14164
2014-07-15 15:22:41 +00:00
Mark Wielaard
03eb8f43a7 Bug 337094 ifunc wrapper is broken on ppc64.
ppc64 uses function descriptors, so we need to get the actual function
entry address for the VG_USERREQ__ADD_IFUNC_TARGET client request, but
we need to return the function descriptor itself from the ifunc_wrapper.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14163
2014-07-15 15:07:01 +00:00
Julian Seward
c7447dcad0 add test cases for "LD1/ST1 (multiple 1-elem structs to/from 2 regs,
post index)" (16b only)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14162
2014-07-15 11:09:51 +00:00
Philippe Waroquiers
2a49250682 Small fixes in 'getting started' section of user manual
* Mention --read-inline-info=yes as an alternative to compile without inlining.

* Mention that stabs debuginfo reader is not working anymore since 3.9.0



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14160
2014-07-14 22:04:17 +00:00
Philippe Waroquiers
2b1ae38fe1 Slightly refined the NEWS entry for silly/fishy args
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14159
2014-07-14 21:39:11 +00:00
Philippe Waroquiers
c99e3af927 This patch decreases significantly the memory needed to store the lineloc info.
On a big executable, the trunk needs:
dinfo: 134873088/71438336  max/curr mmap'd, 134607808/66717872 max/curr

With the patch, we have:
dinfo: 99065856/56836096  max/curr mmap'd,   97883776/51663656 max/curr

So, peak dinfo memory decreases by about 36Mb, and final by 15Mb.

(for info, valgrind 3.9.0 uses
dinfo: 158941184/109666304  max/curr mmap'd, 156775944/107590656 max/curr
So, compared to 3.9.0, dinfo peak decreases by about 40%, and the final
memory is divided by more than 2).

The memory decrease is obtained by:

* using a dedup pool to store filename/dirname pair for the loctab source/line
  information.
  As typically, there is not a lot of such pairs, typically a UShort is
  good enough to identify a fn/dn pair in a dedup pool.
  To avoid losing memory due to alignment, the fndn indexes are stored
  in a "parallel" array to the DiLoc loctab array, with entries having
  1, or 2 or 4 bytes according to the nr of fn/dn pairs in the dedup pool.
  See priv_storage.h comments for details.

  (there was a extensible WordArray local implementation in readdwarf.c.
   As with this change, we use an xarray, the local implementation was
   removed).

* the memory needed for --read-inline-info is slightly decreased (-2Mb)
  by removing the (unused) dirname from the DiInlLoc struct.
  Handling dirname for inlined function caller implies to rework
  the dwarf3 parser read_filename_table common to the var and inlinfo parser.
  Waiting for this to be done, the dirname component is removed from DiInlLoc.

* the stabs reader (readstabs.c) is broken since 3.9.0. 
  For this change, the code has been updated to make it compile with the new
  DiLoc/FnDn dedup pool. As the code is completely broken, a vg_assert(0)
  has been put at the begin of the stabs reader.

* the pdb reader (readpdb.c) has been trivially updated and should still work.
  It has not been tested (how do we test this ?).
  A follow-up patch will be done to avoid doing too many calls to
  ML_(addFnDn) : instead of having one call per ML_(addLineInfo), one
  should have a single call done when reading the filename table.

This has also be tested in an outer/inner setup, to verify no
memory leak/bugs.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14158
2014-07-14 21:20:57 +00:00
Florian Krohm
0e951964ef Provide a back trace when a function argument of a known allocation
function is presumably negative. Fixes BZ 79311.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14157
2014-07-13 14:41:55 +00:00
Bart Van Assche
a7401620ad drd/tests/std_thread*: Add a workaround for an Ubuntu 14.04 gcc bug
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14156
2014-07-12 09:30:14 +00:00
Florian Krohm
e54abd4ed8 Track vex r2891 (add Iop_Reverse1sIn8_x16). Unbreak build.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14155
2014-07-11 21:54:33 +00:00
Florian Krohm
aef15e280d Announce fix for BZ #336957
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14154
2014-07-11 21:32:23 +00:00
Florian Krohm
6df4131600 Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14153
2014-07-11 20:48:30 +00:00
Julian Seward
5a254c7950 arm64: enable test cases for:
{sli,sri} (vector & scalar), sqabs (vector & scalar)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14152
2014-07-11 12:06:24 +00:00
Tom Hughes
90f471b945 Move DRM ioctl handlers to the right places. Fixes r13486 breakage.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14151
2014-07-10 14:56:48 +00:00
Tom Hughes
ceb1ad640a Add support for the F_OFD_SETLK, F_OFD_SETLKW, and F_OFD_GETLK fcntl
commands. BZ#337285.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14150
2014-07-10 14:50:06 +00:00
Tom Hughes
82ec0b5d43 Add support for the F_OFD_SETLK, F_OFD_SETLKW, and F_OFD_GETLK fcntl
commands. BZ#337285.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14149
2014-07-10 14:48:00 +00:00
Julian Seward
26296e07c9 Enable test cases for: shll #imm, shrn #imm, rshrn #imm,
{smlal,umlal,smlsl,umlsl,smull,umull} (elem)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14148
2014-07-10 14:23:16 +00:00
Philippe Waroquiers
0f410627f6 Rollback the (functional) effect of 13944 and 14134
Re-opening the FIFO before closing it gives (difficult to understand)
problems => rollback the change that keeps the FIFO opened.
Rather handle the race condition by retrying at vgdb side.
See extensive comments in remote-utils.c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14147
2014-07-08 22:28:26 +00:00
Philippe Waroquiers
076f1c0157 Apply text_debug_bias to inline IP extracted from dwarf3
Without this biasing, inline info is not correct for shared objects.
Updated test varinfo5 to use --read-inline-info=yes and added
an inline test case. 
Note: the varinfo reader does not understand the inlining info, and
so variables in inlined functions are not properly described.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14146
2014-07-08 18:56:47 +00:00
Julian Seward
9da76f2345 Add a 32-bit-process only suppression, for OSX 10.8. Equivalent to
that of r14142 for 10.9.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14145
2014-07-08 16:59:02 +00:00
Julian Seward
0e16747b71 Change the default setting --partial-loads-ok from "no" to "yes"
for Mac OS only.  All other targets remain at "no".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14144
2014-07-08 09:36:06 +00:00
Julian Seward
2a7a6345ba OSX 10.8/10.9: remove warning message.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14143
2014-07-08 08:18:55 +00:00
Julian Seward
7c9d322917 Add a 32-bit-process-only suppression.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14142
2014-07-08 08:10:14 +00:00
Julian Seward
c8e61f0aa4 Make sanity check errors before/after syscalls be fatal.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14141
2014-07-08 08:05:02 +00:00
Julian Seward
6a142998c6 Accuracy improvements to syscall wrappers for OSX 10.8 and 10.9.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14140
2014-07-08 08:04:25 +00:00
Julian Seward
1ffd6d9b6e OSX 10.9/10.8: Debuginfo reading FSM: enable recording of r-- mappings
so as to enable arrival at acceptance states via calls to
VG_(di_notify_vm_protect).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14139
2014-07-08 07:55:44 +00:00
Julian Seward
ff80e8f74f Improve debug printing for the should-we-load-debuginfo-now? finite
state machine.  No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14138
2014-07-08 07:50:19 +00:00
Julian Seward
79fc99191b Darwin only: don't tell aspacemgr about the kernel commpage -- only
tell the tool.  This is because telling the aspacemgr about it causes
the sync checker to fail entirely on Darwin.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14137
2014-07-08 07:44:07 +00:00
Julian Seward
e9fa7e1483 Add -Wno-tautological-compare to the standard compile flags, if that
is accepted.  With XCode 5.5.1 -Wtautological-compare appears to come
as standard, and it generates a lot of mostly useless noise.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14136
2014-07-08 07:40:56 +00:00
Philippe Waroquiers
4dac969352 Mark inline get function in image.c
(called very often, and has a fast/slow case)
This slightly improve the performance of reading the image.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14135
2014-07-06 18:35:18 +00:00
Philippe Waroquiers
be2e8b2a80 Follow up to rev 13944
13944 objective was to avoid having a vgdb that connects to a just forked child
that would have the FIFO still opened, while its parent would close it.

However, in case a previous vgdb closed the FIFO, the read FIFO in the parent
is put in 'eof status' by the kernel. So, readchar will then return eof
in the parent unless another vgdb re-opens the FIFO in write.
So, gdbsrv does not stop anymore on error if needed, due to this readchar
giving eof.

The only way to reset this eof condition is to close the fd.
But we must always have the FIFO open (to avoid the race condition that
rev 13944 fixed) 
=> in case of error, first re-open the FIFO, before closing the (previous)
FIFO fd (which is in eof state and cannot be properly used anymore).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14134
2014-07-05 18:43:24 +00:00
Philippe Waroquiers
2c502a3da6 Replace copy/pasted loop of the "range search" by doing a -1 in the loop
for the "equal" case.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14133
2014-07-05 18:37:38 +00:00
Philippe Waroquiers
e37b530896 Small fixes/improvements post-cfsi_m improvement
* Avoid printing the size of a null dedup pool
* Avoid warnings of 2 unused variables on some platforms


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14132
2014-07-05 14:07:43 +00:00
Bart Van Assche
947b85111a NEWS: Mention #336772, --default-suppressions and the std::thread update in the drd manual
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14131
2014-07-05 06:52:48 +00:00