From owner-svn-src-head@FreeBSD.ORG Sun Nov 16 04:10:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34C58318; Sun, 16 Nov 2014 04:10:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21620103; Sun, 16 Nov 2014 04:10:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG4ANYi030218; Sun, 16 Nov 2014 04:10:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG4AN9e030198; Sun, 16 Nov 2014 04:10:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201411160410.sAG4AN9e030198@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 16 Nov 2014 04:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274565 - head/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 04:10:24 -0000 Author: markj Date: Sun Nov 16 04:10:23 2014 New Revision: 274565 URL: https://svnweb.freebsd.org/changeset/base/274565 Log: 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 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Sun Nov 16 04:07:53 2014 (r274564) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Sun Nov 16 04:10:23 2014 (r274565) @@ -287,19 +287,11 @@ equiv_su(tdesc_t *stdp, tdesc_t *ttdp, e 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;