Skip to content

Commit 6603289

Browse files
authored
[3.14] gh-159739: Avoid destroying a remote unwinder cache twice (GH-159982) (#160084)
Leave cleanup of the code-object cache to the unwinder deallocator if allocating the thread-local bytecode cache fails. (cherry picked from commit b577a54)
1 parent bcb9164 commit 6603289

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a double free if remote unwinder initialization runs out of memory.

‎Modules/_remote_debugging_module.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3277,7 +3277,6 @@ _remote_debugging_RemoteUnwinder___init___impl(RemoteUnwinderObject *self,
32773277
NULL
32783278
);
32793279
if (self->tlbc_cache == NULL) {
3280-
_Py_hashtable_destroy(self->code_object_cache);
32813280
PyErr_NoMemory();
32823281
set_exception_cause(self, PyExc_MemoryError, "Failed to create TLBC cache");
32833282
return -1;

0 commit comments

Comments
 (0)