[DTrace-devel] [PATCH v3] trace: print alloca pointers as actual pointer values
Kris Van Hees
kris.van.hees at oracle.com
Tue Sep 16 01:44:14 UTC 2025
On Mon, Sep 15, 2025 at 04:41:43PM -0400, Eugene Loh wrote:
> Largely similar comments to previous versions of this patch:
>
> On 9/15/25 13:36, Kris Van Hees via DTrace-devel wrote:
> > Because alloca pointers are stored internally as ofssets into the
>
> The same as for v1 and v2: s/ofssets/offsets/.
Ok, yes, sorry - been spending time on functionality over typos.
> > scratchmem area, they were printed as small integers. They are
> > now printed as actual pointer values into kernel space.
>
> And, again, the patch performs poorly against testing.
>
> The new test gives me:
> -OK 1 OK 333 OK 55555
> +OK 1059965305 OK 1059965637 OK 1060020859
> which is to say that the dereferenced values are wrong. (They are all the
> correct values plus some offset.)
>
> And with this patch, these pre-existing tests fail:
> test/unittest/builtinvar/tst.tid_pid.sh: FAIL: erroneous exitcode (1).
> test/unittest/funcs/alloca/tst.alloca-bcopy-top.d: FAIL: expected
> results differ.
> test/unittest/funcs/bcopy/tst.bcopy_arg_order.d: FAIL: expected results
> differ.
> test/unittest/funcs/copyinto/tst.copyinto_arg_order.d: FAIL: expected
> results differ.
Hm, this is getting frustrating. Tracking down why I was not seeing those
failures on my end.
> btw...
>
> > diff --git a/test/unittest/actions/trace/tst.alloca.r.p b/test/unittest/actions/trace/tst.alloca.r.p
> > new file mode 100755
> > @@ -0,0 +1,11 @@
> > +#!/usr/bin/gawk -f
> > +
> > +{
> > + $1 = $1 > 0x7fffffff ? "OK" : "BAD";
> > + $3 = $3 > 0x7fffffff ? "OK" : "BAD";
> > + $5 = $5 > 0x7fffffff ? "OK" : "BAD";
> > +}
> > +
> > +{
> > + print;
> > +}
>
> Why are these split over two awk clauses? Can't they co-exist in the same
> clause?
Yes they can. But they don't have to.
More information about the DTrace-devel
mailing list