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
segfaults when using __del__ and weakrefs #42676
Comments
You can segfault Python by creating a weakref to an |
Logged In: YES Hmm, I was kind of hoping this report would get more attention. The problem is obvious if you read typeobject.c around line 660: the weakref |
Logged In: YES Hmm, maybe the referenced mayhem is more to do with clearing __dict__ than
? |
Logged In: YES Added to outstanding_crashes.py. |
Logged In: YES So after staring at this crasher it seemed to me to be that Attached is a patch to do this. Michael, can you have a look? |
Logged In: YES The clear_weakref(*list) only clears the first Now we're left with fixing the same bug in |
Logged In: YES After finally figuring out where *list was made NULL (and |
Brett, Michael, Armin, can we get this patch checked in for 2.5.1? |
I have just been waiting on someone to do a final code review on it. As soon as someone else signs off I will commit it. |
The first comment has a non-sensical (to me) phrase: "rely on part of theof the object". Otherwise, it looks fine to me. Please apply, if you can, before 2.5c1. |
rev. 53533 (for 25-maint) and rev. 53535 (trunk) have the patch with an improved comment. Py3K should eventually have its crasher file for this test deleted since classic classes will no longer be an issue. |
This got fixed for classic classes in r60057, |
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: