mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-23 10:36:42 +01:00
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:
parent
7ed5de0158
commit
536a7d42fd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user