[DTrace-devel] [PATCH] Do not report an address value for BADADDR faults with illval -1
Kris Van Hees
kris.van.hees at oracle.com
Thu Mar 31 05:35:20 UTC 2022
This patch allows code to pass -1 as illval to a BADADDR fault to
surpress reporting an address.
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
libdtrace/dt_handle.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libdtrace/dt_handle.c b/libdtrace/dt_handle.c
index 433ce451..bdc0365c 100644
--- a/libdtrace/dt_handle.c
+++ b/libdtrace/dt_handle.c
@@ -179,12 +179,15 @@ dt_handle_err(dtrace_hdl_t *dtp, dtrace_probedata_t *data)
switch (err.dteda_fault) {
case DTRACEFLT_BADADDR:
+ if ((int64_t)err.dteda_addr == -1)
+ goto no_addr;
case DTRACEFLT_BADALIGN:
case DTRACEFLT_BADSTACK:
sprintf(details, " (0x%llx)", (u_longlong_t)err.dteda_addr);
break;
default:
+no_addr:
details[0] = 0;
}
--
2.34.1
More information about the DTrace-devel
mailing list