[compiler-rt] Ignore out-of-bounds printf() format string in ASan test (PR #66695)

Mitch Phillips via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 13:47:44 PDT 2023


https://github.com/hctim created https://github.com/llvm/llvm-project/pull/66695

This warning needs to be disabled. The format string is deliberately too
large.


>From 3bb012fc21e73b9d0223c8929e5a3b69fba13eaa Mon Sep 17 00:00:00 2001
From: Mitch Phillips <mitchp at google.com>
Date: Mon, 18 Sep 2023 22:43:51 +0200
Subject: [PATCH] Ignore out-of-bounds printf() format string in ASan test

This warning needs to be disabled. The format string is deliberately too
large.
---
 compiler-rt/test/asan/TestCases/printf-5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/test/asan/TestCases/printf-5.c b/compiler-rt/test/asan/TestCases/printf-5.c
index eef5223e4e8da0f..19ff182acce6702 100644
--- a/compiler-rt/test/asan/TestCases/printf-5.c
+++ b/compiler-rt/test/asan/TestCases/printf-5.c
@@ -1,4 +1,4 @@
-// RUN: %clang_asan -O2 %s -o %t
+// RUN: %clang_asan -Wno-excess-initializers -O2 %s -o %t
 // We need replace_intrin=0 to avoid reporting errors in memcpy.
 // RUN: %env_asan_opts=replace_intrin=0:check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
 // RUN: %env_asan_opts=replace_intrin=0:check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s



More information about the llvm-commits mailing list