From owner-svn-src-all@FreeBSD.ORG Tue Nov 25 07:01:39 2014 Return-Path: Delivered-To: svn-src-all@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 1D91BFCA; Tue, 25 Nov 2014 07:01:39 +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 09BA48F5; Tue, 25 Nov 2014 07:01:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP71cqk078399; Tue, 25 Nov 2014 07:01:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP71cbR078398; Tue, 25 Nov 2014 07:01:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201411250701.sAP71cbR078398@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 25 Nov 2014 07:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275012 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 07:01:39 -0000 Author: markj Date: Tue Nov 25 07:01:38 2014 New Revision: 275012 URL: https://svnweb.freebsd.org/changeset/base/275012 Log: Adjust some checks missed in r274637, now that pi_rname can be NULL. Additionally fix a misparenthesization in the same check, noticed while fixing the first bug. This bug only appears to cause problems if the same USDT probe appears twice within a static function. X-MFC-With: r274637 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Tue Nov 25 06:43:17 2014 (r275011) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Tue Nov 25 07:01:38 2014 (r275012) @@ -545,8 +545,9 @@ dt_probe_define(dt_provider_t *pvp, dt_p for (pip = prp->pr_inst; pip != NULL; pip = pip->pi_next) { if (strcmp(pip->pi_fname, fname) == 0 && - ((rname == NULL && pip->pi_rname[0] == '\0') || - (rname != NULL && strcmp(pip->pi_rname, rname)) == 0)) + ((rname == NULL && pip->pi_rname == NULL) || + (rname != NULL && pip->pi_rname != NULL && + strcmp(pip->pi_rname, rname) == 0))) break; }