[libc-commits] [libc] [libc] Added missing operator delete generated by gcc/clang (PR #67457)

Mikhail R. Gadelha via libc-commits libc-commits at lists.llvm.org
Thu Sep 28 06:29:07 PDT 2023


mikhailramalho wrote:

> 
> Do you happen to know why this appears here and not there? 

I'm still investigating, but it seems that the missing references are coming from the test classes, like `StrtoTest`, `LlvmLibcStrtoimaxTest`, etc.:
/usr/bin/ld: projects/libc/test/src/inttypes/CMakeFiles/libc.test.src.inttypes.strtoimax_test.__hermetic__.__build__.dir/strtoimax_test.cpp.o: in function `__llvm_libc_18_0_0_git::testing::Test::~Test()':
/home/mgadelha/tools/llvm-project/libc/test/UnitTest/LibcTest.h:112: undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: projects/libc/test/src/inttypes/CMakeFiles/libc.test.src.inttypes.strtoimax_test.__hermetic__.__build__.dir/strtoimax_test.cpp.o: in function `StrtoTest<long>::~StrtoTest()':
/home/mgadelha/tools/llvm-project/libc/test/src/stdlib/StrtolTest.h:29: undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: projects/libc/test/src/inttypes/CMakeFiles/libc.test.src.inttypes.strtoimax_test.__hermetic__.__build__.dir/strtoimax_test.cpp.o: in function `LlvmLibcStrtoimaxTest_AutomaticBaseSelection::~LlvmLibcStrtoimaxTest_AutomaticBaseSelection()':
/home/mgadelha/tools/llvm-project/libc/test/src/inttypes/strtoimax_test.cpp:15: undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: projects/libc/test/src/inttypes/CMakeFiles/libc.test.src.inttypes.strtoimax_test.__hermetic__.__build__.dir/strtoimax_test.cpp.o: in function `LlvmLibcStrtoimaxTest_MessyBaseSixteenDecode::~LlvmLibcStrtoimaxTest_MessyBaseSixteenDecode()':
/home/mgadelha/tools/llvm-project/libc/test/src/inttypes/strtoimax_test.cpp:15: undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: projects/libc/test/src/inttypes/CMakeFiles/libc.test.src.inttypes.strtoimax_test.__hermetic__.__build__.dir/strtoimax_test.cpp.o: in function `LlvmLibcStrtoimaxTest_CleanBaseSixteenDecode::~LlvmLibcStrtoimaxTest_CleanBaseSixteenDecode()':
/home/mgadelha/tools/llvm-project/libc/test/src/inttypes/strtoimax_test.cpp:15: undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: projects/libc/test/src/inttypes/CMakeFiles/libc.test.src.inttypes.strtoimax_test.__hermetic__.__build__.dir/strtoimax_test.cpp.o:/home/mgadelha/tools/llvm-project/libc/test/src/inttypes/strtoimax_test.cpp:15: more undefined references to `operator delete(void*, unsigned long)' follow
```

> I remember there was a recent patch that made the version with the alignment the default somewhere. Maybe we don't have any tests in integration that call `delete`?

I think @sivachandra mentioned on discord that changes were not required in the end. I can't find any commit that mentions the operator delete


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


More information about the libc-commits mailing list