[DTrace-devel] [oracle/dtrace-utils] 37364e: Fix %r0 register leak

Kris Van Hees noreply at github.com
Tue Dec 14 23:25:37 UTC 2021


  Branch: refs/heads/dev
  Home:   https://github.com/oracle/dtrace-utils
  Commit: 37364e931131e55f86df6ba2a7fecdbc71fd0bd0
      https://github.com/oracle/dtrace-utils/commit/37364e931131e55f86df6ba2a7fecdbc71fd0bd0
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-12-12 (Sun, 12 Dec 2021)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Fix %r0 register leak

The dt_cg_load_var() function was not properly freeing the %r0 register
for by-ref loads.  This caused a spill/fill pair to be generated for the
dt_cg_check_notnull() invocation.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 978f2c0a4fba50849b43e6c0771b292927d6a22c
      https://github.com/oracle/dtrace-utils/commit/978f2c0a4fba50849b43e6c0771b292927d6a22c
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-12-13 (Mon, 13 Dec 2021)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Avoid checking for NULL pointers multiple times

The dt_cg_load_var() function included a check to see that a loaded
pointer value was not NULL (and to generate a probe error if it was).
However, callers of this function are already checking for NULL before
using the pointer (if such a check is necessary).  Therefore, this
does not need to be done in dt_cg_load_var().

The dt_cg_load_var() function was also creating two labels that were
only actually used in one branch.  Eugene Loh also pointed out that a
MOV instruction could be saved here.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 94f82db2210b5d09fc1e361267885dd0f68d7788
      https://github.com/oracle/dtrace-utils/commit/94f82db2210b5d09fc1e361267885dd0f68d7788
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-12-14 (Tue, 14 Dec 2021)

  Changed paths:
    M test/unittest/sdt/tst.args.d

  Log Message:
  -----------
  Ensure that sdt/tst.args.d filters on pid correctly

The logic in this test was flawed, and would occasionally allow kernel
threads to be reported, causing test failures.  We now explicitly use
a predicate on the data generating clause to ensure that arg0 matches
pid.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


Compare: https://github.com/oracle/dtrace-utils/compare/107cbf35d55a...94f82db2210b



More information about the DTrace-devel mailing list