[libvirt PATCH v2 0/7] Enable sanitizers
twiederh at redhat.com
Tue May 18 08:41:51 UTC 2021
On Thu, 2021-05-06 at 17:08 +0200, Tim Wiederhake wrote:
> This series enables and adds AddressSanitizer and
> builds to the CI.
> https://clang.llvm.org/docs/AddressSanitizer.html and
> These sanitizers already found some issues in libvirt, e.g.
> 8b8c91f487592c6c067847ca59dde405ca17573f, or
> There exist two more relevant sanitizers, ThreadSanitizer and
> Unfortunately, those two require an instrumented build of all
> including libc, to work correctly.
> Note that clang and gcc have different implementations of these
> hence the introduction of two new jobs to the CI. The latter one
> issues a
> warning about the use of LD_PRELOAD in `virTestMain`, which in this
> particular case can be safely ignored by setting `ASAN_OPTIONS` to
> verify_asan_link_order=0` for the gcc build.
> Changes since V1:
> Incorporated changes suggested by Pavel, except for #6 (now #7): The
> the sanitizers working with Fedora 33 is wrong, I was fooled by
> caching. The
> bug described there is present in Fedora 33, 34, and Rawhide.
> Tim Wiederhake (7):
> meson: Allow larger stack frames when instrumenting
> meson: Allow undefined symbols when sanitizers are enabled
> tests: virfilemock: realpath: Allow non-null second parameter
> openvz: Add missing symbols to libvirt_openvz.syms
> tests: openvzutilstest: Remove duplicate linking with
> virt-aa-helper: Remove duplicate linking with src/datatypes.o
> ci: Enable address and undefined behavior sanitizers
> .gitlab-ci.yml | 35 +++++++++++++++++++++++++++++++++++
> build-aux/syntax-check.mk | 2 +-
> meson.build | 14 ++++++++++----
> src/libvirt_openvz.syms | 2 ++
> src/security/meson.build | 1 -
> tests/meson.build | 2 +-
> tests/virfilemock.c | 20 ++++++++++++--------
> 7 files changed, 61 insertions(+), 15 deletions(-)
More information about the libvir-list