mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-15 06:24:37 +00:00
dc0ac49157
Each suppression specification must have at least one of a documented per-suppression type list of properties defined if it is to be considered at all. At present: - suppression specifications which fail the check are silently ignored - in the function suppression case, the check does not trigger an early return and risks a later null pointer dereference. This commit: - reimplements the checks using arrays and helper function calls - adds a helper function to determine if a suppression specification is going to be ignored due a lack of properties - makes the parsing functions return failure early if the check fails Inconsistencies between suppression types (in particular, the treatment of the "label" property) remain. The only behavioural change may be to how present but empty properties are handled. This is an edge case that may be worth revisiting in a more general fashion in a later commit. * src/abg-suppression.cc (check_sufficient_props): New helper function to check for sufficient properties in a section. (read_type_suppression): Replace conditional logic with call to check_sufficient_props. (read_function_suppression): Ditto. (read_variable_suppression): Ditto. (read_file_suppression): Ditto. * tests/data/test-diff-suppr/test15-suppr-added-fn-4.suppr: Explain why the suppression will be ignored. * tests/data/test-diff-suppr/test16-suppr-removed-fn-4.suppr: Ditto. * tests/data/test-diff-suppr/test17-suppr-added-var-4.suppr: Ditto. * tests/data/test-diff-suppr/test18-suppr-removed-var-4.suppr: Ditto. Signed-off-by: Giuliano Procida <gprocida@google.com> |
||
---|---|---|
.. | ||
test-abicompat | ||
test-abidiff | ||
test-abidiff-exit | ||
test-alt-dwarf-file | ||
test-annotate | ||
test-core-diff | ||
test-default-supprs | ||
test-diff-dwarf | ||
test-diff-dwarf-abixml | ||
test-diff-filter | ||
test-diff-pkg | ||
test-diff-suppr | ||
test-fedabipkgdiff | ||
test-ini | ||
test-kmi-whitelist | ||
test-lookup-syms | ||
test-read-dwarf | ||
test-read-write | ||
test-types-stability | ||
test-write-read-archive | ||
Makefile.am |