mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 14:36:16 +01:00
tests: Only run g_error_new_valist() programmer error test on glibc
The musl implementation of vasprintf segfaults with NULL
This commit is contained in:
parent
b38d5a991f
commit
902ba0bc0d
@ -123,12 +123,12 @@ static void
|
|||||||
test_new_valist_invalid_va (gpointer dummy,
|
test_new_valist_invalid_va (gpointer dummy,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
#ifdef __linux__
|
#if defined(__linux__) && defined(__GLIBC__)
|
||||||
/* Only worth testing this on Linux; if other platforms regress on this legacy
|
/* Only worth testing this on Linux with glibc; if other platforms regress on
|
||||||
* behaviour, we don’t care. In particular, calling g_error_new_valist() with
|
* this legacy behaviour, we don’t care. In particular, calling
|
||||||
* a %NULL format will crash on FreeBSD as its implementation of vasprintf()
|
* g_error_new_valist() with a %NULL format will crash on FreeBSD as its
|
||||||
* is less forgiving than Linux’s. That’s fine: it’s a programmer error in
|
* implementation of vasprintf() is less forgiving than Linux’s. That’s
|
||||||
* either case. */
|
* fine: it’s a programmer error in either case. */
|
||||||
const struct
|
const struct
|
||||||
{
|
{
|
||||||
GQuark domain;
|
GQuark domain;
|
||||||
@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
|
|||||||
|
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
}
|
}
|
||||||
#else /* if !__linux__ */
|
#else /* if !__linux__ || !__GLIBC__ */
|
||||||
g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
|
g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
|
||||||
#endif /* !__linux__ */
|
#endif /* !__linux__ || ! __GLIBC__ */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user