Re: [DTrace-devel] [PATCH v3] trace: print alloca pointers as actual pointer values

Eugene Loh <[email protected]>
Newsgroups dev.linux.lists.dtrace
Message-ID <[email protected]>
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/.

> 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.

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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.