[all-commits] [llvm/llvm-project] 28d418: [unittest][codegen] Avoid memory leak in recently ...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Thu May 25 09:31:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 28d418b16c6cd4836ad9d8bc8006d3dabe3c5559
      https://github.com/llvm/llvm-project/commit/28d418b16c6cd4836ad9d8bc8006d3dabe3c5559
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2023-05-25 (Thu, 25 May 2023)

  Changed paths:
    M llvm/unittests/CodeGen/MachineBasicBlockTest.cpp

  Log Message:
  -----------
  [unittest][codegen] Avoid memory leak in recently added FindDebugLocTest unittest

Need to finalize the DIBuilder to avoid leak sanitizer errors
like this:

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x55c99ea1761d in operator new(unsigned long)
    #1 0x55c9a518ae49 in operator new
    #2 0x55c9a518ae49 in llvm::MDTuple::getImpl(...)
    #3 0x55c9a4f1b1ec in getTemporary
    #4 0x55c9a4f1b1ec in llvm::DIBuilder::createFunction(...)




More information about the All-commits mailing list