diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2025-01-21 11:42:12 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2025-01-21 11:53:01 -0500 |
commit | 790187e978c9488b87da05f01b940faebca2d809 (patch) | |
tree | 3cb8a10c16a078b57dde43202c3526b4777967aa /tests/gnu/printf_l_nonlink.sh | |
parent | 34e6eca4ad9530918dcbc1d755eefc279782db9f (diff) | |
download | bfs-790187e978c9488b87da05f01b940faebca2d809.tar.xz |
tests/sighook: Fix Valgrind compatibility
Valgrind does not deliver async signals in a timely manner; by default,
it polls for new signals every 1,000 basic blocks. That means we can
get SIGALRM delivered after timer_delete(), or kill(SIGSEGV) never
delivered after pause().
Fix the timer_delete() issue by reordering the cleanup path. Valgrind
always polls pending signals after pthread_sigmask(), so call that
between timer_delete() and sigunhook().
Fix the pause() issue by sleeping in a loop instead.
Note that --fair-sched=yes is required to avoid starvation of the
background thread.
Link: https://bugs.kde.org/show_bug.cgi?id=492678
Link: https://bugs.kde.org/show_bug.cgi?id=343357
Link: https://bugs.kde.org/show_bug.cgi?id=498936
Diffstat (limited to 'tests/gnu/printf_l_nonlink.sh')
0 files changed, 0 insertions, 0 deletions