[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:48:31 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-fullbuild-dbg-asan` 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/171/builds/1975

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 ] LlvmLibcSupportThreadsRawMutexTest.PSharedLock (2 ms)
Ran 3 tests.  PASS: 3  FAIL: 0
[818/822] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__unit__.__build__.dir/blockstore_test.cpp.o
[819/822] Running unit test libc.test.src.time.nanosleep_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcNanosleep.SmokeTest
[       OK ] LlvmLibcNanosleep.SmokeTest (54 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[820/822] Linking CXX executable projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__unit__.__build__
[821/822] 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-fullbuild/libc-x86_64-debian-fullbuild-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-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/test/src/__support && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-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 (14 us)
[ RUN      ] LlvmLibcBlockStoreTest.PopulateAndIterate8
[       OK ] LlvmLibcBlockStoreTest.PopulateAndIterate8 (12 us)
[ RUN      ] LlvmLibcBlockStoreTest.PopulateAndIterate10
[       OK ] LlvmLibcBlockStoreTest.PopulateAndIterate10 (26 us)
[ RUN      ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse4
[       OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse4 (3 us)
[ RUN      ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse8
[       OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse8 (18 us)
[ RUN      ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse10
[       OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse10 (12 us)
[ RUN      ] LlvmLibcBlockStoreTest.Back
[       OK ] LlvmLibcBlockStoreTest.Back (7 us)
[ RUN      ] LlvmLibcBlockStoreTest.BackReverse
[       OK ] LlvmLibcBlockStoreTest.BackReverse (6 us)
[ RUN      ] LlvmLibcBlockStoreTest.Empty
[       OK ] LlvmLibcBlockStoreTest.Empty (24 us)
[ RUN      ] LlvmLibcBlockStoreTest.Erase
=================================================================
==998118==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd1f84c5dc at pc 0x561231ac9967 bp 0x7ffd1f84c450 sp 0x7ffd1f84c448
WRITE of size 4 at 0x7ffd1f84c5dc thread T0
    #0 0x561231ac9966 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-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/blockstore.h:217:12
    #1 0x561231ac9966 in void LlvmLibcBlockStoreTest::erase_test<true>() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:99:17
    #2 0x561231abdc65 in LlvmLibcBlockStoreTest_Erase::Run() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:199:3
    #3 0x561231acc8d0 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-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.cpp:166:8
    #4 0x561231ae71a1 in main /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/UnitTest/LibcTestMain.cpp:51:10
    #5 0x7f02f7a46249  (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 58254ca972028402bc40624f81388d85ec95f70d)

Address 0x7ffd1f84c5dc is located in stack of thread T0 at offset 380 in frame
    #0 0x561231ac7f3f in void LlvmLibcBlockStoreTest::erase_test<true>() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:68

  This frame has 12 object(s):
    [32, 48) 'agg.tmp130562'
    [64, 80) 'agg.tmp118544'
    [96, 112) 'agg.tmp108509'
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[       OK ] LlvmLibcSupportThreadsRawMutexTest.PSharedLock (2 ms)
Ran 3 tests.  PASS: 3  FAIL: 0
[818/822] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__unit__.__build__.dir/blockstore_test.cpp.o
[819/822] Running unit test libc.test.src.time.nanosleep_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcNanosleep.SmokeTest
[       OK ] LlvmLibcNanosleep.SmokeTest (54 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[820/822] Linking CXX executable projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__unit__.__build__
[821/822] 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-fullbuild/libc-x86_64-debian-fullbuild-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-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/test/src/__support && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-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 (14 us)
[ RUN      ] LlvmLibcBlockStoreTest.PopulateAndIterate8
[       OK ] LlvmLibcBlockStoreTest.PopulateAndIterate8 (12 us)
[ RUN      ] LlvmLibcBlockStoreTest.PopulateAndIterate10
[       OK ] LlvmLibcBlockStoreTest.PopulateAndIterate10 (26 us)
[ RUN      ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse4
[       OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse4 (3 us)
[ RUN      ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse8
[       OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse8 (18 us)
[ RUN      ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse10
[       OK ] LlvmLibcBlockStoreTest.PopulateAndIterateReverse10 (12 us)
[ RUN      ] LlvmLibcBlockStoreTest.Back
[       OK ] LlvmLibcBlockStoreTest.Back (7 us)
[ RUN      ] LlvmLibcBlockStoreTest.BackReverse
[       OK ] LlvmLibcBlockStoreTest.BackReverse (6 us)
[ RUN      ] LlvmLibcBlockStoreTest.Empty
[       OK ] LlvmLibcBlockStoreTest.Empty (24 us)
[ RUN      ] LlvmLibcBlockStoreTest.Erase
=================================================================
==998118==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd1f84c5dc at pc 0x561231ac9967 bp 0x7ffd1f84c450 sp 0x7ffd1f84c448
WRITE of size 4 at 0x7ffd1f84c5dc thread T0
    #0 0x561231ac9966 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-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/blockstore.h:217:12
    #1 0x561231ac9966 in void LlvmLibcBlockStoreTest::erase_test<true>() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:99:17
    #2 0x561231abdc65 in LlvmLibcBlockStoreTest_Erase::Run() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:199:3
    #3 0x561231acc8d0 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-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.cpp:166:8
    #4 0x561231ae71a1 in main /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/UnitTest/LibcTestMain.cpp:51:10
    #5 0x7f02f7a46249  (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 58254ca972028402bc40624f81388d85ec95f70d)

Address 0x7ffd1f84c5dc is located in stack of thread T0 at offset 380 in frame
    #0 0x561231ac7f3f in void LlvmLibcBlockStoreTest::erase_test<true>() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/__support/blockstore_test.cpp:68

  This frame has 12 object(s):
    [32, 48) 'agg.tmp130562'
    [64, 80) 'agg.tmp118544'
    [96, 112) 'agg.tmp108509'

```

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


More information about the libc-commits mailing list