Skip to content

Commit

Permalink
parser: check for all types of char
Browse files Browse the repository at this point in the history
A while back I changed the check for IS_CHAR() in the parser to check
specifically for a char in the native signedness.  This can fail now
that 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@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
  • Loading branch information
nickalcock authored and kvanhees committed May 24, 2023
1 parent 32a2454 commit f7b94c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libdtrace/dt_parser.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Oracle Linux DTrace.
* Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
Expand Down Expand Up @@ -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) \
Expand Down

0 comments on commit f7b94c2

Please sign in to comment.