aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2014-11-16 04:10:23 +0000
committerMark Johnston <markj@FreeBSD.org>2014-11-16 04:10:23 +0000
commit980b4d536545de5f1aa9611c49f34af766d92a54 (patch)
tree23e6227e475fd5cf2cb761bdbb7056724ab00439 /cddl/contrib
parent7e00348e7605b9906601438008341ffc37c00e2c (diff)
downloadsrc-980b4d536545de5f1aa9611c49f34af766d92a54.tar.gz
src-980b4d536545de5f1aa9611c49f34af766d92a54.zip
Remove an incorrect optimization. The type IDs of each member of a struct or
union must be checked when determine whether two types are equivalent. This bug could cause ctfmerge(1) to incorrectly merge distinct types. Reviewed by: Robert Mustacchi <rm@joyent.com> MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=274565
Diffstat (limited to 'cddl/contrib')
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/merge.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c b/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
index 2ef37d460b36..27966af0cf50 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
@@ -287,19 +287,11 @@ equiv_su(tdesc_t *stdp, tdesc_t *ttdp, equiv_data_t *ed)
while (ml1 && ml2) {
if (ml1->ml_offset != ml2->ml_offset ||
- strcmp(ml1->ml_name, ml2->ml_name) != 0)
+ strcmp(ml1->ml_name, ml2->ml_name) != 0 ||
+ ml1->ml_size != ml2->ml_size ||
+ !equiv_node(ml1->ml_type, ml2->ml_type, ed))
return (0);
- /*
- * Don't do the recursive equivalency checking more than
- * we have to.
- */
- if (olm1 == NULL || olm1->ml_type->t_id != ml1->ml_type->t_id) {
- if (ml1->ml_size != ml2->ml_size ||
- !equiv_node(ml1->ml_type, ml2->ml_type, ed))
- return (0);
- }
-
olm1 = ml1;
ml1 = ml1->ml_next;
ml2 = ml2->ml_next;