[libc-commits] [libc] Add named posix semaphore lifetime operations on linux (PR #192278)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Mon May 4 14:56:10 PDT 2026
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-gcc-fullbuild-dbg` running on `libc-x86_64-debian-fullbuild` while building `libc` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/46042
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[==========] Running 1 test from 1 test suite.
[ RUN ] LlvmLibcBzeroTest.SizeSweep
[ OK ] LlvmLibcBzeroTest.SizeSweep (799 us)
Ran 1 tests. PASS: 1 FAIL: 0
[1176/1490] Running unit test libc.test.src.strings.bzero_x86_64_opt_avx2_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN ] LlvmLibcBzeroTest.SizeSweep
[ OK ] LlvmLibcBzeroTest.SizeSweep (818 us)
Ran 1 tests. PASS: 1 FAIL: 0
[1177/1490] Building CXX object libc/src/semaphore/linux/CMakeFiles/libc.src.semaphore.linux.named_semaphore.dir/named_semaphore.cpp.o
FAILED: libc/src/semaphore/linux/CMakeFiles/libc.src.semaphore.linux.named_semaphore.dir/named_semaphore.cpp.o
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -D__LIBC_USE_BUILTIN_ISNAN -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -std=gnu++17 -MD -MT libc/src/semaphore/linux/CMakeFiles/libc.src.semaphore.linux.named_semaphore.dir/named_semaphore.cpp.o -MF libc/src/semaphore/linux/CMakeFiles/libc.src.semaphore.linux.named_semaphore.dir/named_semaphore.cpp.o.d -o libc/src/semaphore/linux/CMakeFiles/libc.src.semaphore.linux.named_semaphore.dir/named_semaphore.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/semaphore/linux/named_semaphore.cpp
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/semaphore/linux/named_semaphore.cpp: In function ‘__llvm_libc_20_0_0_git::ErrorOr<__llvm_libc_20_0_0_git::cpp::array<char, 34> > __llvm_libc_20_0_0_git::{anonymous}::generate_tmp_path()’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/semaphore/linux/named_semaphore.cpp:65:39: error: ‘rand_bytes’ may be used uninitialized [-Werror=maybe-uninitialized]
65 | auto ret = linux_syscalls::getrandom(rand_bytes.data(), rand_bytes.size(), 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/semaphore/linux/named_semaphore.cpp:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/CPP/array.h:46:32: note: by argument 1 of type ‘const __llvm_libc_20_0_0_git::cpp::array<unsigned char, 8>*’ to ‘constexpr size_t __llvm_libc_20_0_0_git::cpp::array<T, N>::size() const [with T = unsigned char; long unsigned int N = 8]’ declared here
46 | LIBC_INLINE constexpr size_t size() const { return N; }
| ^~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/semaphore/linux/named_semaphore.cpp:64:44: note: ‘rand_bytes’ declared here
64 | cpp::array<uint8_t, RANDOM_SUFFIX_BYTES> rand_bytes;
| ^~~~~~~~~~
cc1plus: all warnings being treated as errors
[1178/1490] Running unit test libc.test.src.stdlib.quick_sort_test.__unit__
[==========] Running 17 tests from 1 test suite.
[ RUN ] LlvmLibcQsortTest.SortedArray
[ OK ] LlvmLibcQsortTest.SortedArray (27 us)
[ RUN ] LlvmLibcQsortTest.ReverseSortedArray
[ OK ] LlvmLibcQsortTest.ReverseSortedArray (19 us)
[ RUN ] LlvmLibcQsortTest.AllEqualElements
[ OK ] LlvmLibcQsortTest.AllEqualElements (10 us)
[ RUN ] LlvmLibcQsortTest.UnsortedArray1
[ OK ] LlvmLibcQsortTest.UnsortedArray1 (20 us)
[ RUN ] LlvmLibcQsortTest.UnsortedArray2
[ OK ] LlvmLibcQsortTest.UnsortedArray2 (7 us)
[ RUN ] LlvmLibcQsortTest.UnsortedArrayDuplicateElements1
[ OK ] LlvmLibcQsortTest.UnsortedArrayDuplicateElements1 (4 us)
[ RUN ] LlvmLibcQsortTest.UnsortedArrayDuplicateElements2
[ OK ] LlvmLibcQsortTest.UnsortedArrayDuplicateElements2 (7 us)
[ RUN ] LlvmLibcQsortTest.UnsortedArrayDuplicateElements3
[ OK ] LlvmLibcQsortTest.UnsortedArrayDuplicateElements3 (7 us)
[ RUN ] LlvmLibcQsortTest.UnsortedThreeElementArray1
[ OK ] LlvmLibcQsortTest.UnsortedThreeElementArray1 (2 us)
[ RUN ] LlvmLibcQsortTest.UnsortedThreeElementArray2
[ OK ] LlvmLibcQsortTest.UnsortedThreeElementArray2 (2 us)
[ RUN ] LlvmLibcQsortTest.UnsortedThreeElementArray3
[ OK ] LlvmLibcQsortTest.UnsortedThreeElementArray3 (2 us)
[ RUN ] LlvmLibcQsortTest.SameElementThreeElementArray
```
</details>
https://github.com/llvm/llvm-project/pull/192278
More information about the libc-commits
mailing list