[all-commits] [llvm/llvm-project] 3cbe75: [libc][semaphore] Zero-initialize rand_bytes to fi...

Michael Jones via All-commits all-commits at lists.llvm.org
Mon May 4 16:39:51 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3cbe75b1433a90a28db068d700b7effd2de8f401
      https://github.com/llvm/llvm-project/commit/3cbe75b1433a90a28db068d700b7effd2de8f401
  Author: Michael Jones <michaelrj at google.com>
  Date:   2026-05-04 (Mon, 04 May 2026)

  Changed paths:
    M libc/src/semaphore/linux/named_semaphore.cpp

  Log Message:
  -----------
  [libc][semaphore] Zero-initialize rand_bytes to fix GCC warning (#195757)

GCC 15 warns about `rand_bytes` being maybe uninitialized when passed to
`getrandom`. Since `getrandom` writes to it, it doesn't strictly need
initialization, but zero-initializing it satisfies the compiler and
avoids the `-Werror=maybe-uninitialized` error.

Fix for https://github.com/llvm/llvm-project/pull/192278

Assisted by Gemini



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list