[libc-commits] [libc] [libc] Fix malloc Block alignment issue on riscv32 (PR #117815)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Thu Jan 16 12:00:10 PST 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `libc-riscv32-qemu-yocto-fullbuild-dbg` running on `rv32gc-qemu-system` while building `libc` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/196/builds/3664
<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)
...
103 | for (int i = 0; i < N; i++) {
| ~ ^ ~
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/test/src/__support/freelist_heap_test.cpp:249:20: warning: unused variable 'BUFFER_SIZE' [-Wunused-variable]
249 | constexpr size_t BUFFER_SIZE = 4096;
| ^~~~~~~~~~~
2 warnings generated.
[11/952] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.block_test.__unit__.__build__.dir/block_test.cpp.o
[12/952] Linking CXX executable libc/test/src/__support/libc.test.src.__support.freelist_heap_test.__unit__.__build__
[13/952] Linking CXX executable libc/test/src/__support/libc.test.src.__support.block_test.__unit__.__build__
[14/952] Running unit test libc.test.src.__support.freestore_test.__unit__
FAILED: libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__ /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__
cd /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/libc/test/src/__support && /home/libcrv32buildbot/cross.sh /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/libc/test/src/__support/libc.test.src.__support.freestore_test.__unit__.__build__
WARNING: libc/test/src/__support/libc.test.src.__support.block_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freelist_heap_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freelist_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freestore_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freetrie_test.__unit__.__build__ failed verification -- update discarded (will try again).
sh: line 1: /timer.19136: Permission denied
[==========] Running 3 tests from 1 test suite.
[ RUN ] LlvmLibcFreeStore.TooSmall
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/block.h:188: Assertion failed: 'reinterpret_cast<uintptr_t>(s) % alignof(max_align_t) == 0 && "usable space must be aligned to a multiple of max_align_t"' in function: 'const cpp::byte *__llvm_libc_20_0_0_git::Block::usable_space() const'
[15/952] Running unit test libc.test.src.__support.CPP.mutex_test.__unit__
WARNING: libc/test/src/__support/libc.test.src.__support.block_test.__unit__.__build__ failed verification -- update discarded (will try again).
sh: line 1: /timer.19117: Permission denied
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcMutexTest.Basic
[ OK ] LlvmLibcMutexTest.Basic (572 us)
[ RUN ] LlvmLibcMutexTest.AcquireLocked
[ OK ] LlvmLibcMutexTest.AcquireLocked (461 us)
Ran 2 tests. PASS: 2 FAIL: 0
[16/952] Running unit test libc.test.src.__support.CPP.algorithm_test.__unit__
WARNING: libc/test/src/__support/libc.test.src.__support.freestore_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freetrie_test.__unit__.__build__ failed verification -- update discarded (will try again).
sh: line 1: /timer.19119: Permission denied
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcAlgorithmTest.FindIfNot
[ OK ] LlvmLibcAlgorithmTest.FindIfNot (969 us)
[ RUN ] LlvmLibcAlgorithmTest.AllOf
[ OK ] LlvmLibcAlgorithmTest.AllOf (653 us)
Ran 2 tests. PASS: 2 FAIL: 0
[17/952] Running unit test libc.test.src.__support.CPP.limits_test.__unit__
WARNING: libc/test/src/__support/libc.test.src.__support.block_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freelist_heap_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freelist_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freestore_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freetrie_test.__unit__.__build__ failed verification -- update discarded (will try again).
sh: line 1: /timer.19155: Permission denied
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcLimitsTest.LimitsFollowSpec
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
103 | for (int i = 0; i < N; i++) {
| ~ ^ ~
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/test/src/__support/freelist_heap_test.cpp:249:20: warning: unused variable 'BUFFER_SIZE' [-Wunused-variable]
249 | constexpr size_t BUFFER_SIZE = 4096;
| ^~~~~~~~~~~
2 warnings generated.
[11/952] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.block_test.__unit__.__build__.dir/block_test.cpp.o
[12/952] Linking CXX executable libc/test/src/__support/libc.test.src.__support.freelist_heap_test.__unit__.__build__
[13/952] Linking CXX executable libc/test/src/__support/libc.test.src.__support.block_test.__unit__.__build__
[14/952] Running unit test libc.test.src.__support.freestore_test.__unit__
FAILED: libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__ /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__
cd /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/libc/test/src/__support && /home/libcrv32buildbot/cross.sh /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/libc/test/src/__support/libc.test.src.__support.freestore_test.__unit__.__build__
WARNING: libc/test/src/__support/libc.test.src.__support.block_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freelist_heap_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freelist_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freestore_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freetrie_test.__unit__.__build__ failed verification -- update discarded (will try again).
sh: line 1: /timer.19136: Permission denied
[==========] Running 3 tests from 1 test suite.
[ RUN ] LlvmLibcFreeStore.TooSmall
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/block.h:188: Assertion failed: 'reinterpret_cast<uintptr_t>(s) % alignof(max_align_t) == 0 && "usable space must be aligned to a multiple of max_align_t"' in function: 'const cpp::byte *__llvm_libc_20_0_0_git::Block::usable_space() const'
[15/952] Running unit test libc.test.src.__support.CPP.mutex_test.__unit__
WARNING: libc/test/src/__support/libc.test.src.__support.block_test.__unit__.__build__ failed verification -- update discarded (will try again).
sh: line 1: /timer.19117: Permission denied
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcMutexTest.Basic
[ OK ] LlvmLibcMutexTest.Basic (572 us)
[ RUN ] LlvmLibcMutexTest.AcquireLocked
[ OK ] LlvmLibcMutexTest.AcquireLocked (461 us)
Ran 2 tests. PASS: 2 FAIL: 0
[16/952] Running unit test libc.test.src.__support.CPP.algorithm_test.__unit__
WARNING: libc/test/src/__support/libc.test.src.__support.freestore_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freetrie_test.__unit__.__build__ failed verification -- update discarded (will try again).
sh: line 1: /timer.19119: Permission denied
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcAlgorithmTest.FindIfNot
[ OK ] LlvmLibcAlgorithmTest.FindIfNot (969 us)
[ RUN ] LlvmLibcAlgorithmTest.AllOf
[ OK ] LlvmLibcAlgorithmTest.AllOf (653 us)
Ran 2 tests. PASS: 2 FAIL: 0
[17/952] Running unit test libc.test.src.__support.CPP.limits_test.__unit__
WARNING: libc/test/src/__support/libc.test.src.__support.block_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freelist_heap_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freelist_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freestore_test.__unit__.__build__ failed verification -- update discarded (will try again).
WARNING: libc/test/src/__support/libc.test.src.__support.freetrie_test.__unit__.__build__ failed verification -- update discarded (will try again).
sh: line 1: /timer.19155: Permission denied
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcLimitsTest.LimitsFollowSpec
```
</details>
https://github.com/llvm/llvm-project/pull/117815
More information about the libc-commits
mailing list