| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
macOS always fills in si_code for SIG{BUS,ILL,SEGV} as if it were a real
hardware fault, so returning from the handler is not guaranteed to re-
trigger the signal.
Fixes: aecdabb ("sighook: Return instead of re-raising for faults")
Link: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2386463/4/util/posix/signals_test.cc
Link: https://github.com/chromium/crashpad/commit/e0d8a0aa01ac176804077f1f128ccc894c098f79
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This was causing a UAF if we ever unregistered the last hook for a
signal and then re-registered one.
Fixes: 75b7f70 ("sighook: Make sigunhook() O(1)")
|
| |
|
| |
|
|
|
|
|
|
| |
This replaces the explicit CPPFLAGS list in flags.mk with just
`-include src/prelude.h`, shortening our compiler command lines and
allowing them to be easily documented.
|
| |
|
|
|
|
|
| |
It's a little awkward to thread the test result through manually; much
easier to just make bfs_check() update a global variable.
|
|
|
|
|
|
|
|
| |
This fixes an ABA problem where sigdispatch() could think no handlers
are registered for a signal even when there are.
Link: https://unix.stackexchange.com/a/779594/56202
Fixes: 375caac ("sighook: New utilities for hooking signals")
|
| |
|
|
This allows multiple hooks to be installed for a single signal.
|