bpo-31337 Close a minor NULL dereference opportunity by warsaw · Pull Request #3282 · python/cpython (original) (raw)

@serhiy-storchaka Oh, I see what your reference to "Victor's runtime checks" are. Yes, I knew about the !PyErr_Occurred() check, but not the reference.

I don't agree that this is obviously dead code. You have to reason about the control flow, and assume that -DNDEBUG was not given, and that nothing changes to subtle break the assumptions in this code. With additional feedback, I am however willing to forego applying this in favor of a more comprehensive fix for bpo-31338.