New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use after free in PyDict_merge #68595
Comments
# PyDict_Merge: * thread #1: tid = 27715, 0x080d1c1d python`insertdict(mp=0xb71d66f4, key=0x61682044, hash=543582496, value=0xb71d6664) + 132 at dictobject.c:819, name = 'python', stop reason = invalid address (fault address: 0x61682050)frame #0: 0x080d1c1d python`insertdict(mp=0xb71d66f4, key=0x61682044, hash=543582496, value=0xb71d6664) + 132 at dictobject.c:819816 if (ep == NULL) {817 return -1;818 }-> 819 assert(PyUnicode_CheckExact(key) || mp->ma_keys->dk_lookup == lookdict);820 Py_INCREF(value);821 MAINTAIN_TRACKING(mp, key, value);822 old_value = *value_addr; |
ping |
2 similar comments
ping |
ping |
Thanks for the report, paul. Please do not ping an issue after a day. Quoting from https://docs.python.org/devguide/patch.html?#reviewing "If your patch has not received any notice from reviewers (i.e., no comment made) after one month, first “ping” the issue on the issue tracker to remind the nosy list that the patch needs a review. If you don’t get a response within a few days after pinging the issue, then you can try emailing python-dev@python.org asking for someone to review your patch." |
The tracker won't let me assign this to myself. |
There are two parts to this fix. First, we raise a runtime exception if the other dict is modified during the update/merge. Patch attached. |
Hmm, I just wrote a very similar patch. Tell me what you think. :) |
If the tracker had let me assign the issue, you need not have wasted your time. Oh well. Indeed, your patch looks very similar to mine. |
Oh, he still might have written the patch, after all there isn't a lot of operational difference between the email that says "assigned to XXX" and the email that contains your text "consider this assigned". However, Benjamin has given you developer privs on the tracker, so in the future you can use assignment if you wish to :) |
New changeset 37fed8b02f00 by Benjamin Peterson in branch '3.3': New changeset 75da5acbfbe4 by Benjamin Peterson in branch '3.4': New changeset 6a7ee97cb0b1 by Benjamin Peterson in branch '3.5': New changeset 88814ddd5e9e by Benjamin Peterson in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: