From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 02:13:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B07397C5; Tue, 6 Jan 2015 02:13:50 +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 8ED9B64C1A; Tue, 6 Jan 2015 02:13:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t062DoMV091106; Tue, 6 Jan 2015 02:13:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t062DoGb091105; Tue, 6 Jan 2015 02:13:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501060213.t062DoGb091105@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 6 Jan 2015 02:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276732 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2015 02:13:50 -0000 Author: markj Date: Tue Jan 6 02:13:49 2015 New Revision: 276732 URL: https://svnweb.freebsd.org/changeset/base/276732 Log: MFC r276250: DOF tables are aligned according to the DOF section's alignment constraint, so take this into account when iterating over DOF tables. PR: 195555 Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue Jan 6 02:13:48 2015 (r276731) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue Jan 6 02:13:49 2015 (r276732) @@ -163,6 +163,7 @@ dtrace_dof_init(void) size_t shstridx, symtabidx = 0, dynsymidx = 0; unsigned char *buf; int fixedprobes; + uint64_t aligned_filesz; #endif if (getenv("DTRACE_DOF_INIT_DISABLE") != NULL) @@ -226,7 +227,9 @@ dtrace_dof_init(void) while ((char *) dof < (char *) dofdata->d_buf + dofdata->d_size) { fixedprobes = 0; - dof_next = (void *) ((char *) dof + dof->dofh_filesz); + aligned_filesz = (shdr.sh_addralign == 0 ? dof->dofh_filesz : + roundup2(dof->dofh_filesz, shdr.sh_addralign)); + dof_next = (void *) ((char *) dof + aligned_filesz); #endif if (dof->dofh_ident[DOF_ID_MAG0] != DOF_MAG_MAG0 ||