core errors suppression support
commitd68d584cead390c339b9575c5c9679e8ce50c37f
authorMark Wielaard <mark@klomp.org>
Fri, 19 Apr 2024 20:46:11 +0000 (19 22:46 +0200)
committerMark Wielaard <mark@klomp.org>
Sat, 20 Apr 2024 01:10:12 +0000 (20 03:10 +0200)
tree7dcfe7a97ced32c7ffd32f1c77cf7fdd2ed9f514
parent71c8bce593658df2f7fffb499dd649ed3293355b
core errors suppression support

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
13 files changed:
NEWS
coregrind/m_errormgr.c
coregrind/m_main.c
coregrind/m_tooliface.c
coregrind/pub_core_errormgr.h
coregrind/pub_core_options.h
drd/drd_error.c
helgrind/hg_main.c
include/pub_tool_options.h
include/pub_tool_tooliface.h
memcheck/mc_main.c
none/nl_main.c
none/tests/fdleak_ipv4.stderr.exp