The undefined behaviour sanitizer (UBSAN) defaults to merely printing an
error message if it detects undefined behaviour. These error messages often
end up in captured output and do not fail the tests, effectively hiding
the warning.
This series fixes all previously hidden issues and makes UBSAN fail the
tests in the CI, if it detects undefined behaviour.
See
https://listman.redhat.com/archives/libvir-list/2021-June/msg00341.html
for background on the change to virFileReadLimFD usage.
Tim Wiederhake (4):
virfile: Move max file size macro
virfile: Use VIR_MAX_FILE_LEN instead of INT_MAX to limit file size
virFileReadLimFD: Limit maximum file size to INT_MAX - 1
ci: Halt on sanitizer errors
.gitlab-ci.yml | 2 ++
src/security/security_apparmor.c | 4 ++--
src/security/security_apparmor.h | 1 -
src/security/virt-aa-helper.c | 10 +++++-----
src/util/virfile.c | 2 +-
src/util/virfile.h | 3 +++
tests/networkxml2firewalltest.c | 2 +-
tests/testutils.c | 5 +++--
8 files changed, 17 insertions(+), 12 deletions(-)
--
2.31.1