fuzz: unblock SIGALRM so the timeout works
authorAlexander Bulekov <alxndr@bu.edu>
Wed, 4 Aug 2021 13:56:21 +0000 (09:56 -0400)
committerAlexander Bulekov <alxndr@bu.edu>
Wed, 1 Sep 2021 11:33:13 +0000 (07:33 -0400)
commitaaa94a1b3c7bc834c183ddcc8c4199cccebe58ac
tree38f03d96825a37b80e802582ada2420758d4b94d
parent40c0d963db2a9d4a49c15554817bbaa11e0bed47
fuzz: unblock SIGALRM so the timeout works

The timeout mechanism won't work if SIGALRM is blocked. This changes
unmasks SIGALRM when the timer is installed. This doesn't completely
solve the problem, as the fuzzer could trigger some device activity that
re-masks SIGALRM. However, there are currently no inputs on OSS-Fuzz
that re-mask SIGALRM and timeout. If that turns out to be a real issue,
we could try to hook sigmask-type calls, or use a separate timer thread.

Based-on: <20210713150037.9297-1-alxndr@bu.edu>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
tests/qtest/fuzz/generic_fuzz.c