Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp676075pxv; Thu, 15 Jul 2021 13:11:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6lP45WbDeZT7/t4sRUTOVv+vpxS7vPZqYvFgvTCbV3gR+DtEv8cFSZPu91AwhsU8tST8O X-Received: by 2002:a02:2a07:: with SMTP id w7mr5583809jaw.96.1626379903481; Thu, 15 Jul 2021 13:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626379903; cv=none; d=google.com; s=arc-20160816; b=kCsXbRK2XLM91ffthc+ve6ONT5hK2OPPNRcc8KSFdRR4uIMeRNLL4THJxpxGYp5GPo hH8TzyiGwtkSoUFs+HWhfExbaA/WeZrdzRfHV/GmOLeDCwE/gsdhKEN/XKnbI0+JlKfo hYxVo2F7ru5SsI/j//G5+PXpk6vG3d0wym9fd3vZqLGeagA1X67hlau0v7kdHWrYxDBK DQfwFmqbYfns+gt6DNtx4o86fWQhjtNUuqtnzqlrUJc2Al7UqrZZ4BC8IZ4hyNyQ3nYF e6z+9CpViXa/BW/SPWswat11knoq1BFoYJT+xghYxLCIir4jPSUYGGxfQPwdJL/NvoNf GbNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=B21DQMMa0Z6Z5vaqfz0J6+5hdRp2WAlYA7hBQ7l70Gg=; b=sycheSFcANeW9maimd8r27MmjsGzNzqmrOabQtfOAQ/Vowe3Wid3qvl3CyiTEMKf+C 81KpPMB02P5lcUOqUQJspHqfn5kqJWNDlTnnnl+iXJRMkYh9zOTlSnX3zZfjAktyHLyd WOypWgnMjqqR78Jas8l927+ARVhLb8aajElowznjx3UmCUcm4E8M8oo4ccj3CSajrmYw LcKnq9XsWSc0fQvFNU4wT6WotpTuTZmJVpJb8IKkGlJC9BxBJ6X9191tRqLGaA1Oj3gm ej7tbWb5BZEwlkIbsgF57kt1lkSL1oxvEoCXzi4nxI6I57QeesZRTUF+tx66gsmeSnuO zHOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gIEjku86; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si7834369ilq.111.2021.07.15.13.11.30; Thu, 15 Jul 2021 13:11:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gIEjku86; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344629AbhGOUNi (ORCPT + 99 others); Thu, 15 Jul 2021 16:13:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:49842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243540AbhGOUNA (ORCPT ); Thu, 15 Jul 2021 16:13:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E95E1613BB; Thu, 15 Jul 2021 20:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626379806; bh=FpP4QhskxX86f8X+tcxg6FYVm2dxOTjbiFgMjYW0exo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gIEjku86OAHI6k56LN8czXmwQdej6QDHzphuxJrsjzhMy4wCEC7dfxdS2MyLspz3E u097+sU1gHU5cP+Cv4VmNIbANwMriHkX5DF4Pu5TIbvTcttEa+yq4SQDmg1Ntuv38J XqW5zealnZT2hNudn8L4Sw568HqxwSTvhLzQOG8nn2h31rGUPw+z0enNJXuAI+SB29 2/N/L3W5jB1bG3o9wJ/SCPoM9oA7Lbfo5/HLHa7DeKyaR+K6e9XDJ2Gne41iSdxwYO HQmeDP2VCr/41wGK6OqvBQh8QChqq0y7XPTzcd1aIOQMFDoDaAztqy0Opj0CsRlXYD RNv9G0hB8XinQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 5A190403F2; Thu, 15 Jul 2021 17:10:03 -0300 (-03) Date: Thu, 15 Jul 2021 17:10:03 -0300 From: Arnaldo Carvalho de Melo To: Riccardo Mancini Cc: Ian Rogers , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 07/20] perf test: maps__merge_in: fix memory leak of maps Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jul 15, 2021 at 06:07:12PM +0200, Riccardo Mancini escreveu: > ASan reports a memory leak when running the perf test > "65: maps__merge_in". This is the second and final patch addressing > these memory leaks. > This time, the problem is simply that the maps object is never > destructed. > > This patch adds the missing maps__exit call. Not really this one, but at least the patch should apply more easily: Fixes: 79b6bb73f888933c ("perf maps: Merge 'struct maps' with 'struct map_groups'") Thanks, applied. - Arnaldo > Signed-off-by: Riccardo Mancini > --- > tools/perf/tests/maps.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/perf/tests/maps.c b/tools/perf/tests/maps.c > index edcbc70ff9d66e22..1ac72919fa358601 100644 > --- a/tools/perf/tests/maps.c > +++ b/tools/perf/tests/maps.c > @@ -116,5 +116,7 @@ int test__maps__merge_in(struct test *t __maybe_unused, int subtest __maybe_unus > > ret = check_maps(merged3, ARRAY_SIZE(merged3), &maps); > TEST_ASSERT_VAL("merge check failed", !ret); > + > + maps__exit(&maps); > return TEST_OK; > } > -- > 2.31.1 > -- - Arnaldo