[DTrace-devel] [PATCH 1/7] parser: check for all types of char

Nick Alcock nick.alcock at oracle.com
Tue May 2 17:12:16 UTC 2023


A while back I changed the check for IS_CHAR() in the parser to check
specifically for a char in the native signedness.  This fails now
the kernel might be using a char in the non-native signedness.

Consider all such types to be equally-valid chars.  We really
don't care if they're signed or not, they're still chars.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
---
 libdtrace/dt_parser.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libdtrace/dt_parser.h b/libdtrace/dt_parser.h
index a8aecb9a6ffef..1acbf4ed49b23 100644
--- a/libdtrace/dt_parser.h
+++ b/libdtrace/dt_parser.h
@@ -238,7 +238,7 @@ struct dtrace_typeinfo;	/* see <dtrace.h> */
 struct dt_pcb;		/* see <dt_impl.h> */
 
 #define	IS_CHAR(e) \
-	((((e).cte_format & CTF_CHAR) == CTF_CHAR) &&	\
+	((((e).cte_format & CTF_INT_CHAR) == CTF_INT_CHAR) && \
 	(e).cte_bits == NBBY)
 
 #define	IS_VOID(e) \
-- 
2.39.1.268.g9de2f9a303




More information about the DTrace-devel mailing list