This is the first part of a previously posted series:
https://www.redhat.com/archives/libvir-list/2019-August/msg01374.html
I've temporarily split the addition of glib into a separate branch
until we get clarity on guarantees around g_malloc() and mallc()
using the same allocator. I published a docs update
https://gitlab.gnome.org/GNOME/glib/merge_requests/1099/
to attempt to get confirmation from glib maintainers on this
matter.
Changed in v2:
- Keep ATTRIBUTE_RETURN_CHECK annotations. We're aborting on OOM,
but don't want to update all callers to drop return value
checks yet
- Update docs for virAsprintfQuiet too
Daniel P. Berrangé (4):
util: purge all code for testing OOM handling
util: make allocation functions abort on OOM
util: remove several unused _QUIET allocation macro variants
util: make string functions abort on OOM
configure.ac | 17 --
docs/docs.html.in | 3 -
docs/internals/oomtesting.html.in | 213 --------------------
src/libvirt_private.syms | 4 -
src/util/viralloc.c | 314 +++++-------------------------
src/util/viralloc.h | 192 ++++--------------
src/util/virstring.c | 93 +++------
src/util/virstring.h | 73 +++----
tests/Makefile.am | 1 -
tests/oomtrace.pl | 41 ----
tests/qemuxml2argvtest.c | 12 +-
tests/testutils.c | 189 +-----------------
tests/testutils.h | 2 -
tests/virfirewalltest.c | 12 --
14 files changed, 136 insertions(+), 1030 deletions(-)
delete mode 100644 docs/internals/oomtesting.html.in
delete mode 100755 tests/oomtrace.pl
--
2.21.0