linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Fix mmap-thread-lookup.c unitialized memory usage
@ 2019-07-02 17:37 Numfor Mbiziwo-Tiapo
  2019-07-02 17:37 ` [PATCH 2/2] Fix perf-hooks test Numfor Mbiziwo-Tiapo
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Numfor Mbiziwo-Tiapo @ 2019-07-02 17:37 UTC (permalink / raw)
  To: peterz, mingo, acme, alexander.shishkin, jolsa, namhyung,
	songliubraving, mbd
  Cc: linux-kernel, irogers, eranian, Numfor Mbiziwo-Tiapo

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 <nums@google.com>
---
 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;
-- 
2.22.0.410.gd8fdbe21b5-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-13 10:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 17:37 [PATCH 1/2] Fix mmap-thread-lookup.c unitialized memory usage Numfor Mbiziwo-Tiapo
2019-07-02 17:37 ` [PATCH 2/2] Fix perf-hooks test Numfor Mbiziwo-Tiapo
2019-07-05 16:40   ` Arnaldo Carvalho de Melo
2019-07-03  3:09 ` [PATCH 1/2] Fix mmap-thread-lookup.c unitialized memory usage Arnaldo Carvalho de Melo
2019-07-13 10:52 ` [tip:perf/urgent] perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning tip-bot for Numfor Mbiziwo-Tiapo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).