[libc] [llvm] [libc] clean up string_utils memory functions (PR #143031)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 6 11:26:11 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `libc,utils` at step 5 "compile-openmp".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/6844

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 5 (compile-openmp) failure: build (failure)
...
0.320 [273/99/315] Generating header math.h from /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/runtimes/../libc/include/math.yaml
0.326 [273/98/316] Building CXX object libc/src/stdlib/CMakeFiles/libc.src.stdlib.bsearch.dir/bsearch.cpp.o
0.328 [273/97/317] Generating /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/include/amdgcn-amd-amdhsa/llvm-libc-decls/math.h
0.341 [239/130/318] Building CXX object libc/src/stdlib/CMakeFiles/libc.src.stdlib.atoi.dir/atoi.cpp.o
0.341 [238/130/319] Building CXX object libc/src/stdlib/CMakeFiles/libc.src.stdlib.atol.dir/atol.cpp.o
0.342 [237/130/320] Building CXX object libc/src/stdlib/CMakeFiles/libc.src.stdlib.atoll.dir/atoll.cpp.o
0.342 [236/130/321] Building CXX object libc/src/stdlib/CMakeFiles/libc.src.stdlib.strtol.dir/strtol.cpp.o
0.343 [235/130/322] Building CXX object libc/src/stdlib/CMakeFiles/libc.src.stdlib.strtoull.dir/strtoull.cpp.o
0.343 [234/130/323] Building CXX object libc/src/stdlib/CMakeFiles/libc.src.stdlib.strtoll_l.dir/strtoll_l.cpp.o
0.344 [233/130/324] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.ferror.dir/ferror.cpp.o
FAILED: libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.ferror.dir/ferror.cpp.o 
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/clang++ --target=amdgcn-amd-amdhsa -DLIBC_NAMESPACE=__llvm_libc_21_0_0_git -D__LIBC_USE_FLOAT16_CONVERSION -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc -isystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/include/amdgcn-amd-amdhsa -O3 -DNDEBUG --target=amdgcn-amd-amdhsa -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS "-DLIBC_MATH=(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)" -fpie -DLIBC_FULL_BUILD -nostdlibinc -ffixed-point -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -nogpulib -fvisibility=hidden -fconvergent-functions -flto -Wno-multi-gpu -Xclang -mcode-object-version=none -DLIBC_COPT_PUBLIC_PACKAGING -UNDEBUG -MD -MT libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.ferror.dir/ferror.cpp.o -MF libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.ferror.dir/ferror.cpp.o.d -o libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.ferror.dir/ferror.cpp.o -c /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/ferror.cpp
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/ferror.cpp:17:25: error: unknown type name 'ferror'
   17 | LLVM_LIBC_FUNCTION(int, ferror, (::FILE * stream)) {
      |                         ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/ferror.cpp:17:34: error: a type specifier is required for all declarations
   17 | LLVM_LIBC_FUNCTION(int, ferror, (::FILE * stream)) {
      |                                  ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/ferror.cpp:17:1: error: a type specifier is required for all declarations
   17 | LLVM_LIBC_FUNCTION(int, ferror, (::FILE * stream)) {
      | ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/ferror.cpp:22:45: error: use of undeclared identifier 'stream'
   22 |         buffer->data[0] = file::from_stream(stream);
      |                                             ^~~~~~
4 errors generated.
0.344 [233/129/325] Building CXX object libc/src/stdlib/CMakeFiles/libc.src.stdlib.div.dir/div.cpp.o
0.344 [233/128/326] Building CXX object libc/src/stdlib/CMakeFiles/libc.src.stdlib.ldiv.dir/ldiv.cpp.o
0.344 [233/127/327] Building CXX object libc/src/stdlib/gpu/CMakeFiles/libc.src.stdlib.gpu.aligned_alloc.dir/aligned_alloc.cpp.o
0.344 [233/126/328] Building CXX object libc/src/locale/CMakeFiles/libc.src.locale.locale.dir/locale.cpp.o
0.345 [233/125/329] Building CXX object libc/src/locale/CMakeFiles/libc.src.locale.duplocale.dir/duplocale.cpp.o
0.345 [233/124/330] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.fseek.dir/fseek.cpp.o
FAILED: libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.fseek.dir/fseek.cpp.o 
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/clang++ --target=amdgcn-amd-amdhsa -DLIBC_NAMESPACE=__llvm_libc_21_0_0_git -D__LIBC_USE_FLOAT16_CONVERSION -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc -isystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/include/amdgcn-amd-amdhsa -O3 -DNDEBUG --target=amdgcn-amd-amdhsa -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS "-DLIBC_MATH=(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)" -fpie -DLIBC_FULL_BUILD -nostdlibinc -ffixed-point -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -nogpulib -fvisibility=hidden -fconvergent-functions -flto -Wno-multi-gpu -Xclang -mcode-object-version=none -DLIBC_COPT_PUBLIC_PACKAGING -UNDEBUG -MD -MT libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.fseek.dir/fseek.cpp.o -MF libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.fseek.dir/fseek.cpp.o.d -o libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.fseek.dir/fseek.cpp.o -c /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/fseek.cpp
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/fseek.cpp:17:25: error: unknown type name 'fseek'
   17 | LLVM_LIBC_FUNCTION(int, fseek, (::FILE * stream, long offset, int whence)) {
      |                         ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/fseek.cpp:17:33: error: a type specifier is required for all declarations
   17 | LLVM_LIBC_FUNCTION(int, fseek, (::FILE * stream, long offset, int whence)) {
      |                                 ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/fseek.cpp:17:1: error: a type specifier is required for all declarations
   17 | LLVM_LIBC_FUNCTION(int, fseek, (::FILE * stream, long offset, int whence)) {
      | ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/fseek.cpp:22:45: error: use of undeclared identifier 'stream'
   22 |         buffer->data[0] = file::from_stream(stream);
      |                                             ^~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/fseek.cpp:23:49: error: use of undeclared identifier 'offset'
   23 |         buffer->data[1] = static_cast<uint64_t>(offset);
      |                                                 ^~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/src/stdio/gpu/fseek.cpp:24:49: error: use of undeclared identifier 'whence'

```

</details>

https://github.com/llvm/llvm-project/pull/143031


More information about the llvm-commits mailing list