[libc-commits] [libc] [libc] Add strftime_l (PR #127708)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Tue Feb 18 23:58:40 PST 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-fullbuild-dbg-asan` 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/171/builds/16118

<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)
...
[50/94] Generating header sys/mman.h from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/runtimes/../libc/include/sys/mman.yaml
[51/76] Generating header sys/uio.h from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/runtimes/../libc/include/sys/uio.yaml
[52/76] Generating header sys/select.h from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/runtimes/../libc/include/sys/select.yaml
[53/75] Generating header poll.h from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/runtimes/../libc/include/poll.yaml
[54/75] Generating header uchar.h from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/runtimes/../libc/include/uchar.yaml
[55/75] Generating header termios.h from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/runtimes/../libc/include/termios.yaml
[56/64] Generating header sys/wait.h from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/runtimes/../libc/include/sys/wait.yaml
[57/61] Generating header wchar.h from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/runtimes/../libc/include/wchar.yaml
[58/61] Generating header math.h from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/runtimes/../libc/include/math.yaml
[59/61] Building CXX object libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.o
FAILED: libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.o 
/usr/bin/clang++ -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-fullbuild-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -fsanitize=address -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -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 -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 -DLIBC_COPT_PUBLIC_PACKAGING -std=gnu++17 -MD -MT libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.o -MF libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.o.d -o libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:25:40: error: use of undeclared identifier 'buffsz'; did you mean 'buffer'?
  printf_core::WriteBuffer wb(buffer, (buffsz > 0 ? buffsz - 1 : 0));
                                       ^~~~~~
                                       buffer
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:22:38: note: 'buffer' declared here
                   (char *__restrict buffer, size_t count,
                                     ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:25:47: error: ordered comparison between pointer and zero ('char *' and 'int')
  printf_core::WriteBuffer wb(buffer, (buffsz > 0 ? buffsz - 1 : 0));
                                       ~~~~~~ ^ ~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:25:53: error: use of undeclared identifier 'buffsz'; did you mean 'buffer'?
  printf_core::WriteBuffer wb(buffer, (buffsz > 0 ? buffsz - 1 : 0));
                                                    ^~~~~~
                                                    buffer
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:22:38: note: 'buffer' declared here
                   (char *__restrict buffer, size_t count,
                                     ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:27:59: error: use of undeclared identifier 'timeptr'
  int ret = strftime_core::strftime_main(&writer, format, timeptr);
                                                          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:28:7: error: use of undeclared identifier 'buffsz'; did you mean 'buffer'?
  if (buffsz > 0) // if the buffsz is 0 the buffer may be a null pointer.
      ^~~~~~
      buffer
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:22:38: note: 'buffer' declared here
                   (char *__restrict buffer, size_t count,
                                     ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:28:14: error: ordered comparison between pointer and zero ('char *' and 'int')
  if (buffsz > 0) // if the buffsz is 0 the buffer may be a null pointer.
      ~~~~~~ ^ ~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:30:49: error: use of undeclared identifier 'buffsz'
  return (ret < 0 || static_cast<size_t>(ret) > buffsz) ? 0 : ret;
                                                ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:22:53: error: unused parameter 'count' [-Werror,-Wunused-parameter]
                   (char *__restrict buffer, size_t count,
                                                    ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/time/strftime_l.cpp:24:49: error: unused parameter 'tp' [-Werror,-Wunused-parameter]

```

</details>

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


More information about the libc-commits mailing list