mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-14 14:04:45 +00:00
The Git repository of the Libabigail Project
49fcc8d3ff
To understand the problem reported at https://sourceware.org/bugzilla/show_bug.cgi?id=29934 where a type was left non-canonicalized when analysing the binary /usr/lib64/dovecot/libdovecot-sieve.so.0.0.0 from https://vault.centos.org/7.6.1810/os/x86_64/Packages/dovecot-2.2.36-3.el7.x86_64.rpm and http://debuginfo.centos.org/7/x86_64/dovecot-debuginfo-2.2.36-3.el7.x86_64.rpm, I had to add some sanity checking code to ensure that types that have seen their propagated canonical cleared during the canonicalization process are fully canonicalized at the end of the canonicalization process. In order to performg that sanity checking this patch tracks the set of types which propagated canonical type has been cleared during the canonicalization of a particular type. When a type with such a cleared propagated canonical type is finally canonicalized, it is removed from the set of tracked types. At the end of the canonicalization process, the set of tracked types must be empty. This sanity check is compiled in only if the WITH_DEBUG_CT_PROPAGATION preprocessor macro is defined. That macro is defined if the --enable-debug-ct-propagation configure switch is used. * configure.ac: Add a new --enable-debug-ct-propagation configure flag that defines the WITH_DEBUG_CT_PROPAGATION preprocessor macro. * src/abg-ir-priv.h (environment::priv::types_with_cleared_propagated_ct_): Define new data member for tracking types with cleared propagated canonical type. (environment::priv::types_with_cleared_propagated_ct): Add getter and setter for the new data member above. (environment::priv::{record_type_with_cleared_propagated_canonical_type, erase_type_with_cleared_propagated_canonical_type}): Add book-keeping functions for the set of types with cleared propagated canonical type. (type_base::priv::clear_propagated_canonical_type): Make this return true if the propagated canonical type is cleared. (environment::priv::clear_propagated_canonical_type): Define a new function that takes a type_base* and clears its propagated canonical type. This also adds the type to the set of tracked types returned by environment::priv::types_with_cleared_propagated_ct(). (environment::priv::{cancel_ct_propagation_for_types_dependant_on, cancel_ct_propagation}): Call the new environment::priv::clear_propagated_canonical_type() rather than calling the now low-level type_base::priv::clear_propagated_canonical_type(). (environment::priv::propagate_ct): Remove the type which just gained a propagated canonical type from the set of tracked types returned by environment::priv::types_with_cleared_propagated_ct. (canonicalize_types): Define new function that canonicalizes all the types of the system (passed in parameter) and performs sanity checking to make sure all types with cleared propagated canonical types have been canonicalized. * include/abg-ir.h (string_type_base_sptr_map_type): Define new typedef for an unordered_map<string, type_base_sptr>. * src/abg-ir.cc (canonicalize): Remove the type which has just been canonicalized from the set of tracked types returned by environment::priv::types_with_cleared_propagated_ct. * src/abg-ctf-reader.cc (reader::types_map): Use the new string_type_base_sptr_map_type typedef for the type of this map. (reader::canonicalize_all_types): Use the new function abigail::ir::canonicalize_types to canonicalize the types of the system and perform necessary sanity checking. * src/abg-dwarf-reader.cc (reader::canonicalize_types_scheduled): Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.github | ||
autoconf-archive | ||
bash-completion | ||
doc | ||
docker | ||
include | ||
m4 | ||
relicensing-scripts | ||
scripts | ||
src | ||
tests | ||
tools | ||
.clang-format | ||
.gitignore | ||
.mailmap | ||
abigail.m4 | ||
ABIXML-FORMAT-VERSIONS | ||
AUTHORS | ||
ChangeLog | ||
COMMIT-LOG-GUIDELINES | ||
COMPILING | ||
configure.ac | ||
CONTRIBUTING | ||
default.abignore | ||
gen-changelog.py | ||
install-sh | ||
libabigail.pc.in | ||
license-change-2020.txt | ||
LICENSE.txt | ||
ltmain.sh | ||
Makefile.am | ||
NEWS | ||
README | ||
README-DOCKER.md | ||
release-text-template.txt | ||
update-copyright.sh | ||
VISIBILITY |
This is the Application Binary Interface Generic Analysis and Instrumentation Library. It aims at constructing, manipulating, serializing and de-serializing ABI-relevant artifacts. The set of artifacts that we are intersted is made of quantities like types, variable, functions and declarations of a given library or program. For a given library or program this set of quantities is called an ABI corpus. This library aims at (among other things) providing a way to compare two ABI Corpora (apparently the plural of corpus is copora, heh, that's cool), provide detailed information about their differences, and help build tools to infer interesting conclusions about these differences. You are welcome to contribute to this project after reading the files CONTRIBUTING and COMMIT-LOG-GUIDELINES files in the source tree. Communicating with the maintainers of this project -- including sending patches to be include to the source code -- happens via email at libabigail@sourceware.org.