From owner-svn-src-head@freebsd.org Fri Mar 16 21:10:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D58DCF4E087; Fri, 16 Mar 2018 21:10:36 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8351975053; Fri, 16 Mar 2018 21:10:36 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E5C0E8A; Fri, 16 Mar 2018 21:10:36 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GLAaVk043861; Fri, 16 Mar 2018 21:10:36 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GLAa4j043860; Fri, 16 Mar 2018 21:10:36 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803162110.w2GLAa4j043860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 16 Mar 2018 21:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331076 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 331076 X-SVN-Commit-Repository: base 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.25 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: Fri, 16 Mar 2018 21:10:37 -0000 Author: cem Date: Fri Mar 16 21:10:36 2018 New Revision: 331076 URL: https://svnweb.freebsd.org/changeset/base/331076 Log: libdtrace: Fix another uninitialized dtt_flags UB Like r331073, eliminate a UB by fully initializing the struct with a designated initializer. Note that the similar src_dtt is not fully used, so a similar treatment was not absolutely required. I chose to leave it alone. It wouldn't hurt to do the same thing, though. Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Fri Mar 16 21:03:54 2018 (r331075) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Fri Mar 16 21:10:36 2018 (r331076) @@ -343,9 +343,11 @@ out: src_dtt.dtt_ctfp = src_ctfp; src_dtt.dtt_type = src_type; - dst_dtt.dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name; - dst_dtt.dtt_ctfp = dst_ctfp; - dst_dtt.dtt_type = dst_type; + dst_dtt = (dtrace_typeinfo_t){ + .dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name, + .dtt_ctfp = dst_ctfp, + .dtt_type = dst_type, + }; return (dt_xlator_create(dtp, &src_dtt, &dst_dtt, NULL, NULL, NULL)); }