]> git.ipfire.org Git - thirdparty/libbsd.git/commit
test: Fix explicit_bzero() test on the Hurd
authorGuillem Jover <guillem@hadrons.org>
Wed, 24 Aug 2022 22:52:43 +0000 (00:52 +0200)
committerGuillem Jover <guillem@hadrons.org>
Tue, 4 Oct 2022 02:29:37 +0000 (04:29 +0200)
commitd5865759f8698f1c75339451a26fa3ae00276a51
tree4a92c58f4414e6b2a6cbffd500cab207e0e1eb96
parentbe327c6ebe408ae144e9c93aab9cb65fce116f33
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>
COPYING
test/explicit_bzero.c