Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151479220
D27213.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
D27213.diff
View Options
Index: head/cddl/contrib/opensolaris/common/ctf/ctf_create.c
===================================================================
--- head/cddl/contrib/opensolaris/common/ctf/ctf_create.c
+++ head/cddl/contrib/opensolaris/common/ctf/ctf_create.c
@@ -1258,7 +1258,7 @@
uint_t kind, flag, vlen;
ctf_bundle_t src, dst;
- ctf_encoding_t src_en, dst_en;
+ ctf_encoding_t src_en, main_en, dst_en;
ctf_arinfo_t src_ar, dst_ar;
ctf_dtdef_t *dtd;
@@ -1372,6 +1372,27 @@
case CTF_K_FLOAT:
if (ctf_type_encoding(src_fp, src_type, &src_en) != 0)
return (ctf_set_errno(dst_fp, ctf_errno(src_fp)));
+
+ /*
+ * This could be a bitfield, and the CTF library assumes
+ * intrinsics will appear before bitfields. Therefore,
+ * try to copy over the intrinsic prior to copying the
+ * bitfield.
+ */
+ if (dst_type == CTF_ERR && name[0] != '\0' &&
+ (hep = ctf_hash_lookup(&src_fp->ctf_names, src_fp, name,
+ strlen(name))) != NULL &&
+ src_type != (ctf_id_t)hep->h_type) {
+ if (ctf_type_encoding(src_fp, (ctf_id_t)hep->h_type,
+ &main_en) != 0) {
+ return (ctf_set_errno(dst_fp,
+ ctf_errno(src_fp)));
+ }
+ if (bcmp(&src_en, &main_en, sizeof (ctf_encoding_t)) &&
+ ctf_add_type(dst_fp, src_fp,
+ (ctf_id_t)hep->h_type) == CTF_ERR)
+ return (CTF_ERR); /* errno is set for us */
+ }
if (dst_type != CTF_ERR) {
if (ctf_type_encoding(dst_fp, dst_type, &dst_en) != 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 9, 4:54 PM (6 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31165333
Default Alt Text
D27213.diff (1 KB)
Attached To
Mode
D27213: Fix dtrace symbol resolution in the face of bitfields
Attached
Detach File
Event Timeline
Log In to Comment