test/explicit_bzero.c


Log

Author Commit Date CI Message
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.