[libc-commits] [libc] [libc] Add getgrnam_r and getgrgid_r entrypoints (PR #224722)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Sat Sep 19 13:43:58 PDT 2026
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/51963
<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)
...
[ RUN ] LlvmLibcGrpUtilsTest.ParseGroupLine_MemberBufferTooSmall
[ OK ] LlvmLibcGrpUtilsTest.ParseGroupLine_MemberBufferTooSmall (4 us)
[ RUN ] LlvmLibcGrpUtilsTest.ParseLine_FixedBufferErangeWhenNoScratchSpace
[ OK ] LlvmLibcGrpUtilsTest.ParseLine_FixedBufferErangeWhenNoScratchSpace (4 us)
[ RUN ] LlvmLibcGrpUtilsTest.ParseLine_EmbeddedNullByteRejected
[ OK ] LlvmLibcGrpUtilsTest.ParseLine_EmbeddedNullByteRejected (3 us)
[ RUN ] LlvmLibcGrpUtilsTest.ParseLine_SuccessWithTailForMemberPointers
[ OK ] LlvmLibcGrpUtilsTest.ParseLine_SuccessWithTailForMemberPointers (10 us)
Ran 13 tests. PASS: 13 FAIL: 0
[1469/1481] Running unit test libc.test.src.grp.getgrnam_r_test
FAILED: libc/test/src/grp/CMakeFiles/libc.test.src.grp.getgrnam_r_test /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp/CMakeFiles/libc.test.src.grp.getgrnam_r_test
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp/libc.test.src.grp.getgrnam_r_test.__build__
[==========] Running 7 tests from 1 test suite.
[ RUN ] LlvmLibcGrpTest.GetGrnamRSuccess
[ OK ] LlvmLibcGrpTest.GetGrnamRSuccess (392 us)
[ RUN ] LlvmLibcGrpTest.GetGrnamRResultLivesInCallerBuffer
[ OK ] LlvmLibcGrpTest.GetGrnamRResultLivesInCallerBuffer (154 us)
[ RUN ] LlvmLibcGrpTest.GetGrnamRNotFound
[ OK ] LlvmLibcGrpTest.GetGrnamRNotFound (119 us)
[ RUN ] LlvmLibcGrpTest.GetGrnamRBufferTooSmallForRecord
[ OK ] LlvmLibcGrpTest.GetGrnamRBufferTooSmallForRecord (99 us)
[ RUN ] LlvmLibcGrpTest.GetGrnamRBufferTooSmallForMemberArray
[ OK ] LlvmLibcGrpTest.GetGrnamRBufferTooSmallForMemberArray (100 us)
[ RUN ] LlvmLibcGrpTest.GetGrnamRDoesNotDisturbIteration
[ OK ] LlvmLibcGrpTest.GetGrnamRDoesNotDisturbIteration (163 us)
[ RUN ] LlvmLibcGrpTest.NullPointerCrash
=================================================================
==1068655==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new vs free) on 0x6020000000f0
#0 0x55765014b0e2 in __interceptor_free (/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp/libc.test.src.grp.getgrnam_r_test.__build__+0xae0e2) (BuildId: 9f4232efe36012a84e67343d36767ce32aa694ae)
#1 0x55765019aed4 in __llvm_libc_20_0_0_git_delete /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/CPP/new.cpp:12:44
#2 0x55765018ec81 in __llvm_libc_20_0_0_git::testutils::FunctionCaller* __llvm_libc_20_0_0_git::testing::Test::createCallable<LlvmLibcGrpTest_NullPointerCrash::Run()::$_0>(LlvmLibcGrpTest_NullPointerCrash::Run()::$_0)::Callable::~Callable() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.h:225:12
#3 0x557650217891 in __llvm_libc_20_0_0_git::testutils::invoke_in_subprocess(__llvm_libc_20_0_0_git::testutils::FunctionCaller*, int) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/ExecuteFunctionUnix.cpp:107:3
#4 0x557650218033 in __llvm_libc_20_0_0_git::testing::Test::testProcessKilled(__llvm_libc_20_0_0_git::testutils::FunctionCaller*, int, char const*, char const*, __llvm_libc_20_0_0_git::testing::internal::Location) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcDeathTestExecutors.cpp:28:7
#5 0x55765018de34 in LlvmLibcGrpTest_NullPointerCrash::Run() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/grp/getgrnam_r_test.cpp:165:3
#6 0x5576501cde3f in __llvm_libc_20_0_0_git::testing::Test::runTests(__llvm_libc_20_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:171:8
#7 0x557650210488 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:59:10
#8 0x7fabe0765249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 93ac61ec5a8eb1396f9fbd350e3169a558528a40)
0x6020000000f0 is located 0 bytes inside of 16-byte region [0x6020000000f0,0x602000000100)
allocated by thread T0 here:
#0 0x55765018615d in operator new(unsigned long) (/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp/libc.test.src.grp.getgrnam_r_test.__build__+0xe915d) (BuildId: 9f4232efe36012a84e67343d36767ce32aa694ae)
#1 0x55765018e385 in __llvm_libc_20_0_0_git::testutils::FunctionCaller* __llvm_libc_20_0_0_git::testing::Test::createCallable<LlvmLibcGrpTest_NullPointerCrash::Run()::$_0>(LlvmLibcGrpTest_NullPointerCrash::Run()::$_0) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.h:231:12
#2 0x55765018dd34 in LlvmLibcGrpTest_NullPointerCrash::Run() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/grp/getgrnam_r_test.cpp:165:3
#3 0x5576501cde3f in __llvm_libc_20_0_0_git::testing::Test::runTests(__llvm_libc_20_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:171:8
#4 0x557650210488 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:59:10
#5 0x7fabe0765249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 93ac61ec5a8eb1396f9fbd350e3169a558528a40)
SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp/libc.test.src.grp.getgrnam_r_test.__build__+0xae0e2) (BuildId: 9f4232efe36012a84e67343d36767ce32aa694ae) in __interceptor_free
==1068655==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
Step 7 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[ RUN ] LlvmLibcGrpUtilsTest.ParseGroupLine_MemberBufferTooSmall
[ OK ] LlvmLibcGrpUtilsTest.ParseGroupLine_MemberBufferTooSmall (4 us)
[ RUN ] LlvmLibcGrpUtilsTest.ParseLine_FixedBufferErangeWhenNoScratchSpace
[ OK ] LlvmLibcGrpUtilsTest.ParseLine_FixedBufferErangeWhenNoScratchSpace (4 us)
[ RUN ] LlvmLibcGrpUtilsTest.ParseLine_EmbeddedNullByteRejected
[ OK ] LlvmLibcGrpUtilsTest.ParseLine_EmbeddedNullByteRejected (3 us)
[ RUN ] LlvmLibcGrpUtilsTest.ParseLine_SuccessWithTailForMemberPointers
[ OK ] LlvmLibcGrpUtilsTest.ParseLine_SuccessWithTailForMemberPointers (10 us)
Ran 13 tests. PASS: 13 FAIL: 0
[1469/1481] Running unit test libc.test.src.grp.getgrnam_r_test
FAILED: libc/test/src/grp/CMakeFiles/libc.test.src.grp.getgrnam_r_test /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp/CMakeFiles/libc.test.src.grp.getgrnam_r_test
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp/libc.test.src.grp.getgrnam_r_test.__build__
[==========] Running 7 tests from 1 test suite.
[ RUN ] LlvmLibcGrpTest.GetGrnamRSuccess
[ OK ] LlvmLibcGrpTest.GetGrnamRSuccess (392 us)
[ RUN ] LlvmLibcGrpTest.GetGrnamRResultLivesInCallerBuffer
[ OK ] LlvmLibcGrpTest.GetGrnamRResultLivesInCallerBuffer (154 us)
[ RUN ] LlvmLibcGrpTest.GetGrnamRNotFound
[ OK ] LlvmLibcGrpTest.GetGrnamRNotFound (119 us)
[ RUN ] LlvmLibcGrpTest.GetGrnamRBufferTooSmallForRecord
[ OK ] LlvmLibcGrpTest.GetGrnamRBufferTooSmallForRecord (99 us)
[ RUN ] LlvmLibcGrpTest.GetGrnamRBufferTooSmallForMemberArray
[ OK ] LlvmLibcGrpTest.GetGrnamRBufferTooSmallForMemberArray (100 us)
[ RUN ] LlvmLibcGrpTest.GetGrnamRDoesNotDisturbIteration
[ OK ] LlvmLibcGrpTest.GetGrnamRDoesNotDisturbIteration (163 us)
[ RUN ] LlvmLibcGrpTest.NullPointerCrash
=================================================================
==1068655==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new vs free) on 0x6020000000f0
#0 0x55765014b0e2 in __interceptor_free (/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp/libc.test.src.grp.getgrnam_r_test.__build__+0xae0e2) (BuildId: 9f4232efe36012a84e67343d36767ce32aa694ae)
#1 0x55765019aed4 in __llvm_libc_20_0_0_git_delete /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/CPP/new.cpp:12:44
#2 0x55765018ec81 in __llvm_libc_20_0_0_git::testutils::FunctionCaller* __llvm_libc_20_0_0_git::testing::Test::createCallable<LlvmLibcGrpTest_NullPointerCrash::Run()::$_0>(LlvmLibcGrpTest_NullPointerCrash::Run()::$_0)::Callable::~Callable() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.h:225:12
#3 0x557650217891 in __llvm_libc_20_0_0_git::testutils::invoke_in_subprocess(__llvm_libc_20_0_0_git::testutils::FunctionCaller*, int) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/ExecuteFunctionUnix.cpp:107:3
#4 0x557650218033 in __llvm_libc_20_0_0_git::testing::Test::testProcessKilled(__llvm_libc_20_0_0_git::testutils::FunctionCaller*, int, char const*, char const*, __llvm_libc_20_0_0_git::testing::internal::Location) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcDeathTestExecutors.cpp:28:7
#5 0x55765018de34 in LlvmLibcGrpTest_NullPointerCrash::Run() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/grp/getgrnam_r_test.cpp:165:3
#6 0x5576501cde3f in __llvm_libc_20_0_0_git::testing::Test::runTests(__llvm_libc_20_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:171:8
#7 0x557650210488 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:59:10
#8 0x7fabe0765249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 93ac61ec5a8eb1396f9fbd350e3169a558528a40)
0x6020000000f0 is located 0 bytes inside of 16-byte region [0x6020000000f0,0x602000000100)
allocated by thread T0 here:
#0 0x55765018615d in operator new(unsigned long) (/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp/libc.test.src.grp.getgrnam_r_test.__build__+0xe915d) (BuildId: 9f4232efe36012a84e67343d36767ce32aa694ae)
#1 0x55765018e385 in __llvm_libc_20_0_0_git::testutils::FunctionCaller* __llvm_libc_20_0_0_git::testing::Test::createCallable<LlvmLibcGrpTest_NullPointerCrash::Run()::$_0>(LlvmLibcGrpTest_NullPointerCrash::Run()::$_0) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.h:231:12
#2 0x55765018dd34 in LlvmLibcGrpTest_NullPointerCrash::Run() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/grp/getgrnam_r_test.cpp:165:3
#3 0x5576501cde3f in __llvm_libc_20_0_0_git::testing::Test::runTests(__llvm_libc_20_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:171:8
#4 0x557650210488 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:59:10
#5 0x7fabe0765249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 93ac61ec5a8eb1396f9fbd350e3169a558528a40)
SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/libc/test/src/grp/libc.test.src.grp.getgrnam_r_test.__build__+0xae0e2) (BuildId: 9f4232efe36012a84e67343d36767ce32aa694ae) in __interceptor_free
==1068655==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
```
</details>
https://github.com/llvm/llvm-project/pull/224722
More information about the libc-commits
mailing list