[DTrace-devel] [PATCH] test: use a more stable data item

Kris Van Hees kris.van.hees at oracle.com
Fri Apr 26 04:31:20 UTC 2024


The runtime bounds check exception for dynamically sized arrays in
kernel structures depended on a kernel symbol that is not quite as
stable as expected.  Use a member from the mm_struct instead.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
 test/unittest/arrays/tst.ctf-dynsized-bounds-runtime.d | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/unittest/arrays/tst.ctf-dynsized-bounds-runtime.d b/test/unittest/arrays/tst.ctf-dynsized-bounds-runtime.d
index 62c2e9a5..4d8dfd0b 100644
--- a/test/unittest/arrays/tst.ctf-dynsized-bounds-runtime.d
+++ b/test/unittest/arrays/tst.ctf-dynsized-bounds-runtime.d
@@ -15,7 +15,7 @@
 BEGIN
 {
 	i = pid - pid;			/* Non-constant 0 value. */
-	trace(`__start_BTF[i]);
+	trace(curthread->mm->cpu_bitmap[i]);
 	exit(0);
 }
 
-- 
2.42.0




More information about the DTrace-devel mailing list