[libc-commits] [libc] [libc] Use cpp::numeric_limits in preference to C23 <limits.h> macros (PR #102665)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Fri Aug 9 12:47:49 PDT 2024
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/3953
Here is the relevant piece of the build log for the reference:
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[ OK ] LlvmLibcStrtoumaxTest.CleanBaseSixteenDecode (53 us)
[ RUN ] LlvmLibcStrtoumaxTest.MessyBaseSixteenDecode
[ OK ] LlvmLibcStrtoumaxTest.MessyBaseSixteenDecode (4 us)
[ RUN ] LlvmLibcStrtoumaxTest.AutomaticBaseSelection
[ OK ] LlvmLibcStrtoumaxTest.AutomaticBaseSelection (6 us)
Ran 7 tests. PASS: 7 FAIL: 0
[1074/1085] Building CXX object projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__.__build__.dir/stdc_leading_zeros_ui_test.cpp.o
[1075/1085] Building CXX object projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_bit_floor_ui_test.__unit__.__build__.dir/stdc_bit_floor_ui_test.cpp.o
[1076/1085] Linking CXX executable projects/libc/test/src/stdbit/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__.__build__
[1077/1085] Running unit test libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__
FAILED: projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__ /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/stdbit && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/stdbit/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__.__build__
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcStdcLeadingZerosUiTest.Zero
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:15: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(0U)
Which is: 32
To be equal to: static_cast<unsigned>(__llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits)
Which is: 31
[ FAILED ] LlvmLibcStdcLeadingZerosUiTest.Zero
[ RUN ] LlvmLibcStdcLeadingZerosUiTest.OneHot
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 31
To be equal to: __llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits - i - 1
Which is: 30
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 30
To be equal to: __llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits - i - 1
Which is: 29
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 29
To be equal to: __llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits - i - 1
Which is: 28
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 28
To be equal to: __llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits - i - 1
Which is: 27
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 27
To be equal to: __llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits - i - 1
Which is: 26
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 26
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[ OK ] LlvmLibcStrtoumaxTest.CleanBaseSixteenDecode (53 us)
[ RUN ] LlvmLibcStrtoumaxTest.MessyBaseSixteenDecode
[ OK ] LlvmLibcStrtoumaxTest.MessyBaseSixteenDecode (4 us)
[ RUN ] LlvmLibcStrtoumaxTest.AutomaticBaseSelection
[ OK ] LlvmLibcStrtoumaxTest.AutomaticBaseSelection (6 us)
Ran 7 tests. PASS: 7 FAIL: 0
[1074/1085] Building CXX object projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__.__build__.dir/stdc_leading_zeros_ui_test.cpp.o
[1075/1085] Building CXX object projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_bit_floor_ui_test.__unit__.__build__.dir/stdc_bit_floor_ui_test.cpp.o
[1076/1085] Linking CXX executable projects/libc/test/src/stdbit/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__.__build__
[1077/1085] Running unit test libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__
FAILED: projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__ /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/stdbit && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/stdbit/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__.__build__
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcStdcLeadingZerosUiTest.Zero
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:15: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(0U)
Which is: 32
To be equal to: static_cast<unsigned>(__llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits)
Which is: 31
[ FAILED ] LlvmLibcStdcLeadingZerosUiTest.Zero
[ RUN ] LlvmLibcStdcLeadingZerosUiTest.OneHot
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 31
To be equal to: __llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits - i - 1
Which is: 30
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 30
To be equal to: __llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits - i - 1
Which is: 29
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 29
To be equal to: __llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits - i - 1
Which is: 28
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 28
To be equal to: __llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits - i - 1
Which is: 27
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 27
To be equal to: __llvm_libc_19_0_0_git::cpp::numeric_limits<int>::digits - i - 1
Which is: 26
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdbit/stdc_leading_zeros_ui_test.cpp:23: FAILURE
Expected: __llvm_libc_19_0_0_git::stdc_leading_zeros_ui(1U << i)
Which is: 26
```
https://github.com/llvm/llvm-project/pull/102665
More information about the libc-commits
mailing list