[Lldb-commits] [compiler-rt] [lldb] Replace Python's deprecated tempfile.mktemp() with secure temp APIs (PR #210123)

Vitaly Buka via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 16 19:48:22 PDT 2026


================
@@ -35,7 +35,8 @@ def start_gdb_log(debugger, command, result, dict):
     else:
         args_len = len(args)
         if args_len == 0:
-            log_file = tempfile.mktemp()
+            with tempfile.NamedTemporaryFile(delete=False) as tmp:
----------------
vitalybuka wrote:

If one of this cases is incorrect, unlikely it will apply to the rest of the patch. So I slightly prefer to keep them separate for convenience of revert. And I see no benefits of keeping them together.


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


More information about the lldb-commits mailing list