`glib:glib / error` fails with Glibc-2.37
$ meson test error
ninja: no work to do.
ninja: Entering directory `/home/xry111/sources/11.3/glib-2.74.5/build'
ninja: no work to do.
1/2 glib:gio / error OK 0.01s
2/2 glib:glib / error FAIL 0.06s killed by signal 11 SIGSEGV
>>> G_TEST_BUILDDIR=/home/xry111/sources/11.3/glib-2.74.5/build/glib/tests MALLOC_CHECK_=2 G_TEST_SRCDIR=/home/xry111/sources/11.3/glib-2.74.5/glib/tests MALLOC_PERTURB_=189 LD_LIBRARY_PATH=/home/xry111/sources/11.3/glib-2.74.5/build/glib G_DEBUG=gc-friendly /home/xry111/sources/11.3/glib-2.74.5/build/glib/tests/error
Reproduced on Linux From Scratch r11.2-317 and Arch Linux (both with Glibc-2.37). There is a comment in the test saying:
/* Only worth testing this on Linux with glibc; if other platforms regress on
* this legacy behaviour, we don’t care. In particular, calling
* g_error_new_valist() with a %NULL format will crash on FreeBSD as its
* implementation of vasprintf() is less forgiving than Linux’s. That’s
* fine: it’s a programmer error in either case. */
So I guess it's related to the vfprintf refactor in Glibc-2.37, but not sure.
Edited by Xi Ruoyao