Skip to content

[RemoveDIs] Temporarily suppress memory leak #106779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

vitalybuka
Copy link
Collaborator

The #105671 fixes crashes for #105571 but introduces a memory leak.

Created using spr 1.3.4
@vitalybuka vitalybuka requested a review from OCHyams August 30, 2024 19:02
@llvmbot
Copy link
Member

llvmbot commented Aug 30, 2024

@llvm/pr-subscribers-llvm-ir

Author: Vitaly Buka (vitalybuka)

Changes

The #105671 fixes crashes for #105571 but introduces a memory leak.


Full diff: https://github.com./llvm/llvm-project/pull/106779.diff

1 Files Affected:

  • (modified) llvm/unittests/IR/BasicBlockDbgInfoTest.cpp (+12)
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:

@vitalybuka vitalybuka requested a review from thurstond August 30, 2024 19:02
@vitalybuka
Copy link
Collaborator Author

vitalybuka commented Aug 30, 2024

Already fixed with #106723

@vitalybuka vitalybuka closed this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants