Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
Comments
gh-120298: Fix use-after-free inlist_richcompare_impl#120303
gh-120298: Fix use-after-free inlist_richcompare_impl#120303sobolevn merged 3 commits intopython:mainfrom
list_richcompare_impl#120303Conversation
serhiy-storchaka left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
What bisect or deque do with this?
What tests were added for the similar case above?
serhiy-storchaka commentedJun 10, 2024
sobolevn commentedJun 10, 2024
Yes,@serhiy-storchaka, you are correct. I simplified the reproduction to: classevil(object):def__lt__(self,other):other.clear()returnNotImplementeda= [ [evil()]]a[0]<a# crash without this patch I've updated tests to store this test near |
serhiy-storchaka left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Thanks@sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Thanks@sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…nGH-120303)(cherry picked from commit141baba)Co-authored-by: Nikita Sobolev <mail@sobolevn.me>Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…nGH-120303)(cherry picked from commit141baba)Co-authored-by: Nikita Sobolev <mail@sobolevn.me>Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-120339 is a backport of this pull request to the3.12 branch. |
GH-120340 is a backport of this pull request to the3.13 branch. |
…n#120303)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…n#120303)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…n#120303)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
This code does the same thing as the code above it:
cpython/Objects/listobject.c
Lines 3360 to 3364 in0ae8579
And looks like it gets the job done. I've added tests for these two corner cases.