From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753749AbdHKUiP (ORCPT ); Fri, 11 Aug 2017 16:38:15 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:34062 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753256AbdHKUiO (ORCPT ); Fri, 11 Aug 2017 16:38:14 -0400 From: Arun Kalyanasundaram To: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Arun Kalyanasundaram , Jiri Olsa , Daniel Borkmann , "David S . Miller" , SeongJae Park , davidcc@google.com, Stephane Eranian , Arun Kalyanasundaram Subject: [PATCH 0/1] perf script python: Garbled text in tracepoint fields Date: Fri, 11 Aug 2017 13:38:08 -0700 Message-Id: <20170811203809.120130-1-arunkaly@google.com> X-Mailer: git-send-email 2.14.0.434.g98096fd7a8-goog Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The string stored in some of the fields of tracepoint handlers has unused non-ascii characters beyond the first null ternimating character. As a result the call to is_printable_array fails and the python handlers receive the entire field as a byte array instead of just the subset of chars that represent the string. This change calls is_printable_array with the correct length of the string instead of the entire field size. Bug report: lkml/2017/7/18/228 Arun Kalyanasundaram (1): perf script python: Garbled text in tracepoint fields tools/perf/util/scripting-engines/trace-event-python.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 2.14.0.434.g98096fd7a8-goog