diff options
author | Sam James <sam@gentoo.org> | 2024-11-11 10:33:42 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-11-11 22:48:36 +0000 |
commit | d37d82ff00bc2e4b0a10b50679f5233e0d056cb7 (patch) | |
tree | 4a74ae20cfdcc0bb1574d72c2e3f46ac67436474 | |
parent | v2.40 (diff) | |
download | sandbox-d37d82ff00bc2e4b0a10b50679f5233e0d056cb7.tar.gz sandbox-d37d82ff00bc2e4b0a10b50679f5233e0d056cb7.tar.bz2 sandbox-d37d82ff00bc2e4b0a10b50679f5233e0d056cb7.zip |
tests: handle traps on NULL input for utimensatstable-2.x
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>
(cherry picked from commit b8a6ddb6fc1832abc1b396f285b864858bb18026)
-rw-r--r-- | tests/utimensat-0.c | 5 |
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 |