bpo-36907: fix refcount bug in _PyStack_UnpackDict() by jdemeyer · Pull Request #13381 · python/cpython (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vstinner Ah, sorry. This isn't really about PEP 590, though. It's a refcounting bug, an object is deallocated while it's still in use.

In normal builds, the bug will manifest only if you clobber the memory after it is deallocated. The debug allocator (or valgrind) should catch it even if the L = [2**i for i in range(10000)] is not done.

Is it OK to rely on the debug allocator (or valgrind) to prevent regressions?

(If you don't have bandwidth for that either, let me know)