94084c
Downstream-only patch from Mark Wielaard <mjw@redhat.com> to avoid a
94084c
crash in backtrace if the vDSO is not available.
94084c
94084c
Upstream, this code was removed in commit 82fd7314c7df8c5555dce02
94084c
("powerpc: Remove backtrace implementation"), so patch is not needed
94084c
there.
94084c
94084c
diff --git a/sysdeps/powerpc/powerpc64/backtrace.c b/sysdeps/powerpc/powerpc64/backtrace.c
94084c
index 37de9b5bdd73c316..0ffa7509dfa4862a 100644
94084c
--- a/sysdeps/powerpc/powerpc64/backtrace.c
94084c
+++ b/sysdeps/powerpc/powerpc64/backtrace.c
94084c
@@ -68,8 +68,9 @@ static inline bool
94084c
 is_sigtramp_address (void *nip)
94084c
 {
94084c
 #ifdef HAVE_SIGTRAMP_RT64
94084c
-  if (nip == GLRO (dl_vdso_sigtramp_rt64) ||
94084c
-      nip == GLRO (dl_vdso_sigtramp_rt64) + 4)
94084c
+  if ((nip == GLRO (dl_vdso_sigtramp_rt64) ||
94084c
+       nip == GLRO (dl_vdso_sigtramp_rt64) + 4)
94084c
+      && nip != NULL)
94084c
     return true;
94084c
 #endif
94084c
   return false;