test/explicit_bzero.c


Log

Author Commit Date CI Message
Guillem Jover 07192b31 2023-04-05T00:01:42 test: Disable blank_stack_side_effects() on non-Hurd systems 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
Guillem Jover 536a7d42 2023-03-21T04:11:03 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.
Guillem Jover 7ed5de01 2023-03-21T04:10:33 test: Import explicit_bzero() sanitizer support changes from OpenBSD
Guillem Jover d5865759 2022-08-25T00:52:43 test: Fix explicit_bzero() test on the Hurd On the Hurd a small read(3) might end up (indirectly) copying the data on the stack, which we will end up finding even when we have cleared the buffer. To avoid these side effects, we add a new function, that we force not to be inlined, so that we can reuse the same stack space, that will blank any possible stack side effects. This should be portable regardless of stack growing up or down. Diagnosis-by: Samuel Thibault <sthibault@debian.org>
Guillem Jover c9ff8368 2022-01-29T14:48:22 test: Import explicit_bzero and strtonum test cases from OpenBSD - Remove trailing spaces. - Declare file-scope functions and variables static. - Declare functions with a proper prototype. - Do not mix declarations and code for C90 conformance. - Do not compare size_t and ssize_t variables.