[libc-commits] [libc] [libc] Add proxy headers to handle memory allocation associated with the header `#include <stdlib.h> (PR #114690)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Sun Nov 3 11:32:36 PST 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/9605

<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)
...
[       OK ] LlvmLibcRandTest.SetSeed (5 us)
Ran 2 tests.  PASS: 2  FAIL: 0
[2687/3341] Running unit test libc.test.src.stdlib._Exit_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcStdlib._Exit
[       OK ] LlvmLibcStdlib._Exit (662 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[2688/3341] Linking CXX executable projects/libc/test/src/stdlib/libc.test.src.stdlib.qsort_r_test.__unit__.__build__
[2689/3341] Linking CXX executable projects/libc/test/src/stdlib/libc.test.src.stdlib.qsort_test.__unit__.__build__
[2690/3341] Building CXX object projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.at_quick_exit_test.__unit__.__build__.dir/at_quick_exit_test.cpp.o
FAILED: projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.at_quick_exit_test.__unit__.__build__.dir/at_quick_exit_test.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/stdlib -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdlib -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -fext-numeric-literals -Wno-pedantic -std=c++17 -MD -MT projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.at_quick_exit_test.__unit__.__build__.dir/at_quick_exit_test.cpp.o -MF projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.at_quick_exit_test.__unit__.__build__.dir/at_quick_exit_test.cpp.o.d -o projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.at_quick_exit_test.__unit__.__build__.dir/at_quick_exit_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdlib/at_quick_exit_test.cpp
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/include/mm_malloc.h:27,
                 from /usr/lib/gcc/x86_64-linux-gnu/12/include/xmmintrin.h:34,
                 from /usr/lib/gcc/x86_64-linux-gnu/12/include/immintrin.h:31,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/string/memory_utils/op_x86.h:26,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/string/memory_utils/x86_64/inline_memcpy.h:14,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/string/memory_utils/inline_memcpy.h:22,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/CPP/string.h:18,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:29,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/Test.h:37,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdlib/at_quick_exit_test.cpp:14:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include/stdlib.h:101:16: error: function ‘void _Exit(int)’ declared ‘[[noreturn]]’ but its first declaration was not
  101 | _Noreturn void _Exit(int) __NOEXCEPT;
      |                ^~~~~
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/test/src/stdlib/at_quick_exit_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/hdr/func/_Exit.h:13:17: note: previous declaration of ‘void _Exit(int)’
   13 | extern "C" void _Exit(int);
      |                 ^~~~~
[2691/3341] Running unit test libc.test.src.stdlib.strtoul_test.__unit__
[==========] Running 7 tests from 1 test suite.
[ RUN      ] LlvmLibcStrtoulTest.InvalidBase
[       OK ] LlvmLibcStrtoulTest.InvalidBase (5 us)
[ RUN      ] LlvmLibcStrtoulTest.CleanBaseTenDecode
[       OK ] LlvmLibcStrtoulTest.CleanBaseTenDecode (10 us)
[ RUN      ] LlvmLibcStrtoulTest.MessyBaseTenDecode
[       OK ] LlvmLibcStrtoulTest.MessyBaseTenDecode (7 us)
[ RUN      ] LlvmLibcStrtoulTest.DecodeInOtherBases
[       OK ] LlvmLibcStrtoulTest.DecodeInOtherBases (480 ms)
[ RUN      ] LlvmLibcStrtoulTest.CleanBaseSixteenDecode
[       OK ] LlvmLibcStrtoulTest.CleanBaseSixteenDecode (13 us)
[ RUN      ] LlvmLibcStrtoulTest.MessyBaseSixteenDecode
[       OK ] LlvmLibcStrtoulTest.MessyBaseSixteenDecode (4 us)
[ RUN      ] LlvmLibcStrtoulTest.AutomaticBaseSelection
[       OK ] LlvmLibcStrtoulTest.AutomaticBaseSelection (6 us)
Ran 7 tests.  PASS: 7  FAIL: 0
[2692/3341] Running unit test libc.test.src.stdlib.abort_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcStdlib.abort
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[       OK ] LlvmLibcRandTest.SetSeed (5 us)
Ran 2 tests.  PASS: 2  FAIL: 0
[2687/3341] Running unit test libc.test.src.stdlib._Exit_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcStdlib._Exit
[       OK ] LlvmLibcStdlib._Exit (662 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[2688/3341] Linking CXX executable projects/libc/test/src/stdlib/libc.test.src.stdlib.qsort_r_test.__unit__.__build__
[2689/3341] Linking CXX executable projects/libc/test/src/stdlib/libc.test.src.stdlib.qsort_test.__unit__.__build__
[2690/3341] Building CXX object projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.at_quick_exit_test.__unit__.__build__.dir/at_quick_exit_test.cpp.o
FAILED: projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.at_quick_exit_test.__unit__.__build__.dir/at_quick_exit_test.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/stdlib -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdlib -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -fext-numeric-literals -Wno-pedantic -std=c++17 -MD -MT projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.at_quick_exit_test.__unit__.__build__.dir/at_quick_exit_test.cpp.o -MF projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.at_quick_exit_test.__unit__.__build__.dir/at_quick_exit_test.cpp.o.d -o projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.at_quick_exit_test.__unit__.__build__.dir/at_quick_exit_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdlib/at_quick_exit_test.cpp
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/include/mm_malloc.h:27,
                 from /usr/lib/gcc/x86_64-linux-gnu/12/include/xmmintrin.h:34,
                 from /usr/lib/gcc/x86_64-linux-gnu/12/include/immintrin.h:31,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/string/memory_utils/op_x86.h:26,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/string/memory_utils/x86_64/inline_memcpy.h:14,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/string/memory_utils/inline_memcpy.h:22,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/CPP/string.h:18,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:29,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/Test.h:37,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/stdlib/at_quick_exit_test.cpp:14:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include/stdlib.h:101:16: error: function ‘void _Exit(int)’ declared ‘[[noreturn]]’ but its first declaration was not
  101 | _Noreturn void _Exit(int) __NOEXCEPT;
      |                ^~~~~
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/test/src/stdlib/at_quick_exit_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/hdr/func/_Exit.h:13:17: note: previous declaration of ‘void _Exit(int)’
   13 | extern "C" void _Exit(int);
      |                 ^~~~~
[2691/3341] Running unit test libc.test.src.stdlib.strtoul_test.__unit__
[==========] Running 7 tests from 1 test suite.
[ RUN      ] LlvmLibcStrtoulTest.InvalidBase
[       OK ] LlvmLibcStrtoulTest.InvalidBase (5 us)
[ RUN      ] LlvmLibcStrtoulTest.CleanBaseTenDecode
[       OK ] LlvmLibcStrtoulTest.CleanBaseTenDecode (10 us)
[ RUN      ] LlvmLibcStrtoulTest.MessyBaseTenDecode
[       OK ] LlvmLibcStrtoulTest.MessyBaseTenDecode (7 us)
[ RUN      ] LlvmLibcStrtoulTest.DecodeInOtherBases
[       OK ] LlvmLibcStrtoulTest.DecodeInOtherBases (480 ms)
[ RUN      ] LlvmLibcStrtoulTest.CleanBaseSixteenDecode
[       OK ] LlvmLibcStrtoulTest.CleanBaseSixteenDecode (13 us)
[ RUN      ] LlvmLibcStrtoulTest.MessyBaseSixteenDecode
[       OK ] LlvmLibcStrtoulTest.MessyBaseSixteenDecode (4 us)
[ RUN      ] LlvmLibcStrtoulTest.AutomaticBaseSelection
[       OK ] LlvmLibcStrtoulTest.AutomaticBaseSelection (6 us)
Ran 7 tests.  PASS: 7  FAIL: 0
[2692/3341] Running unit test libc.test.src.stdlib.abort_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcStdlib.abort

```

</details>

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


More information about the libc-commits mailing list