852 Commits

Author SHA1 Message Date
Tom Hughes
5f4dbbeb75 Add support for the SG_IO ioctl.
Patch from Daniel Kamil Kozar via BZ#333817.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14107
2014-06-26 11:29:05 +00:00
Tom Hughes
ba3d08c7a7 Handle the CDROM_DISC_STATUS ioctl.
Patch from Daniel Kamil Kozar via BZ#333788.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14106
2014-06-26 11:11:56 +00:00
Tom Hughes
d2201dd27f Remove bug closed by reporter
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14105
2014-06-26 11:07:42 +00:00
Tom Hughes
8c9c829f4c Add support for TIOCNOTTY ioctl. BZ#331476.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14104
2014-06-26 11:03:32 +00:00
Florian Krohm
a4923d3057 Suppress a clang warning about an uninitialised variable.
Fixes BZ #329694.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14092
2014-06-24 11:35:45 +00:00
Bart Van Assche
9214c37d49 Rename --defaultsupp into --default-suppressions as requested by Julian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14090
2014-06-24 05:08:21 +00:00
Florian Krohm
8f46d5fb35 BZ 330257 has been fixed in r14055.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14088
2014-06-23 19:43:32 +00:00
Bart Van Assche
4b6bd7b0fc core: Add command-line option --defaultsupp
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14080
2014-06-22 10:11:59 +00:00
Florian Krohm
31caca50d5 ms_print ought to create temporary files in a proper directory as
specified with --with-tmpdir at configuration time or with TMPDIR
at runtime. Doing so fixes the symptom reported in BZ #332765.
Also fix an incorrect error message.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14077
2014-06-21 20:25:30 +00:00
Philippe Waroquiers
ceaa5b2efe This patch implements the support needed for stacktraces
showing inlined function calls.
See 278972 valgrind stacktraces and suppression do not handle inlined function call debuginfo

Reading the inlined dwarf call info is activated using the new clo
  --read-inline-info=yes
Default is currently no but an objective is to optimise the performance
and memory in order to possibly set it on by default.
(see below discussion about performances).

Basically, the patch provides the following pieces:
1. Implement a new dwarf3 reader that reads the inlined call info
2. Some performance improvements done for this new parser, and
   on some common code between the new parser and the var info parser.
3. Use the parsed inlined info to produce stacktrace showing inlined calls
4. Use the parsed inlined info in the suppression matching and suppression generation
5. and of course, some reg tests

1. new dwarf3 reader:
---------------------
Two options were possible: add the reading of the inlined info
in the current var info dwarf reader, or add a 2nd reader.
The 2nd approach was preferred, for the following reasons:
The var info reader is slow, memory hungry and quite complex.
Having a separate parsing phase for the inlined information
is simpler/faster when just reading the inlined info.
Possibly, a single parser would be faster when using both
--read-var-info=yes and --read-inline-info=yes.
However, var-info being extremely memory/cpu hungry, it is unlikely
to be used often, and having a separate parsing for inlined info
does in any case make not much difference.
(--read-var-info=yes is also now less interesting thanks to commit
r13991, which provides a fast and low memory "reasonable" location
for an address).

The inlined info parser reads the dwarf info to make calls
to priv_storage.h ML_(addInlInfo).

2. performance optimisations
----------------------------
* the abbrev cache has been improved in revision r14035.
* The new parser skips the non interesting DIEs
  (the var-info parser has no logic to skip uninteresting DIEs).
* Some other minor perf optimisation here and there.
In total now, on a big executable, 15 seconds CPU are needed to
create the inlined info (on my slow x86 pentium).

