Skip to content

Commit a5ddd4d

Browse files
Fix inconsistencies generated by _md_shrink.
This is causing assertion failures in ASSERT_CONSISTENT if an entry used to have a non null identity. Since the new entries will be concentrated at the beginning of the array, we shall "erase" the old entries that are at the end of the array and that won't be used anymore. This is enough to fix the core dump issues found in the testsuite of httpie in Fedora Rawhide.
1 parent 8ea6942 commit a5ddd4d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

multidict/_multilib/hashtable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ _md_shrink(MultiDictObject *md, bool update)
252252
if (old_ep->identity != NULL) {
253253
if (new_ep != old_ep) {
254254
*new_ep = *old_ep;
255+
old_ep->identity = NULL;
255256
}
256257
new_ep++;
257258
} else {

0 commit comments

Comments
 (0)