]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
test: Disable blank_stack_side_effects() on non-Hurd systems
authorGuillem Jover <guillem@hadrons.org>
Tue, 4 Apr 2023 22:01:42 +0000 (00:01 +0200)
committerGuillem Jover <guillem@hadrons.org>
Mon, 17 Apr 2023 02:12:32 +0000 (04:12 +0200)
This code was added to cope with Hurd specific behavior, but it is
causing flakiness on containers on some Linux systems. Only enable
it where it is currently needed to try to get stability back on CI
systems.

Closes: #14
test/explicit_bzero.c

index 5ec7592015531e64673ee0f0023b50c253be27c7..031aa42ec036461757d1ede4701b0320981fefe4 100644 (file)
@@ -138,7 +138,7 @@ populate_secret(char *buf, ssize_t len)
 static void __attribute__((__noinline__))
 blank_stack_side_effects(char *buf, size_t len)
 {
-#ifndef __SANITIZE_ADDRESS__
+#if defined(__GNU__) && !defined(__SANITIZE_ADDRESS__)
        char scratch[SECRETBYTES * 4];
 
        /* If the read(3) in populate_secret() wrote into the stack, as it