Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107533353
D48254.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48254.diff
View Options
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c
@@ -1130,6 +1130,29 @@
lp_is_void = ctf_type_encoding(lfp, lref, &e) == 0 && IS_VOID(e);
rp_is_void = ctf_type_encoding(rfp, rref, &e) == 0 && IS_VOID(e);
+ /*
+ * Let a pointer to a forward declaration be compatible with a pointer
+ * to a struct or union of the same name.
+ */
+ if (lkind == CTF_K_POINTER && rkind == CTF_K_POINTER) {
+ int lrkind, rrkind;
+
+ lrkind = ctf_type_kind(lfp, lref);
+ rrkind = ctf_type_kind(rfp, rref);
+ if (lrkind == CTF_K_FORWARD || rrkind == CTF_K_FORWARD) {
+ const char *lname, *rname;
+ char ln[DT_TYPE_NAMELEN], rn[DT_TYPE_NAMELEN];
+
+ lname = ctf_type_name(lfp, lref, ln, sizeof (ln));
+ rname = ctf_type_name(rfp, rref, rn, sizeof (rn));
+ if (lname != NULL && rname != NULL &&
+ strcmp(lname, rname) == 0) {
+ lp_is_void = lrkind == CTF_K_FORWARD;
+ rp_is_void = rrkind == CTF_K_FORWARD;
+ }
+ }
+ }
+
/*
* The types are compatible if both are pointers to the same type, or
* if either pointer is a void pointer. If they are compatible, set
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 16, 1:02 PM (20 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15642959
Default Alt Text
D48254.diff (1 KB)
Attached To
Mode
D48254: libdtrace: Be less strict when comparing pointer types
Attached
Detach File
Event Timeline
Log In to Comment