With regards to memory, the dinfo arena:
with inlined info: 172281856/121085952  max/curr mmap'd
without          : 157892608/106721280  max/curr mmap'd,
So, basically, inlined information costs about 15Mb of memory for
my big executable (compared to first version of the patch, this is
already using less memory, thanks to the strpool deduppoolalloc.
The needed memory can probably be decreased somewhat more.

3. produce better stack traces
------------------------------
VG_(describe_IP) has a new argument InlIPCursor *iipc which allows
to describe inlined function calls by doing repetitive calls 
to describe_IP. See pub_tool_debuginfo.h for a description.

4. suppression generation and matching
--------------------------------------
* suppression generation now also uses an InlIPCursor *iipc
  to generate a line for each inlined fn call.

* suppression matching: to allow suppression matching to
match one IP to several function calls in a suppression entry,
the 'inputCompleter' object (that allows to lazily generate
function or object names for a stacktrace when matching 
an error with a suppression) has been generalised a little bit
more to also lazily generate the input sequence.
VG_(generic_match) has been updated so as to be more generic
with respect to the input completer : when providing an
input completer, VG_(generic_match) does not need anymore
to produce/compute any input itself : this is all delegated
to the input completer.

5. various regtests
-------------------
to test stack traces with inlined calls, and suppressions
of (some of) these errors using inlined fn calls matching.


Work still to do:
-----------------
* improve parsing performance
* improve the memory overhead.
* handling the directory name for files of the inlined function calls is not yet done.
  (probably implies to refactor some code)
* see if m_errormgr.c *offsets arrays cannot be managed via xarray



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14036
2014-06-15 15:42:20 +00:00
Julian Seward
e32c76a6c2 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14020
2014-06-10 12:05:33 +00:00
Dejan Jevtic
f1b4547420 mips64: Tests for Cavium MIPS Octeon Atomic and Count Instructions.
Tests for instructions:
baddu, pop, dpop, saa, saad, laa, laad, lai, laid, lad, ladd, law, lawd,
las, lasd, lac, lacd


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13994
2014-06-04 11:36:21 +00:00
Julian Seward
3c4d0c9ee7 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13992
2014-06-01 17:46:18 +00:00
Julian Seward
32adfb9026 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13989
2014-05-21 20:23:43 +00:00
Philippe Waroquiers
ab71852280 Fix 334788 clarify doc about --log-file initial program directory
Behaviour is kept unchanged, a paragraph is added in the doc to
clarify.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13979
2014-05-17 05:50:46 +00:00
Julian Seward
b0e2fd66e4 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13973
2014-05-16 12:22:50 +00:00
Philippe Waroquiers
183b978d08 Factorises the address code description and printing
of memcheck and helgrind in a common module:
  pub_tool_addrinfo.h pub_core_addrinfo.h m_addrinfo.c

At the same time, the factorised code is made usable by other
tools also (and is used by the gdbserver command 'v.info location'
which replaces the helgrind 'describe addr' introduced 1 week ago
and which is now callable by all tools).

The new address description code can describe more addresses
(e.g. for memcheck, if the block is not on the free list anymore,
but is in an arena free list, this will also be described).

Similarly, helgrind address description can now describe more addresses
when --read-var-info=no is given (e.g. global symbols are
described, or addresses on the stack are described as
being on the stack, freed blocks in the arena free list are
described, ...).
See e.g. the change in helgrind/tests/annotate_rwlock.stderr.exp
or locked_vs_unlocked2.stderr.exp

The patch touches many files, but is basically a lot of improvements
in helgrind output files.
The code changes are mostly refactorisation of existing code.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13965
2014-05-14 20:39:27 +00:00
Julian Seward
cdce5974bf Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13964
2014-05-14 13:29:04 +00:00
Julian Seward
c4d3b61787 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13954
2014-05-13 09:28:19 +00:00
Julian Seward
2c2bee19b1 3_9_BUGSTATUS.txt: looked at all bugs in the file. Moved fixed ones
to NEWS (if not already there).  Put the rest of them into a set of
categories depending on which part of the code base is affected, which
divides them up into -- IMO -- much more managable groups.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13951
2014-05-09 16:13:21 +00:00
Mark Wielaard
895f25f4a2 Add uninstall-local rules to make distcheck happy.
Also remove generated FAQ.txt in docs distclean-local rule.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13950
2014-05-09 14:25:39 +00:00
Julian Seward
9760f54be8 Update bug list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13947
2014-05-09 11:24:50 +00:00
Philippe Waroquiers
9bd0d72eb9 Helgrind : two new gdbserver commands 'describe address' and 'info locks'
- Helgrind GDB server monitor command 'describe <address>'
    allowing to describe an address (e.g. where it was allocated).
  - Helgrind GDB server monitor command 'info locks' giving
    the list of locks, their location, and their status.

In a further patch, it is intended to
  1. factorise the describe address code between memcheck and helgrind
  2. generalise the describe address gdbsrv command so as to make
     it usable for all tools.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13930
2014-05-03 11:12:50 +00:00
Philippe Waroquiers
d8b376f404 Fix/improve user manual and man page derived from it.
The current manual and man page tells:
      --tool=<toolname> [default: memcheck]
           Run the Valgrind tool called toolname, e.g. Memcheck, Cachegrind, etc.

where the toolname examples do not list all the tools, and use uppercase
first letter, which is not understood.

So, use lower case, and give the list of all known tools.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13920
2014-04-30 20:23:47 +00:00
Philippe Waroquiers
9ba256ffb0 * New option --aspace-minaddr=<address> allows to (possibly) make
use of some more memory by decreasing the default value
  or solve some conflicts with system libraries by increasing the value.
  See user manual for details.

Note that the lowest accepted possible value is 0x1000, which is
the current value used by Macos in 32bits.
On linux, 0x10000 (64KB) seems to cause not much conflicts.

Default values are unchanged (i.e. are the same as when there
was no clo option).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13901
2014-04-20 14:20:37 +00:00
Philippe Waroquiers
8b7a52c4cb - The option "--vgdb-stop-at=event1,event2,..." allows the user
to ask GDB server to stop before program execution, at the end
  of the program execution and on Valgrind internal errors.

- A new monitor command "v.set hostvisibility" that allows GDB server
  to provide access to Valgrind internal host status/memory.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13900
2014-04-20 13:41:10 +00:00
Philippe Waroquiers
9cbab7ee2c Several improvements to (internal) statistics reporting about memory usage,
making it easier to understand the memory and/or oom situation.
No functional (user level) change.

* For --profile-heap=yes, sort the cost centers by decreasing size,
  so that the most relevant cost centers are closed to the arena
  total.

* factorise duplicated code calling a series of print stat functions

* VG_(show_sched_status)
    optionally show the host stacktrace
               the amount of valgrind stack used by each thread
               the exited threads

* various functions: update to add VG_(show_sched_status) new
  args, keeping the same info production as before.
 
* In case of out of memory situation detected by m_mallocfree.c,
  reports more information:
    valgrind and tool stats
    scheduler status (full information)

* gdbserver v.info scheduler :
    show full information.

The oom behaviour/reporting was tested using a small
program causing an OOM, and having several threads
(some terminated, some still active).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13897
2014-04-19 00:25:54 +00:00
Florian Krohm
65d93e4de3 Make SGCheck fail with a meaningful message on unsupported platforms.
Fixes BZ #325856.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13834
2014-02-22 22:03:09 +00:00
Petar Jovanovic
94787bcbe7 Removing fixed issue #326444 from the bug list
Issue #326444 has just been marked as fixed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13819
2014-02-19 16:59:57 +00:00
Florian Krohm
ba7e9e57e9 Remove those bugs that are already reported in NEWS as being
fixed and have a FIXED status in Bugzilla.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13818
2014-02-19 13:41:14 +00:00
Florian Krohm
bc1f32fb67 Fix BZ #327212. Check for absolute path name at the end of
expand_file_name -- not at the beginning.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13816
2014-02-19 11:16:00 +00:00
Julian Seward
5194dedac4 Create a list of all bugs reported after the 3.9.0 release
(I think).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13789
2014-02-05 14:00:16 +00:00
Julian Seward
0a13c57c35 Minor notes on arm64 register usages.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13773
2014-01-13 00:18:51 +00:00
Julian Seward
3f6d211236 Add support for ARMv8 AArch64 (the 64 bit ARM instruction set).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13770
2014-01-12 12:54:00 +00:00
Philippe Waroquiers
492a8ae2a2 Implement gdbsrv "v.info stats" command giving statistics for valgrind core + tools
* addition of VG_(needs_print_stats) in pub_tool_tooliface.h
* use the above in memcheck and helgrind
* output valgrind stats and calls print_stats in server.c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13760
2013-12-15 20:24:43 +00:00
Philippe Waroquiers
7d40b140ac Following svn r13758 (bug 328711), some further similar fixes,
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13759
2013-12-12 23:19:13 +00:00
Julian Seward
e2bff1c182 Merge the following revisions from 3_9_BRANCH to trunk:
r13682  Initial cut at 3.9.0 release notes.
r13683  Remove duplicate NEWS entries for 3.9.0.
r13689  Minor docs/NEWS fixes
r13690  Documentation updates for 3.9.0.
r13691  More documentation updates, re leak-checker changes
r13692  NEWS: Note increased max mem size.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13724
2013-11-29 23:08:28 +00:00
Julian Seward
acddb7f8b3 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13671
2013-10-22 14:46:55 +00:00
Philippe Waroquiers
4f7d2ae066 Two small wording fixes in manual
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13667
2013-10-20 17:12:16 +00:00
Julian Seward
dfaedbfa9f Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13660
2013-10-18 15:13:12 +00:00
Julian Seward
ab319a7e24 Followup to r13652 (make the translation cache size be command-line
controllable): reduce MAX_N_SECTORS to 24, speed up Sector
initialisation, wording tweaks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13655
2013-10-18 11:18:45 +00:00
Philippe Waroquiers
61b8b9617b Allow the user to dimension the translation cache
A previous commit had decreased to 6 (on android) and increased to 16
(other platforms) the nr of sectors in the translation cache.
This patch adds a command line option to let the user specify
the nr of sectors as e.g. 16 sectors might be a lot and cause
an out of memory for some workloads or might be too small for
huge executable or executables using a lot of shared libs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13652
2013-10-18 00:08:20 +00:00
Philippe Waroquiers
619be966db Allow tools to provide some statistics in suppression list produced at the end
Option -v outputs a list of used suppressions. This only gives
the nr of times a suppression was used.
For a leak search, this only gives the nr of loss records that
have been suppressed, but it does not give additional needed details
to understand more precisely what has been suppressed
(i.e. nr of blocks and nr of bytes).

=> Add in the tool interface update_extra_suppression_use and
print_extra_suppression_info functions to allow the tool to record
additioonal use statistics for a suppression. These statistics
can be done depending on the error (and its data) which is suppressed.

Use this in memcheck for the leak suppressions, to maintain and output
the nr of blocks and bytes suppressed by a suppression during
the last leak search.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13651
2013-10-17 22:10:41 +00:00
Julian Seward
94c1e6d109 Update bug status.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13585
2013-09-29 19:54:39 +00:00
Julian Seward
8e32b20d45 Update bug status.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13581
2013-09-29 09:59:50 +00:00
Julian Seward
b84c467aad Annotate some bug reports with comments about priority.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13578
2013-09-26 08:18:47 +00:00
Julian Seward
f306d747e9 More bug triage.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13572
2013-09-19 23:04:03 +00:00
Julian Seward
8e3ee671db Move some now-closed bugs into NEWS.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13564
2013-09-19 08:55:36 +00:00
Florian Krohm
dbc0ecfa9f Intercept prctl(PR_SET_NAME, name) and store the thread name so it
can be used in error messages. That should be helpful when debugging
multithreaded applications.
Patch by Matthias Schwarzott <zzam@gentoo.org> with some minor
modifications. Fixes BZ 322254.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13553
2013-09-16 17:08:50 +00:00
Julian Seward
b8a6f9deb9 Update bug status.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13543
2013-09-12 16:02:37 +00:00