Skip to content

Commit

Permalink
Do not report an address value for BADADDR faults with illval -1
Browse files Browse the repository at this point in the history
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@oracle.com>
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
  • Loading branch information
kvanhees committed Apr 8, 2022
1 parent c939053 commit 31bbe75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libdtrace/dt_handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 31bbe75

Please sign in to comment.