mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
tests: Don't test invalid aligned allocations if avoiding UB
We can't exercise precondition check failures if GLib was (inadvisably) compiled with -Dglib_checks=false, and we shouldn't necessarily exercise precondition check failures when using QA tools like valgrind, so skip these tests if run with -m no-undefined. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
38cdfe3c02
commit
b0f686a00e
@ -965,6 +965,7 @@ test_aligned_mem (void)
|
||||
g_assert_null (a);
|
||||
|
||||
#define CHECK_SUBPROCESS_FAIL(name,msg) do { \
|
||||
if (g_test_undefined ()) \
|
||||
{ \
|
||||
g_test_message (msg); \
|
||||
g_test_trap_subprocess ("/utils/aligned-mem/subprocess/" #name, 0, 0); \
|
||||
|
Loading…
Reference in New Issue
Block a user