-/* $OpenBSD: siginfo-fault.c,v 1.1 2020/09/16 14:02:23 mpi Exp $ */
+/* $OpenBSD: siginfo-fault.c,v 1.2 2021/09/28 08:56:15 kettenis Exp $ */
/*
* Copyright (c) 2014 Google Inc.
*
#include <unistd.h>
/*
- * Some architectures deliver an imprecise fault address.
+ * Some architectures may deliver an imprecise fault address.
*/
#ifdef __sparc64__
#define EXPADDR_MASK ~(3UL)
gotsi.si_code, strsigcode(gotsigno, gotsi.si_code));
++fail;
}
- if (expaddr != gotsi.si_addr) {
+ if (expaddr != (char *)((uintptr_t)gotsi.si_addr & EXPADDR_MASK)) {
fprintf(stderr, "%s si_addr: expect %p, actual %p\n",
name, expaddr, gotsi.si_addr);
++fail;