[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:18 PDT 2023


================
@@ -410,6 +410,8 @@ SerializeToHsacoPass::createHsaco(const SmallVectorImpl<char> &isaBinary) {
     return {};
   }
   llvm::FileRemover cleanupHsaco(tempHsacoFilename);
+  // Prevent file descriptor leak.
+  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