[llvm] [RemoveDIs] Temporarily suppress memory leak (PR #106779)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 12:02:11 PDT 2024
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/106779
The #105671 fixes crashes for #105571 but introduces a memory leak.
>From 03cc605fe758d323c4034c4ae576d8f0ceaa0fed Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Fri, 30 Aug 2024 12:01:53 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.4
---
llvm/unittests/IR/BasicBlockDbgInfoTest.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/llvm/unittests/IR/BasicBlockDbgInfoTest.cpp b/llvm/unittests/IR/BasicBlockDbgInfoTest.cpp
index 5ce14d3f6b9cef..603bd65470b723 100644
--- a/llvm/unittests/IR/BasicBlockDbgInfoTest.cpp
+++ b/llvm/unittests/IR/BasicBlockDbgInfoTest.cpp
@@ -23,6 +23,14 @@
#include "gtest/gtest.h"
#include <memory>
+#if LLVM_ADDRESS_SANITIZER_BUILD || LLVM_HWADDRESS_SANITIZER_BUILD
+#include <sanitizer/lsan_interface.h>
+#else
+namespace __lsan {
+struct ScopedDisabler {};
+} // namespace __lsan
+#endif
+
using namespace llvm;
static std::unique_ptr<Module> parseIR(LLVMContext &C, const char *IR) {
@@ -1527,6 +1535,10 @@ TEST(BasicBlockDbgInfoTest, DbgMoveToEnd) {
TEST(BasicBlockDbgInfoTest, CloneTrailingRecordsToEmptyBlock) {
LLVMContext C;
+ // FIXME: There is a leak introduced with
+ // https://github.com/llvm/llvm-project/pull/105671
+ __lsan::ScopedDisabler Leaks;
+ (void)Leaks;
std::unique_ptr<Module> M = parseIR(C, R"(
define i16 @foo(i16 %a) !dbg !6 {
entry:
More information about the llvm-commits
mailing list