[libc-commits] [libc] [llvm] [libc] add option for hardened freelist (PR #205382)

via libc-commits libc-commits at lists.llvm.org
Tue Jun 23 10:10:16 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

The build failed before running any tests. Click on a failure below to see the details.

<details>
<summary>libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__.__build__.dir/freestore_test.cpp.o</summary>

```
FAILED: libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__.__build__.dir/freestore_test.cpp.o
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_23_0_0_git -I/home/gha/actions-runner/_work/llvm-project/llvm-project/libc -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libc -isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -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 -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Xclang -fno-pch-timestamp -O3 -DNDEBUG -std=gnu++17 -UNDEBUG -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 -ffixed-point -Wall -Wextra -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wstrict-prototypes -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wthread-safety -DLIBC_COMPILER_HAS_STDC_FENV_ACCESS -DLIBC_TEST=UNIT -MD -MT libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__.__build__.dir/freestore_test.cpp.o -MF libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__.__build__.dir/freestore_test.cpp.o.d -o libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__.__build__.dir/freestore_test.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:41:25: error: too few arguments to function call, expected 2, have 1
41 |   store.insert(too_small);
|   ~~~~~~~~~~~~          ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:42:25: error: too few arguments to function call, expected 2, have 1
42 |   store.insert(remainder);
|   ~~~~~~~~~~~~          ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:44:57: error: too few arguments to function call, expected 2, have 1
44 |   EXPECT_EQ(store.remove_best_fit(too_small.inner_size()).addr(),
|             ~~~~~~~~~~~~~~~~~~~~~                       ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:442:50: note: expanded from macro 'EXPECT_EQ'
442 | #define EXPECT_EQ(LHS, RHS) LIBC_TEST_BINOP_(EQ, LHS, RHS, )
|                                                  ^~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:435:72: note: expanded from macro 'LIBC_TEST_BINOP_'
435 |   LIBC_TEST_SCAFFOLDING_(test(LIBC_NAMESPACE::testing::TestCond::COND, LHS,    \
|                                                                        ^~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:428:7: note: expanded from macro 'LIBC_TEST_SCAFFOLDING_'
428 |   if (TEST)                                                                    \
|       ^~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:126:24: note: 'remove_best_fit' declared here
126 |   LIBC_INLINE BlockRef remove_best_fit(size_t size,
|                        ^               ~~~~~~~~~~~~
127 |                                        const FreeListSecrets &secrets) {
|                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:46:25: error: too few arguments to function call, expected 2, have 1
46 |   store.remove(too_small);
|   ~~~~~~~~~~~~          ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:125:20: note: 'remove' declared here
125 |   LIBC_INLINE void remove(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:70:24: error: too few arguments to function call, expected 2, have 1
70 |   store.insert(smallest);
|   ~~~~~~~~~~~~         ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:72:31: error: too few arguments to function call, expected 2, have 1
72 |     store.insert(largest_small);
|     ~~~~~~~~~~~~              ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:73:25: error: too few arguments to function call, expected 2, have 1
73 |   store.insert(remainder);
|   ~~~~~~~~~~~~          ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:78:65: error: too few arguments to function call, expected 2, have 1
78 |     BlockRef block = store.remove_best_fit(smallest.inner_size());
|                      ~~~~~~~~~~~~~~~~~~~~~                      ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:126:24: note: 'remove_best_fit' declared here
126 |   LIBC_INLINE BlockRef remove_best_fit(size_t size,
|                        ^               ~~~~~~~~~~~~
127 |                                        const FreeListSecrets &secrets) {
|                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:80:23: error: too few arguments to function call, expected 2, have 1
80 |     store.insert(block);
|     ~~~~~~~~~~~~      ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:82:71: error: too few arguments to function call, expected 2, have 1
82 |     BlockRef block2 = store.remove_best_fit(largest_small.inner_size());
|                       ~~~~~~~~~~~~~~~~~~~~~                           ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:126:24: note: 'remove_best_fit' declared here
126 |   LIBC_INLINE BlockRef remove_best_fit(size_t size,
|                        ^               ~~~~~~~~~~~~
127 |                                        const FreeListSecrets &secrets) {
|                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:84:24: error: too few arguments to function call, expected 2, have 1
84 |     store.insert(block2);
|     ~~~~~~~~~~~~       ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:86:65: error: too few arguments to function call, expected 2, have 1
86 |     BlockRef block = store.remove_best_fit(smallest.inner_size());
|                      ~~~~~~~~~~~~~~~~~~~~~                      ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:126:24: note: 'remove_best_fit' declared here
126 |   LIBC_INLINE BlockRef remove_best_fit(size_t size,
|                        ^               ~~~~~~~~~~~~
127 |                                        const FreeListSecrets &secrets) {
|                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:88:23: error: too few arguments to function call, expected 2, have 1
88 |     store.insert(block);
|     ~~~~~~~~~~~~      ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:94:60: error: too few arguments to function call, expected 2, have 1
94 |   ASSERT_EQ(store.remove_best_fit(smallest.inner_size() + 1).addr(),
|             ~~~~~~~~~~~~~~~~~~~~~                          ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:443:50: note: expanded from macro 'ASSERT_EQ'
443 | #define ASSERT_EQ(LHS, RHS) LIBC_TEST_BINOP_(EQ, LHS, RHS, return)
|                                                  ^~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:435:72: note: expanded from macro 'LIBC_TEST_BINOP_'
435 |   LIBC_TEST_SCAFFOLDING_(test(LIBC_NAMESPACE::testing::TestCond::COND, LHS,    \
|                                                                        ^~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:428:7: note: expanded from macro 'LIBC_TEST_SCAFFOLDING_'
428 |   if (TEST)                                                                    \
|       ^~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:126:24: note: 'remove_best_fit' declared here
126 |   LIBC_INLINE BlockRef remove_best_fit(size_t size,
|                        ^               ~~~~~~~~~~~~
127 |                                        const FreeListSecrets &secrets) {
|                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:96:29: error: too few arguments to function call, expected 2, have 1
96 |   store.insert(next_smallest);
|   ~~~~~~~~~~~~              ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:99:65: error: too few arguments to function call, expected 2, have 1
99 |   EXPECT_EQ(store.remove_best_fit(largest_small.inner_size() + 1).addr(),
|             ~~~~~~~~~~~~~~~~~~~~~                               ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:442:50: note: expanded from macro 'EXPECT_EQ'
442 | #define EXPECT_EQ(LHS, RHS) LIBC_TEST_BINOP_(EQ, LHS, RHS, )
|                                                  ^~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:435:72: note: expanded from macro 'LIBC_TEST_BINOP_'
435 |   LIBC_TEST_SCAFFOLDING_(test(LIBC_NAMESPACE::testing::TestCond::COND, LHS,    \
|                                                                        ^~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:428:7: note: expanded from macro 'LIBC_TEST_SCAFFOLDING_'
428 |   if (TEST)                                                                    \
|       ^~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:126:24: note: 'remove_best_fit' declared here
126 |   LIBC_INLINE BlockRef remove_best_fit(size_t size,
|                        ^               ~~~~~~~~~~~~
127 |                                        const FreeListSecrets &secrets) {
|                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:115:21: error: too few arguments to function call, expected 2, have 1
115 |   store.insert(small);
|   ~~~~~~~~~~~~      ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:116:25: error: too few arguments to function call, expected 2, have 1
116 |   store.insert(remainder);
|   ~~~~~~~~~~~~          ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:124:20: note: 'insert' declared here
124 |   LIBC_INLINE void insert(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/__support/freestore_test.cpp:118:25: error: too few arguments to function call, expected 2, have 1
118 |   store.remove(remainder);
|   ~~~~~~~~~~~~          ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/freestore.h:125:20: note: 'remove' declared here
125 |   LIBC_INLINE void remove(BlockRef block, const FreeListSecrets &secrets);
|                    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the libc-commits mailing list