[DTrace-devel] [PATCH 1/3] String constants should be marked as DT_NF_DPTR
Kris Van Hees
kris.van.hees at oracle.com
Thu Oct 6 16:20:24 UTC 2022
Although string constants are represented using a scalar offset into the
string constant table, the generated BPF code uses actual pointers into
the string constant table. They are therefore pointers to DTrace-managed
storage (DT_NF_DPTR).
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
libdtrace/dt_parser.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libdtrace/dt_parser.c b/libdtrace/dt_parser.c
index a59ca0f9..6fc48c83 100644
--- a/libdtrace/dt_parser.c
+++ b/libdtrace/dt_parser.c
@@ -1318,6 +1318,7 @@ dt_node_string(char *string)
dnp = dt_node_alloc(DT_NODE_STRING);
dnp->dn_op = DT_TOK_STRING;
dnp->dn_string = string;
+ dnp->dn_flags |= DT_NF_DPTR;
dt_node_type_assign(dnp, DT_STR_CTFP(dtp), DT_STR_TYPE(dtp));
return dnp;
--
2.37.2
More information about the DTrace-devel
mailing list