aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-11-11 10:33:42 +0000
committerSam James <sam@gentoo.org>2024-11-11 22:47:01 +0000
commitb8a6ddb6fc1832abc1b396f285b864858bb18026 (patch)
tree8489941bc48c9491fd911e03760d795d033307a7
parentNOCOLOR -> NO_COLOR (diff)
downloadsandbox-master.tar.gz
sandbox-master.tar.bz2
sandbox-master.zip
tests: handle traps on NULL input for utimensatHEADmaster
When building with -fisolate-erroneous-paths-attribute, GCC turns the call to utimensat w/ a NULL arg into a trap because of its nonnull attribute(s). Workaround that in the test. Bug: https://bugs.gentoo.org/549108 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--tests/utimensat-0.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/utimensat-0.c b/tests/utimensat-0.c
index 99c3fa4..4e8b89c 100644
--- a/tests/utimensat-0.c
+++ b/tests/utimensat-0.c
@@ -1,3 +1,6 @@
+#pragma GCC push_options
+#pragma GCC optimize("-fno-isolate-erroneous-paths-dereference,-fno-isolate-erroneous-paths-attribute")
+
#define CONFIG HAVE_UTIMENSAT
#define FUNC utimensat
#define SFUNC "utimensat"
@@ -20,3 +23,5 @@
int flags = at_get_flags(s);
#include "test-skel-0.c"
+
+#pragma GCC pop_options