Skip to content

Commit

Permalink
tests: handle traps on NULL input for utimensat
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thesamesam committed Nov 11, 2024
1 parent 376afc1 commit b8a6ddb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/utimensat-0.c
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -20,3 +23,5 @@
int flags = at_get_flags(s);

#include "test-skel-0.c"

#pragma GCC pop_options

0 comments on commit b8a6ddb

Please sign in to comment.