This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Arfrever, Mark.Shannon, pitrou, vstinner
Date 2014-10-16.12:45:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1413463538.01.0.244418169898.issue22653@psf.upfronthosting.co.za>
In-reply-to
Content
Looking down into the insertdict frame:

(gdb) p key
$14 = 'f'
(gdb) p old_value
$15 = <unknown at remote 0x7f27e766e678>
(gdb) p *ep
$16 = {me_hash = -3761688987579986997, me_key = 0x0, me_value = 0x0}


So this seems to have hit the following line in insertdict():

    if (old_value != NULL) {
        assert(ep->me_key != NULL && ep->me_key != dummy);
        *value_addr = value;
--->    Py_DECREF(old_value); /* which **CAN** re-enter */
    }

And it *has* reentered because the ResourceWarning inserted the __warningregistry__ attribute into the __main__ dict.

Note the reentrancy looks safe: the dict should be in a stable state at this point (?). But the assert at the end of insertdict assumes the dict hasn't mutated... Why?
History
Date User Action Args
2014-10-16 12:45:38pitrousetrecipients: + pitrou, vstinner, Arfrever, Mark.Shannon
2014-10-16 12:45:38pitrousetmessageid: <1413463538.01.0.244418169898.issue22653@psf.upfronthosting.co.za>
2014-10-16 12:45:37pitroulinkissue22653 messages
2014-10-16 12:45:37pitroucreate