Date: Sat, 9 Jul 2016 22:41:21 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302507 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <201607092241.u69MfLSE038849@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Sat Jul 9 22:41:21 2016 New Revision: 302507 URL: https://svnweb.freebsd.org/changeset/base/302507 Log: Avoid truncating the return value of DTrace predicates. Predicates are DIF objects whose return value is compared with zero to determine whether the corresponding probe body is to be executed. The return value itself is the contents of a 64-bit DIF register, but it was being truncated to an int before the comparison. This meant that a predicate such as /0x100000000/ would evaluate to false. Reported by: rwatson MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jul 9 21:14:59 2016 (r302506) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jul 9 22:41:21 2016 (r302507) @@ -7348,7 +7348,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t a if (pred != NULL) { dtrace_difo_t *dp = pred->dtp_difo; - int rval; + uint64_t rval; rval = dtrace_dif_emulate(dp, &mstate, vstate, state);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607092241.u69MfLSE038849>