History log of /external/valgrind/include/pub_tool_errormgr.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8e3fbb5cd8276a7d07d5712bc05f9b3376d81a6a 20-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Constify the tool interface.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14642 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
190bd525e890352277188025dbc2d7935b431499 01-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Followup to r13469. lineno has already been asserted to be != NULL.
No need to check it again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14413 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
0acd3cec1f94eeb8151475f062d708c9259f4888 01-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a comment. No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14408 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
c06f684badc0701961e68dbc206fbf1757f7fd68 31-Jul-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix dangling ref in m_errormgr.c + report all uninit fields in a syscall param

Some syscall verification code is allocating memory to generate
the string used to build an error, e.g. syswrap-generic.c verifying fields of
e.g socket addresses (pre_mem_read_sockaddr) or sendmsg/recvmsg args
(msghdr_foreachfield)

The allocated pointer was copied in the error created by VG_(maybe_record_error).

This was wrong for 2 reasons:
1. If the error is a new error, it is stored in a list of errors,
but the string memory was freed by pre_mem_read_sockaddr, msghdr_foreachfield, ...
This causes a dangling reference. Was at least visible when giving -v, which
re-prints all errors at the end of execution.
Probably this could have some consequences during run while generating new errors,
and comparing for equality with a recorded error having a dangling reference.
2. the same allocated string is re-used for each piece/field of the verified struct.
The code in mc_errors.c that checks that 2 errors are identical was then wrongly
considereing that 2 successive errors for 2 different fields for the same syscall
arg are identical, just because the error string happened to be produced at
the same address.
(it is believed that initially, the error string was assumed to be a static
string, which is not the case anymore, causing the above 2 problems).

Changes:
* The fix consists in duplicating in m_errormgr.c the given error string when
the error is recorded. In other words, the error string is now duplicated similarly
to the (optional) extra component of the error.

* memcheck/tests/linux/rfcomm.c test modified as now an error is reported
for each uninit field.

