Unverified Kaydet (Commit) 378c53cc authored tarafından Yury Selivanov's avatar Yury Selivanov Kaydeden (comit) GitHub

bpo-33803: Fix a crash in hamt.c (#7504)

üst c4f3cb77
Fix a crash in hamt.c caused by enabling GC tracking for an object that
hadn't all of its fields set to NULL.
...@@ -2476,6 +2476,8 @@ hamt_alloc(void) ...@@ -2476,6 +2476,8 @@ hamt_alloc(void)
if (o == NULL) { if (o == NULL) {
return NULL; return NULL;
} }
o->h_count = 0;
o->h_root = NULL;
o->h_weakreflist = NULL; o->h_weakreflist = NULL;
PyObject_GC_Track(o); PyObject_GC_Track(o);
return o; return o;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment