Skip to content

Commit

Permalink
bpo-33803: Fix a crash in hamt.c (#7504)
Browse files Browse the repository at this point in the history
  • Loading branch information
1st1 committed Jun 8, 2018
1 parent c4f3cb7 commit 378c53c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
@@ -0,0 +1,2 @@
Fix a crash in hamt.c caused by enabling GC tracking for an object that
hadn't all of its fields set to NULL.
2 changes: 2 additions & 0 deletions Python/hamt.c
Expand Up @@ -2476,6 +2476,8 @@ hamt_alloc(void)
if (o == NULL) {
return NULL;
}
o->h_count = 0;
o->h_root = NULL;
o->h_weakreflist = NULL;
PyObject_GC_Track(o);
return o;
Expand Down

0 comments on commit 378c53c

Please sign in to comment.