[PATCH] pid: USDT probes cannot have "-" as function name

Kris Van Hees <[email protected]> Mon, 09 Feb 2026 13:35:00 -0500
Newsgroups dev.linux.lists.dtrace
Message-ID <DS0PR10MB7522231ADA11F5C6C606FC8EC265A@DS0PR10MB7522.namprd10.prod.outlook.com>
Signed-off-by: Kris Van Hees <[email protected]>
---
 libdtrace/dt_pid.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libdtrace/dt_pid.c b/libdtrace/dt_pid.c
index 517b9265..ef97c8d9 100644
--- a/libdtrace/dt_pid.c
+++ b/libdtrace/dt_pid.c
@@ -1568,6 +1568,10 @@ dt_pid_create_usdt_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp)
 	char *globpat = NULL;
 	int err = 0, i, nmatches = 0;
 
+	/* If the function name is "-", we're done. */
+	if (pdp->fun[0] == '-' && pdp->fun[1] == '\0')
+		return 0;
+
 	/* If it cannot end with a pid, we're done. */
 	if (pdp->prv[0] != '\0') {
 		char lastchar = pdp->prv[strlen(pdp->prv) - 1];
-- 
2.51.0