[compiler-rt] [NFC][compiler-rt][hwasan] Avoid variable length array warning in test (PR #225497)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 13:47:10 PDT 2026
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/225497
>From b30377cb57a49507889f67110b71f4bf9efb15ac Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Tue, 22 Sep 2026 12:32:17 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.7
---
compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c b/compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c
index 1c4e2e7c76d3b1..2c5e1e0d74b580 100644
--- a/compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c
+++ b/compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c
@@ -22,10 +22,9 @@
#include <unistd.h>
void CopyFdToFd(int in_fd, int out_fd) {
- const size_t kBufSize = 0x10000;
- static char buf[kBufSize];
+ static char buf[0x10000];
while (1) {
- ssize_t got = read(in_fd, buf, kBufSize);
+ ssize_t got = read(in_fd, buf, sizeof(buf));
if (got > 0) {
write(out_fd, buf, got);
} else if (got == 0) {
More information about the llvm-commits
mailing list