* socketaddr unknown family is also better reported (using sa_data field name,
rather than an empty field name.

* minor reformatting in m_errormgr.c, to be below 80 characters.

Some notes:
1. the string is only duplicated if the error is recorded
(ie. printed or the first time an error matches a suppression).
The string is not duplicated for duplicated errors or following errors
matching the first (suppressed) error.
The string is also not duplicated for 'unique errors' (that are printed
and then not recorded).
2. duplicating the string for each recorded error is not deemed to
use a lot of memory:
* error strings are usually NULL or short (often 10 bytes or so).
* we expect no program has a huge number of errors
If ever this string duplicate would be significant, having a DedupPoolAlloc
in m_errormgr.c for these strings would reduce this memory (as we expect to
have very few different strings, even with millions of errors).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14214 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
0f157ddb404bcde7815a1c5bf2d7e41c114f3d73 18-Oct-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates (20XY-2012 ==> 20XY-2013)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
2193a7c20b74867de85a5ac10e7db5c7038f7c8a 08-Dec-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix 284540 and 307465
284540 Memcheck shouldn't count suppressions matching still-reachable allocations
307465 --show-possibly-lost=no should bring down the error count / exit code

Using the options --show-leak-kinds=kind1,kind2,.. and
--errors-for-leak-kinds=kind1,kind2,.., each leak kind (definite, indirect,
possible, reachable) can now be individually reported and/or counted as
an error.
In a leak suppression entry, an optional line 'match-leak-kinds:'
controls which leak kinds are suppressed by this entry.
This is a.o. useful to avoid definite leaks being "catched"
by a suppression entry aimed at suppressing possibly lost blocks.
Default behaviour is the same as 3.8.1

Old args (--show-reachable and --show-possibly-lost) are still accepted.

Addition of a new test (memcheck/tests/lks) testing the new args
and the new suppression line.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13170 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
19f91bbaedb4caef8a60ce94b0f507193cc0bc10 10-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix more Char/HChar mixups. Closing in...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
e543f3024ace2925a0fb81985e9fcfc95b8c555a 21-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> First round of Char/HChar fixups for coregrind and memcheck.
Little bit of ripple in tools, too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13074 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
03f8d3fc25f5a45c5826259d1b33b7f310117279 05-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to include 2012.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
ec062e8d96a361af9905b5447027819dfbfee01a 23-Oct-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update all copyright dates, from 20xy-2010 to 20xy-2011.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
9eecbbb9a9cbbd30b903c09a9e04d8efc20bda33 03-May-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to 2010.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
18afe5d1c3dc9e4e16d3e10617d6afa4bf9fcd40 10-Aug-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Try to fix error_counts.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10768 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
4a76c5e1e1a62a7d14299a066687aad28f67bcae 10-Aug-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Count leak as errors. Fixes bug 152393.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10767 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
050eec553cdcb2ebeaefbb267aeb0828be7121e5 27-Jul-2009 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fixed a bug in the code for reading suppression files: the line numbers
reported in error messages were not correct. As an example, the following
output was produced before this patch (not correct):
$ ./vg-in-place --tool=helgrind --num-callers=1 /bin/true
...
FATAL: in suppressions file ".in_place/default.supp" near line 893:
suppression must contain at least one location line which is not "..."
exiting now.
$ ./vg-in-place --tool=drd --num-callers=1 /bin/true
FATAL: in suppressions file ".in_place/default.supp" near line 475:
suppression must contain at least one location line which is not "..."
exiting now.

After having applied this patch the above commands display line numbers
1104 and 619, referring to the first suppression pattern containing
three dots for the topmost stack frame, as expected.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10632 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
35db56c19847654f22b62da059083d41ff4258c5 24-Jul-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> A fix for bug 186796: suppression symbol names were being truncated if they
were longer than 200 chars. Now dynamic memory is used and so they can be
arbitrarily long in theory, although in practice it bombs out at 100,000 for
sanity purposes. This required adjusting the core/tool interface for
read_extra_suppression_info().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10581 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
9f207460d70d38c46c9e81996a3dcdf90961c6db 10-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright years.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
4d474d086188fd1f29fa97dbd84d8ea2e589a9b8 11-Feb-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates ("200X-2007" --> "200X-2008").


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
9ebd6e0c607fa30301b1325874eb8de871c21cc5 08-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
e4b0bf07b0ee0a18eacc5aba91686ab5fc1d327b 06-Jun-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
0297703b31a8b9b309740a36fd0567d711dfc953 17-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Undo the awful Leak Error type-abuse.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3754 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
51d827bcd88ce045a383ea1ca81768757df2d1fa 09-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Big clean-up: changed the core/tool interface to be mediated entirely
through the VG_(tdict) function dictionary, rather than using TL_(foo)
functions.

This facilitated the following changes:

- Removed the "TL_" prefix, which is no longer needed.

- Removed the auto-generated files vg_toolint.[ch], which were no longer
needed, which simplifies the build a great deal. Their (greatly
streamlined) contents went into core.h and vg_needs.h (and will soon
go into a new module defining the core/tool interface).

This also meant that tool.h.base reverted to tool.h (so no more
accidentally editing tool.h and not having the changes go into the
repo, hooray!) And gen_toolint.pl was removed. And toolfuncs.def was
removed.

- Removed VG_(missing_tool_func)(), no longer used.

- Bumped the core/tool interface major version number to 8. And I
killed the minor version number, which was never used. The layout
of the ToolInfo struct is such that this should not cause problems.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3644 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h
d2b1711bd846d1eb4dcb7b05a44a2bfbb49a5992 19-Apr-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Renamed vg_errcontext.c as errormgr.c, and carved off the relevant parts of
core.h and tool.h into pub_core_errormgr.h and pub_tool_errormgr.h. All
just to improve general modularity.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3532 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_errormgr.h