Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp264072ybi; Tue, 2 Jul 2019 20:11:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqIj+Vo5zf+2R6V68W1I1Pfh8G7PjhWFGGtC3N3izPlpmoYjWeZ2wzm3FB6Z1iapR9N9xM X-Received: by 2002:a65:44c8:: with SMTP id g8mr33900069pgs.443.1562123485481; Tue, 02 Jul 2019 20:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562123485; cv=none; d=google.com; s=arc-20160816; b=d5YBe0r+KBND5hxlcUjYWGytvOBdTsmltyRailY7Mdtc8LZIyOKoXZKKDX/a/66awP L4xWMerlAc0+8IR2TdXbKAk0eQvs+viftjtG8OC1krH2zokoOKNN87jbDvJhPtAuShQv zZjG2IugyXWZums1PtHPni8ro9rmDXKWLDM01Yh5gOdFIC9xIJR7wuFLSpEaxKo2hebX 8MwScAW9jQysOJgfnaOknDuCD0OWWMMFR6zh1eHDdbzNdT/i6zSf1vvIWIwSA0pOpF18 fMzICR95ylSxzAmhXmcqhPGf9SQSEG/M+/2luMCEnqmUFfIUbCplmaMiIbAeW8pKyTT+ d2rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=xFqqC+Ngzt8dNCfl2mWlwTPcMXkNsrKFhzRFHu0uFBI=; b=Lumk4e0qAu6eOVfjytl3ouFlJ1Bom6emYyE75f7KrbM0y4ccsVJcdBMyIoNU+6OcHp gXXje5vQEGR9CJu46XTQa6BrjrR+iTPwua7DbtcDwTEB3ieeuI1jO0D9NtBHERRrEa3Z 8QurseBZNV0ZeALIXvymklTpRQTPodtYjmFqCbWZJ58SgeuvP5hMmZ6e/cH2E6Bswxw9 eMgPkh/gTUi37wSIYzsp1q7prq+z1aIvRT0a2jqw5qvLacNRo46ROYPJ1Tpnkys4sBsX pOOAl2KgVn0uFUhr62GDrj8MsPZR00htG0V6tsKqGBy2PlbfSKJY4+hnMi2ry5AL8Kfm gVwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Wdz1QcTO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si763833pgh.83.2019.07.02.20.11.09; Tue, 02 Jul 2019 20:11:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Wdz1QcTO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbfGCDJc (ORCPT + 99 others); Tue, 2 Jul 2019 23:09:32 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:36630 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727080AbfGCDJc (ORCPT ); Tue, 2 Jul 2019 23:09:32 -0400 Received: by mail-qt1-f193.google.com with SMTP id p15so990786qtl.3 for ; Tue, 02 Jul 2019 20:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xFqqC+Ngzt8dNCfl2mWlwTPcMXkNsrKFhzRFHu0uFBI=; b=Wdz1QcTOxjcvcY7Cu0BTjOWurKgeMYq+k1MnpKquUOr/lgtqvCLd2v5b/CzA05GNqP QyTzSI1UoczYPCLPSaEf4H8XkJOw+iYQSg7KJJMTMhS4Vmqf0yqWL282xPVwx9DGx16E MC/KsVPs6SiZm20tX62Wa4VlqRGDpXavIJhtWCkW9uhLPvG+64LF9P1BkUitnmicI/fV v+li4TUnKhToc4jYVAufvWKddkVVAvR2Ykg/q0jGWFD2My4hG7VGhuDkDYGt4pNOreFs OxWUrptAJL4m+JVh2w4OOe5sdI7P0STaaoJKXS0RpctYt/oX6Wge48i8eLXrjROuiM9k y3Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xFqqC+Ngzt8dNCfl2mWlwTPcMXkNsrKFhzRFHu0uFBI=; b=KFVy4o7uz71oD8H1AnMoMrv/aGG1ZTdK76+W9vfm+IlCwEA/1oXtaStjmjkIZ0Wp7V XJVdSYqlDDQnuULNf3RHcn6xQ6GJQiKiVS5+bRxDNqzj6ZF3/G+4D7uGk3rRb3ndZXSr z1GhpIaarhU2+3sMDPM0Xbakgky3ExaAvCNGnCSPBYwPEJg/u94yJnRzI9P3/z8+bVaO gi5GeJfeiRev8IR9S0+rJs2VxEXHfdIGVD+e9iKJNQr5UVkh5PwQijkcC+KrXLkMUPgx TmQiUlqLJmch3qaw9IOFQXtjcKSWxvJrC3Z6A5tqFzN80bYejXdGDhTp3bjAmDqIGIYy taQQ== X-Gm-Message-State: APjAAAW83nzTRJm6AeNlR5YAfoFi3veRxAPOjVK4aogmmTDfa2+9Cdyo 1uiNUrVaX6wte+mFvECjF38= X-Received: by 2002:ac8:47cd:: with SMTP id d13mr15361913qtr.156.1562123371103; Tue, 02 Jul 2019 20:09:31 -0700 (PDT) Received: from quaco.ghostprotocols.net ([179.97.35.11]) by smtp.gmail.com with ESMTPSA id k38sm521435qtk.10.2019.07.02.20.09.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 20:09:30 -0700 (PDT) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 0EF9741153; Wed, 3 Jul 2019 00:09:27 -0300 (-03) Date: Wed, 3 Jul 2019 00:09:26 -0300 To: Numfor Mbiziwo-Tiapo Cc: peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, songliubraving@fb.com, mbd@fb.com, linux-kernel@vger.kernel.org, irogers@google.com, eranian@google.com Subject: Re: [PATCH 1/2] Fix mmap-thread-lookup.c unitialized memory usage Message-ID: <20190703030926.GN15462@kernel.org> References: <20190702173716.181223-1-nums@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190702173716.181223-1-nums@google.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Jul 02, 2019 at 10:37:15AM -0700, Numfor Mbiziwo-Tiapo escreveu: > Running the perf test command after building perf with a memory > sanitizer causes a warning that says: > WARNING: MemorySanitizer: use-of-uninitialized-value... in mmap-thread-lookup.c > Initializing the go variable to 0 fixes this change. > > Signed-off-by: Numfor Mbiziwo-Tiapo > --- > tools/perf/tests/mmap-thread-lookup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c > index 5ede9b561d32..b1abf4752f35 100644 > --- a/tools/perf/tests/mmap-thread-lookup.c > +++ b/tools/perf/tests/mmap-thread-lookup.c > @@ -52,7 +52,7 @@ static void *thread_fn(void *arg) > { > struct thread_data *td = arg; > ssize_t ret; > - int go; > + int go = 0; > > if (thread_init(td)) > return NULL; The test needs to write something to a file, whatever, so this doesn't fix anything, just silences the compiler warning, which is a good thing. I'll apply and adjust the cset commit log. Thanks, - Arnaldo