[asan] fix two memory leaks in integration tests
authorAart Bik <ajcbik@google.com>
Tue, 24 Jan 2023 19:57:16 +0000 (11:57 -0800)
committerAart Bik <ajcbik@google.com>
Tue, 24 Jan 2023 20:35:34 +0000 (12:35 -0800)
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

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

index 5f551f8..7da0b00 100644 (file)
@@ -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
 }
index cee90c7..4dbdc69 100644 (file)
@@ -136,6 +136,8 @@ func.func @entry() {
     : memref<4x4x4xf32>, vector<4x4x4xf32>
   vector.print %r : vector<4x4x4xf32>
 
+  memref.dealloc %A1 : memref<4x4x4xf32>
+
   return
 }