From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751648AbaJATQd (ORCPT ); Wed, 1 Oct 2014 15:16:33 -0400 Received: from mail-ob0-f177.google.com ([209.85.214.177]:62526 "EHLO mail-ob0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142AbaJATQb (ORCPT ); Wed, 1 Oct 2014 15:16:31 -0400 MIME-Version: 1.0 Date: Wed, 1 Oct 2014 21:16:31 +0200 Message-ID: Subject: [BUG] perf tools: off-by-one error in map_groups__find_ams() From: Stephane Eranian To: LKML Cc: Jiri Olsa , Namhyung Kim , Arnaldo Carvalho de Melo , Peter Zijlstra , "mingo@elte.hu" , David Ahern Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, It appears that there is a off-by-one bug in map_groups__find_ams(). The upper-bound check in the test below should be >= because end = start + len; The end address is outside the range. Please confirm. int map_groups__find_ams(struct addr_map_symbol *ams, symbol_filter_t filter) { if (ams->addr < ams->map->start || ams->addr > ams->map->end) {