From 536a7d42fd010811aba208eef281916f34387e78 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 21 Mar 2023 04:11:03 +0100 Subject: [PATCH] test: Exempt blank_stack_side_effects() from sanitizer checks This will mean we cannot use sanitizer support on the Hurd, for which this function was added to fix the test. But the sanitizer suppression function attribute is not having any effect, so this is better than nothing. --- test/explicit_bzero.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/explicit_bzero.c b/test/explicit_bzero.c index 0485876..5ec7592 100644 --- a/test/explicit_bzero.c +++ b/test/explicit_bzero.c @@ -138,6 +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__ char scratch[SECRETBYTES * 4]; /* If the read(3) in populate_secret() wrote into the stack, as it @@ -145,6 +146,7 @@ blank_stack_side_effects(char *buf, size_t len) * detect the wrong secret on the stack. */ memset(scratch, 0xFF, sizeof(scratch)); ASSERT_EQ(NULL, memmem(scratch, sizeof(scratch), buf, len)); +#endif } static int -- 2.47.3