From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13021 invoked by alias); 18 Oct 2011 00:19:49 -0000 Received: (qmail 12981 invoked by uid 9586); 18 Oct 2011 00:19:46 -0000 Date: Tue, 18 Oct 2011 00:19:00 -0000 Message-ID: <20111018001946.12970.qmail@sourceware.org> From: jistone@sourceware.org To: systemtap-cvs@sourceware.org Subject: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-1.6-319-gc12bdea X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: eddbc9e4689f32acef46bd4f7ffb207577701d0f X-Git-Newrev: c12bdeab8e5515848ba0d2af21c8c6e5c072c42a Mailing-List: contact systemtap-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-cvs-owner@sourceware.org List-Archive: Reply-To: systemtap@sourceware.org X-SW-Source: 2011-q4/txt/msg00036.txt.bz2 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "systemtap: system-wide probe/trace tool". The branch, master has been updated via c12bdeab8e5515848ba0d2af21c8c6e5c072c42a (commit) from eddbc9e4689f32acef46bd4f7ffb207577701d0f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c12bdeab8e5515848ba0d2af21c8c6e5c072c42a Author: Josh Stone Date: Mon Oct 17 15:18:06 2011 -0700 PR13283: Use a temporary string for comparisons The reported issue was trying to directly compare the results of two different kernel_string() calls, but they were always computed equal even though they were known to be different. Inspection of pass-3 showed that both calls led to an expr-stmt ending in ...->__retvalue. This is just a pointer though, and it happens here that both calls will point to the same string buffer, so strncmp rightly calls them equal. To fix this, we must introduce temporary storage for the intermediate strings. Now we won't lose either value, and they can be properly compared for equality. * translate.cxx (c_tmpcounter::visit_comparison): Declare temporary storage for the left operand if it's not a literal. (c_unparser::visit_comparison): Use the left temporary. * testsuite/systemtap.string/strcmp.*: Test string comparisons. ----------------------------------------------------------------------- Summary of changes: testsuite/systemtap.string/strcmp.exp | 36 +++++++++++++++++++++++++ testsuite/systemtap.string/strcmp.stp | 47 +++++++++++++++++++++++++++++++++ translate.cxx | 36 +++++++++++++++++++++---- 3 files changed, 113 insertions(+), 6 deletions(-) create mode 100644 testsuite/systemtap.string/strcmp.exp create mode 100644 testsuite/systemtap.string/strcmp.stp hooks/post-receive -- systemtap: system-wide probe/trace tool