Commit 75c1d046 authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Adam Jackson

os: OsSigHandler should not show rtld errors for unrelated signals

If RTLD_DI_SETSIGNAL is set to let us turn runtime linker/loader errors
into catchable signals, then we should only show the errors when catching
that signal, instead of tossing out red herrings to distract people with
unrelated crashes long after their last failed symbol lookup (especially
when using drivers built to support multiple API's by checking which
symbols are available before calling them).
Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <>
Reviewed-by: Keith Packard's avatarKeith Packard <>
Reviewed-by: Aaron Plattner's avatarAaron Plattner <>
parent 065eb661
......@@ -114,10 +114,14 @@ OsSigHandler(int signo)
const char *dlerr = dlerror();
if (signo == SIGNAL_FOR_RTLD_ERROR) {
const char *dlerr = dlerror();
if (dlerr) {
LogMessageVerbSigSafe(X_ERROR, 1, "Dynamic loader error: %s\n", dlerr);
if (dlerr) {
LogMessageVerbSigSafe(X_ERROR, 1,
"Dynamic loader error: %s\n", dlerr);
#endif /* RTLD_DI_SETSIGNAL */
......@@ -217,7 +221,7 @@ OsInit(void)
* after ourselves.
int failure_signal = SIGQUIT;
int failure_signal = SIGNAL_FOR_RTLD_ERROR;
dlinfo(RTLD_SELF, RTLD_DI_SETSIGNAL, &failure_signal);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment