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
This commit is contained in:
parent
7e00348e76
commit
980b4d5365
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user