[PATCH] D150577: [CodeGen] Fix for MachineBasicBlock::rfindDebugLoc(instr_rend())
Thurston Dang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 09:37:08 PDT 2023
thurston added a comment.
In D150577#4372817 <https://reviews.llvm.org/D150577#4372817>, @bjope wrote:
> In D150577#4372783 <https://reviews.llvm.org/D150577#4372783>, @thurston wrote:
>
>> https://reviews.llvm.org/rGa23f9846163956b74ab578bc972415c015022d10
>> added llvm/unittests/CodeGen/MachineBasicBlockTest.cpp
>> which is leading to uninitialized memory errors:
>>
>> https://lab.llvm.org/buildbot/#/builders/239/builds/2416
>>
>> Direct leak of 48 byte(s) in 1 object(s) allocated from:
>> #0 0xaaaad2ec0254 in operator new(unsigned long) /b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:95:3
>> #1 0xaaaad821b360 in operator new /b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/IR/Metadata.cpp:531:40
>> #2 0xaaaad821b360 in llvm::MDTuple::getImpl(llvm::LLVMContext&, llvm::ArrayRef<llvm::Metadata*>, llvm::Metadata::StorageType, bool) /b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/IR/Metadata.cpp:937:20
>> #3 0xaaaad800a32c in getTemporary /b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/Metadata.h:1395:24
>> #4 0xaaaad800a32c in llvm::DIBuilder::createFunction(llvm::DIScope*, llvm::StringRef, llvm::StringRef, llvm::DIFile*, unsigned int, llvm::DISubroutineType*, unsigned int, llvm::DINode::DIFlags, llvm::DISubprogram::DISPFlags, llvm::MDTupleTypedArrayWrapper<llvm::DITemplateParameter>, llvm::DISubprogram*, llvm::MDTupleTypedArrayWrapper<llvm::DIType>, llvm::MDTupleTypedArrayWrapper<llvm::DINode>, llvm::StringRef) /b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/IR/DIBuilder.cpp:854:7
>> #5 0xaaaad30c3a8c in (anonymous namespace)::FindDebugLocTest_DifferentIterators_Test::TestBody() /b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/unittests/CodeGen/MachineBasicBlockTest.cpp:47:11
>> #6 0xaaaad90750e0 in HandleExceptionsInMethodIfSupported<testing::Test, void> /b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/third-party/unittest/googletest/src/gtest.cc
>>
>> (this was the closest Differential revision I could find for this file)
>
> Thanks!
> I've actually been working on a fix (struggled a bit to verify it since I'm not so used to running single unittests with asan, so it took some time to rebuild/rerun all tests using asan).
> But I've pushed a fix now that hopefully should work: https://reviews.llvm.org/rG28d418b16c6cd4836ad9d8bc8006d3dabe3c5559
Awesome, thanks Bjorn for the quick fix and reply!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150577/new/
https://reviews.llvm.org/D150577
More information about the llvm-commits
mailing list