[Mlir-commits] [mlir] f6b87c0 - [asan] fix two memory leaks in integration tests

Aart Bik llvmlistbot at llvm.org
Tue Jan 24 12:35:44 PST 2023


Author: Aart Bik
Date: 2023-01-24T12:35:34-08:00
New Revision: f6b87c0029f124704c2fc87924db8b9a431b61c5

URL: https://github.com/llvm/llvm-project/commit/f6b87c0029f124704c2fc87924db8b9a431b61c5
DIFF: https://github.com/llvm/llvm-project/commit/f6b87c0029f124704c2fc87924db8b9a431b61c5.diff

LOG: [asan] fix two memory leaks in integration tests

Note that I did not track why this started failing exactly,
which is why I CC Matthias on this fix. But at least we run
asan clean again for the whole suite after this change.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D142496

Added: 
    

Modified: 
    mlir/test/Integration/Dialect/Memref/cast-runtime-verification.mlir
    mlir/test/Integration/Dialect/Vector/CPU/test-transfer-write.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/test/Integration/Dialect/Memref/cast-runtime-verification.mlir b/mlir/test/Integration/Dialect/Memref/cast-runtime-verification.mlir
index 5f551f8f8c74a..7da0b00337f2b 100644
--- a/mlir/test/Integration/Dialect/Memref/cast-runtime-verification.mlir
+++ b/mlir/test/Integration/Dialect/Memref/cast-runtime-verification.mlir
@@ -65,5 +65,7 @@ func.func @main() {
   // CHECK-NOT: ERROR: Runtime op verification failed
   func.call @valid_cast(%3) : (memref<*xf32>) -> (memref<?xf32>)
 
+  memref.dealloc %alloc : memref<5xf32>
+
   return
 }

diff  --git a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-write.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-write.mlir
index cee90c74c4659..4dbdc69fdb4d8 100644
--- a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-write.mlir
+++ b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-write.mlir
@@ -136,6 +136,8 @@ func.func @entry() {
     : memref<4x4x4xf32>, vector<4x4x4xf32>
   vector.print %r : vector<4x4x4xf32>
 
+  memref.dealloc %A1 : memref<4x4x4xf32>
+
   return
 }
 


        


More information about the Mlir-commits mailing list