[Mlir-commits] [mlir] [mlir][ROCDL] Fix file leak in SeralizeToHsaco and its newer form (PR #67711)

Fabian Mora llvmlistbot at llvm.org
Thu Sep 28 17:44:19 PDT 2023


================
@@ -386,6 +386,7 @@ AMDGPUSerializer::compileToBinary(const std::string &serializedISA) {
     return std::nullopt;
   }
   llvm::FileRemover cleanupHsaco(tempHsacoFilename);
+  llvm::sys::fs::closeFile(tempHsacoFD);
----------------
fabianmcg wrote:

```suggestion
  llvm::sys::fs::closeFile(llvm::sys::fs::convertFDToNativeFile(tempHsacoFD));
```

https://github.com/llvm/llvm-project/pull/67711


More information about the Mlir-commits mailing list