]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
wc: make sure input buffer for neon 'wc -l' is aligned
authorCollin Funk <collin.funk1@gmail.com>
Sun, 15 Mar 2026 04:04:12 +0000 (21:04 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Mon, 16 Mar 2026 19:20:38 +0000 (12:20 -0700)
* src/wc_neon.c (wc_lines_neon): Use alignas.

src/wc_neon.c

index 00fa38b6ebe220ecb4e1689e65d2ee0800b0cdd1..571f5051c3b9b01976bf1867a593ec85e91b80c2 100644 (file)
@@ -35,7 +35,7 @@ wc_lines_neon (int fd)
 
   while (true)
     {
-      unsigned char neon_buf[IO_BUFSIZE];
+      unsigned char alignas (16) neon_buf[IO_BUFSIZE];
       ssize_t bytes_read = read (fd, neon_buf, sizeof neon_buf);
       if (bytes_read <= 0)
         return (struct wc_lines) { bytes_read == 0 ? 0 : errno, lines, bytes };