[libc-commits] [libc] [libc] Add erase function to blockstore (PR #97641)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Fri Jul 12 10:47:46 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-dbg-asan` running on `libc-x86_64-debian` while building `libc` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/147/builds/1942
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)
...
[ RUN ] LlvmLibcStrtouint32Test.CleanBaseSixteenDecode
[ OK ] LlvmLibcStrtouint32Test.CleanBaseSixteenDecode (8 us)
[ RUN ] LlvmLibcStrtouint32Test.MessyBaseSixteenDecode
[ OK ] LlvmLibcStrtouint32Test.MessyBaseSixteenDecode (3 us)
[ RUN ] LlvmLibcStrtouint32Test.AutomaticBaseSelection
[ OK ] LlvmLibcStrtouint32Test.AutomaticBaseSelection (4 us)
Ran 14 tests. PASS: 14 FAIL: 0
[744/746] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__unit__.__build__.dir/blockstore_test.cpp.o
[745/746] Linking CXX executable projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__unit__.__build__
[746/746] Running unit test libc.test.src.__support.blockstore_test.__unit__
FAILED: projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__unit__ /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__unit__
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/__support && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__unit__.__build__
[==========] Running 10 tests from 1 test suite.
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterate4
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterate4 (11 us)
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterate8
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterate8 (5 us)
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterate10
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterate10 (10 us)
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse4
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse4 (3 us)
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse8
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse8 (4 us)
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse10
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse10 (5 us)
[ RUN ] LlvmLibcBlockStoreTest.Back
[ OK ] LlvmLibcBlockStoreTest.Back (11 us)
[ RUN ] LlvmLibcBlockStoreTest.BackReverse
[ OK ] LlvmLibcBlockStoreTest.BackReverse (14 us)
[ RUN ] LlvmLibcBlockStoreTest.Empty
[ OK ] LlvmLibcBlockStoreTest.Empty (16 us)
[ RUN ] LlvmLibcBlockStoreTest.Erase
=================================================================
==2512717==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd995a3b1c at pc 0x557ea964a5c5 bp 0x7ffd995a3990 sp 0x7ffd995a3988
WRITE of size 4 at 0x7ffd995a3b1c thread T0
#0 0x557ea964a5c4 in __llvm_libc_19_0_0_git::BlockStore<int, 2ul, true>::erase(__llvm_libc_19_0_0_git::BlockStore<int, 2ul, true>::Iterator) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/blockstore.h:217:12
#1 0x557ea964a5c4 in void LlvmLibcBlockStoreTest::erase_test<true>() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:99:17
#2 0x557ea963f925 in LlvmLibcBlockStoreTest_Erase::Run() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:199:3
#3 0x557ea964d570 in __llvm_libc_19_0_0_git::testing::Test::runTests(__llvm_libc_19_0_0_git::testing::TestOptions const&) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.cpp:166:8
#4 0x557ea9667e41 in main /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTestMain.cpp:51:10
#5 0x7f0c4c046249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 58254ca972028402bc40624f81388d85ec95f70d)
#6 0x7f0c4c046304 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27304) (BuildId: 58254ca972028402bc40624f81388d85ec95f70d)
#7 0x557ea957f660 in _start (/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__unit__.__build__+0x25660) (BuildId: 2f17b92160e143b234e7403a792d0f73a9a33825)
Address 0x7ffd995a3b1c is located in stack of thread T0 at offset 380 in frame
#0 0x557ea9648cff in void LlvmLibcBlockStoreTest::erase_test<true>() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:68
This frame has 12 object(s):
[32, 48) 'agg.tmp130560'
Step 7 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[ RUN ] LlvmLibcStrtouint32Test.CleanBaseSixteenDecode
[ OK ] LlvmLibcStrtouint32Test.CleanBaseSixteenDecode (8 us)
[ RUN ] LlvmLibcStrtouint32Test.MessyBaseSixteenDecode
[ OK ] LlvmLibcStrtouint32Test.MessyBaseSixteenDecode (3 us)
[ RUN ] LlvmLibcStrtouint32Test.AutomaticBaseSelection
[ OK ] LlvmLibcStrtouint32Test.AutomaticBaseSelection (4 us)
Ran 14 tests. PASS: 14 FAIL: 0
[744/746] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__unit__.__build__.dir/blockstore_test.cpp.o
[745/746] Linking CXX executable projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__unit__.__build__
[746/746] Running unit test libc.test.src.__support.blockstore_test.__unit__
FAILED: projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__unit__ /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__unit__
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/__support && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__unit__.__build__
[==========] Running 10 tests from 1 test suite.
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterate4
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterate4 (11 us)
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterate8
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterate8 (5 us)
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterate10
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterate10 (10 us)
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse4
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse4 (3 us)
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse8
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse8 (4 us)
[ RUN ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse10
[ OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse10 (5 us)
[ RUN ] LlvmLibcBlockStoreTest.Back
[ OK ] LlvmLibcBlockStoreTest.Back (11 us)
[ RUN ] LlvmLibcBlockStoreTest.BackReverse
[ OK ] LlvmLibcBlockStoreTest.BackReverse (14 us)
[ RUN ] LlvmLibcBlockStoreTest.Empty
[ OK ] LlvmLibcBlockStoreTest.Empty (16 us)
[ RUN ] LlvmLibcBlockStoreTest.Erase
=================================================================
==2512717==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd995a3b1c at pc 0x557ea964a5c5 bp 0x7ffd995a3990 sp 0x7ffd995a3988
WRITE of size 4 at 0x7ffd995a3b1c thread T0
#0 0x557ea964a5c4 in __llvm_libc_19_0_0_git::BlockStore<int, 2ul, true>::erase(__llvm_libc_19_0_0_git::BlockStore<int, 2ul, true>::Iterator) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/blockstore.h:217:12
#1 0x557ea964a5c4 in void LlvmLibcBlockStoreTest::erase_test<true>() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:99:17
#2 0x557ea963f925 in LlvmLibcBlockStoreTest_Erase::Run() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:199:3
#3 0x557ea964d570 in __llvm_libc_19_0_0_git::testing::Test::runTests(__llvm_libc_19_0_0_git::testing::TestOptions const&) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.cpp:166:8
#4 0x557ea9667e41 in main /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTestMain.cpp:51:10
#5 0x7f0c4c046249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 58254ca972028402bc40624f81388d85ec95f70d)
#6 0x7f0c4c046304 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27304) (BuildId: 58254ca972028402bc40624f81388d85ec95f70d)
#7 0x557ea957f660 in _start (/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__unit__.__build__+0x25660) (BuildId: 2f17b92160e143b234e7403a792d0f73a9a33825)
Address 0x7ffd995a3b1c is located in stack of thread T0 at offset 380 in frame
#0 0x557ea9648cff in void LlvmLibcBlockStoreTest::erase_test<true>() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:68
This frame has 12 object(s):
[32, 48) 'agg.tmp130560'
```
https://github.com/llvm/llvm-project/pull/97641
More information about the libc-commits
mailing list