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
couple of new list.sort bugs #39596
Comments
I really feel I should apologise for this one: [mwh@pc150 build-debug]$ cat t.py l = range(10) This can be fixed by moving the "restoring the objects The second is less serious but probably more annoying [mwh@pc150 build-debug]$ cat u.py l = range(-2,2) |
Logged In: YES The second was easy to fix. The first is defying my attempts to fix it. You're welcome |
Logged In: YES Here's a much less devious test case: $ cat w.py
def k(x):
del l[:]
return x
l = range(10)
l.sort(key=k)
$ ./python w.py
Segmentation fault i think doing the "hide ob_item" swizzle should be just |
Logged In: YES Boy is this stuff hard to get right! See what you think of the attached patch. |
Logged In: YES On the code path leading to a dsu_fail, does PyMem_FREE() Would there be some added protection value to INCREFing self |
Logged In: YES
Good catch. New patch attached.
Um, I don't think so, as the calling machinery holds a |
Logged In: YES Looks good. |
Logged In: YES OK, checked in as: Objects/listobject.c revision 2.167 |
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: