mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-22 16:56:57 +00:00
The Git repository of the Libabigail Project
When analyzing a Linux Kernel tree made of vmlinux and loadable module binaries, the same (CTF) binary reader is re-used to load every single binaries in a loop. That can be seen, for instance, by reading the code of load_vmlinux_corpus in abg-tools-utils.cc. As part of that process, abigail::ctf::reader::initialize is invoked prior to using the reader to read type information from each binary. But then, looking at things a bit closer, I realized that ctf::reader::initialize is failing to reset the reader::ctfa data member. That leads to a memory leak that was making things grow out of proportion. Also, the resetting code fails to actually clear out the map of types that are to be sorted and canonicalized. That leads to unnecessarily sorting huge amounts of types. The patch address the two points above. Apart from the obvious gain in code integrity, this patch significantly reduces the time taken to analyze a Linux Kernel tree. Please note that the subsequent patch coming after this one will reduce that time even further. * src/abg-ctf-reader.cc (reader::reader): Initialize ctfa, ctf_sect, symtab_sect and strtab_sect data members. (reader::initialize): In the overload taking no argument, make sure to free the ctfa data member before setting it to nullptr. In the overload that takes arguments, make sure to invoke reader::initialize() to really free the data used. Also, improve the comments. 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.