- Update COPYING and VEX/LICENSE.GPL to version 3.
- Update README, NEWS, docs/manual license and contributing text.
- Update file headers to say either version 3 of the License,
or (at your option) any later version.
- Leave tests and perf file headers as is, unless the code is derived
from Valgrind/VEX.
- Leave valgrind.h, cachegrind.h, callgrind.h, drd.h, helgrind.h,
memcheck.h and dhat.h Hybrid-BSD licensed.
Add two new functions core_get_extra_suppression_info and
core_get_error_name as alternatives for tool suppression callbacks.
These functions are used in gen_suppression.
Instead of a tool name, a core error component name is "CoreError".
Two new suppression kinds FdBadCloseSupp and FdNotClosedSupp
were added. Corresponding to the FdBadClose and FdNotClosed
error kinds.
core_error_matches_suppression matches these suppression kinds
with error kinds.
core_get_extra_suppression_info and core_print_extra_suppression_use
are noops for core errors.
is_suppressible_error, supp_matches_error, load_one_suppressions_file
and show_used_suppressions have been adjusted to work with core
error kinds.
A new function VG_(found_or_suppressed_errs) helps to not output
an empty error summary if only core errors are requested, but no
errors were detected.
VG_(clo_track_fds) has been moved from pub_core_options.h to
pub_tool_options.h. And VG_(needs_core_errors) now takes a Bool
that can be set to false in the tool post_clo_init handler. This
is used in the none tool to request core errors, but disable all
reporting if no option has been given that enables such errors.
This make sure only the none/tests/fdleak_ipv4.stderr.exp needs
adjustment. For all other tests the output is exactly as before.
https://bugs.kde.org/show_bug.cgi?id=485778
Sync VEX/LICENSE.GPL with top-level COPYING file. We used 3 different
addresses for writing to the FSF to receive a copy of the GPL. Replace
all different variants with an URL <http://www.gnu.org/licenses/>.
The following files might still have some slightly different (L)GPL
copyright notice because they were derived from other programs:
- files under coregrind/m_demangle which come from libiberty:
cplus-dem.c, d-demangle.c, demangle.h, rust-demangle.c,
safe-ctype.c and safe-ctype.h
- coregrind/m_demangle/dyn-string.[hc] derived from GCC.
- coregrind/m_demangle/ansidecl.h derived from glibc.
- VEX files for FMA detived from glibc:
host_generic_maddf.h and host_generic_maddf.c
- files under coregrin/m_debuginfo derived from LZO:
lzoconf.h, lzodefs.h, minilzo-inl.c and minilzo.h
- files under coregrind/m_gdbserver detived from GDB:
gdb/signals.h, inferiors.c, regcache.c, regcache.h,
regdef.h, remote-utils.c, server.c, server.h, signals.c,
target.c, target.h and utils.c
Plus the following test files:
- none/tests/ppc32/testVMX.c derived from testVMX.
- ppc tests derived from QEMU: jm-insns.c, ppc64_helpers.h
and test_isa_3_0.c
- tests derived from bzip2 (with embedded GPL text in code):
hackedbz2.c, origin5-bz2.c, varinfo6.c
- tests detived from glibc: str_tester.c, pth_atfork1.c
- test detived from GCC libgomp: tc17_sembar.c
- performance tests derived from bzip2 or tinycc (with embedded GPL
text in code): bz2.c, test_input_for_tinycc.c and tinycc.c
At startup valgrind fetches the current working directory and stashes
it away to be used later (in debug messages, read config files or create
log files). But if the current working directory didn't exist (or there
was some other error getting its path) then valgrind would go in an
endless loop. This was caused by assuming that any error meant a larger
buffer needed to be created to store the cwd path (ERANGE). However
there could be other reasons calling getcwd failed.
Fix this by only looping and resizing the buffer when the error is
ERANGE. Any other error just means we cannot fetch and store the current
working directory. Fix all callers to check get_startup_wd() returns
NULL. Only abort startup if a relative path needs to be used for
user supplied relative log files. Debug messages will just show
"<NO CWD>". And skip reading any config files from the startup_wd
if it doesn't exist.
Also add a new testcase that tests executing valgrind in a deep,
inaccessible and/or non-existing directory (none/tests/nocwd.vgtest).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15989
Two things:
- remove the buffer argument from VG_(DebugInfo_sect_kind)
- allocate AddrInfo::SectKind::objname dynamically
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14719
The change eliminates the fixed size buffers in gen_suppression and
show_used_suppressions. This is achieved by changing the return type from
VG_TDICT_CALL(tool_get_extra_suppression_info and
VG_TDICT_CALL(tool_print_extra_suppression_use from Bool to SizeT.
A return value of 0 indicates that nothing (except the terminating '\0'
which is always inserted) was written to the buffer. This corresponds to the
previous False return value. A return value which is equal to the buffer
size (that was passed in as function argument) indicates that the buffer was
not large enough. The caller then resizes the buffer and retries.
Otherwise, the buffer was large enough.
Regtested with a resize value of 1.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14606
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
If a suppression file contains an error, the lineno reported could be wrong.
Also, give filename and lineno of the used suppressions in -v debugging output.
The fix consists in ensuring that tool specific read_extra function gets
the Int* lineno pointer, together with other VG_(get_line) parameters.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13469
- Generalized the behavior of happens-before / happens-after annotations such
that not only 1:1 but also n:m patterns are supported.
- Dropped support for invoking happens-before / happens-after annotations on
POSIX condition variables (pthread_cond_t).
- Report the details about the offending synchronization object in generic
errors.
- Converted a few tl_assert() statements into error messages.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11073
both wrapped up in XML tags (as before) but also in plain text in a
sequence of CDATA blocks. Normally only one, but in the worst case
the raw data will have ]]> in it, in which case it needs to be split
across two CDATA blocks.
This apparently simple change involved a lot of refactoring of the
suppression printing machinery:
* in the core-tool iface, change "print_extra_suppression_info" (which
prints any auxiliary info) to "get_extra_suppression_info", which
parks the text in a caller-supplied buffer. Adjust tools to match.
* VG_(apply_StackTrace): accept a void* argument, which is passed to
each invokation of the functional parameter (a poor man's closure
implementation).
* move PRINTF_CHECK into put_tool_basics.h, where it should have been
all along
* move private printf-into-an-XArray-of-character functions from
m_debuginfo into m_xarray, and make them public
* gen_suppression itself: use all the above changes. Basically we
always generate the plaintext version into an XArray. In text mode
that's just printed. In XML mode, we print the XMLery as before,
but the plaintext version is dumped into a CDATA block too.
* update the Protocol 4 specification to match all this.
This still isn't 100% right in the sense that the CDATA block data
needs to be split across multiple blocks if it should ever contain the
CDATA end mark "]]>". The Protocol 4 spec has this right even though
the implementation currently doesn't.
Fixes#191189.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10822
* VG_(find_seginfo): incrementally rearrange the DebugInfo list, like
most of the other list-searching functions do.
* rename all VG_(*seginfo*) functions exported from m_debuginfo to
VG_(*DebugInfo*). "seginfo" was a historical name which was mostly
but not completely, done away with some time back.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10678
type than "data race error" or if both data race error contexts refer to the
same access type and the same access size.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10675
preamble.
- Matching suppression types with error contexts does now work properly.
- Cleanup: added more comments, renamed some functions, removed an unused
function argument.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10634
Valgrind tools: if the same kind of error has been detected a second
time with an identical call stack, count it as an error but do not print
it a second time. The total number of detected errors remains unchanged
but the number of error contexts is now reported correctly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10633
ThreadSanitizer.
- Modified DRD's error reporting code such that it does no longer let
the Valgrind core print the Valgrind thread ID but that it now prints
the DRD thread ID and name. Updated expected output files where
necessary.
- Modified drd/test/Makefile.am such that the tests using gcc's built-in
functions for atomic memory access such that these are only compiled when
the gcc version in use supports these built-in functions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10186
of two. The indentation of the DRD source code is now consistent with
the other Valgrind source files.
- Added emacs mode line with indentation settings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9496
- pthread_barrier_wait() intercept now passes the information to the DRD
tool whether or not this function returned
PTHREAD_BARRIER_SERIAL_THREAD. This information is now displayed when
the command-line option --trace-barrier=yes has been specified.
- Changed the cleanup functions for client objects that are called just
before a thread stops into callback functions.
- Added DRD_(clientobj_delete_thread)().
- Removed DRD_(clientobj_resetiter)(void) and DRD_(clientobj_next)().
- Added test for race conditions between pthread_barrier_wait() and
pthread_barrier_destroy() calls. An error message is now printed if
this condition has been detected.
- Bug fix: pthread_barrier_delete() calls on barriers being waited upon
are now reported.
- Removed DRD_() wrapper from around the name of some static variables and
functions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9211