10852 Commits

Author SHA1 Message Date
Florian Krohm
e15ffd7c60 No need to write the offset into a buffer when that
buffer is not used.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14198
2014-07-27 14:46:52 +00:00
Florian Krohm
1d58be2780 glibc 2.3.4 does not appear to define PTRACE_GETSIGINFO. This was
observed on a RHEL5 system on s390. Provide a suitable definition.
Tweak gdbserver_tests/filter_stderr to ignore messages related to
interrupted poll system calls.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14197
2014-07-27 12:24:46 +00:00
Florian Krohm
6b68ff1bdf Remove two unneded include files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14196
2014-07-26 17:26:22 +00:00
Florian Krohm
cc7bc87712 Fix a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14195
2014-07-26 14:51:28 +00:00
Florian Krohm
5866bd2a56 Adapt testcase so it can be compiled with GCC 3.4.6.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14194
2014-07-26 11:36:50 +00:00
Florian Krohm
282aac6b09 Adapt testcase so it can be compiled with GCC 3.4.6 against glibc 2.3.4
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14193
2014-07-26 11:10:30 +00:00
Philippe Waroquiers
151d27b101 Have m_addrinfo.c giving more details about an address in a text segment
(using a fake 'one address' stack trace).

This a.o. can be used with the gdbsrv 'monitor v.info location 0x.....'
to compare gdb and valgrind address to source mapping.

Any tool that use pub_tool_addrinfo.h will also better descrive
text addresses.

No impact on tests, as there is no test testing 'segment' address
description :(



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14192
2014-07-25 20:46:01 +00:00
Florian Krohm
dbeb165518 Add LIKELY as suggested by Philippe.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14191
2014-07-25 08:38:02 +00:00
Philippe Waroquiers
9a5cacfa97 Small follow up to lock address description: now that we describe
lock address, we can print something even if the lock observation
has no stacktrace.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14190
2014-07-24 22:30:08 +00:00
Florian Krohm
1b15a83afa Remove an unneeded function call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14189
2014-07-24 21:14:52 +00:00
Philippe Waroquiers
682b5ddd63 Describe the lock address in a lock announcement message.
(note that some error messages are not announcing the lock,
which is not that nice).
At least the lock order violation message do not announce locks.
That should be improved/fixed



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14188
2014-07-24 21:00:24 +00:00
Florian Krohm
7a00b0cb5b Update a comment so it won't need updating in the future.
No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14187
2014-07-24 19:26:32 +00:00
Florian Krohm
e402f69a09 Change VG_(strncpy_safely) to use VG_(strncpy) to get the same padding
behaviour. 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14186
2014-07-24 12:50:03 +00:00
Florian Krohm
3b541640b8 Factor out VG_(exit_now) to contain the syscall incantation to terminate
the process. Make ML_(am_exit) and VG_(exit) use it, thereby avoiding 
double maintenance.
Introduce libcbase_assert macro and use it in VG_(strncpy_safely) to 
document the case that function cannot handle.
Add stub functions to memcheck/tests/unit_libcbase.c to satisfy new
dependencies.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14185
2014-07-24 12:46:28 +00:00
Julian Seward
e05579cd67 Track vex r2910 (infrastructural improvements in representation of
endianness in VEX).

In short: in m_machine.c, VG_(machine_get_hwcaps), get the endianness
of the host, and pass it through to all places (in VEX) where it is
required.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14184
2014-07-24 12:45:24 +00:00
Philippe Waroquiers
cb1d628c6a optimise readpdb.c filename and dirname handling, following r14158
r14158 introduced a dedup pool to store pairs (filename,dirname).
The windows debug info reader (readpdb.c) performance was still to be 
improved, as calls to ML_(addFnDn) were done for each line loc to add.

With this patch, the nr of calls to ML_(addFnDn) should be reduced
significantly.

Code has been compiled and regtested on linux, but no windows/wine test
was done.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14183
2014-07-23 20:28:11 +00:00
Tom Hughes
ea9b0ccd7d Document fix of BZ#315199.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14182
2014-07-23 07:54:41 +00:00
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