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.
This commit is contained in:
Guillem Jover 2023-03-21 04:11:03 +01:00
parent 7ed5de0158
commit 536a7d42fd

View File

@ -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