Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-126033: fix a crash inxml.etree.ElementTree.Element.remove when concurrent mutations happen#126124
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
gh-126033: fix a crash inxml.etree.ElementTree.Element.remove when concurrent mutations happen#126124
Changes from1 commit
Commits
Show all changes
31 commits Select commitHold shift + click to select a range
abc121c Add versioning to XML elements.
picnixz4efa517 fix tests
picnixz4ca3cf0 fix portability issues
picnixza1950d1 fixup
picnixz9b6f559 unify versioning
picnixz00a7a7e handle evil mutations in `Element.remove`
picnixz59ade8f blurb
picnixz7fc9932 improve NEWS entry formulation
picnixze30756d remove versioning
picnixzf2b5bb1 fix tests
picnixz9f73517 improve detection and tests
picnixz70f2aad revert whitespaces
picnixz756b1eb amend NEWS
picnixz4b74caf improve test coverage
picnixzfd29203 align C implementation with Python implementation as much as possible
picnixze7033b6 fix tests and improve coverage
picnixz4d3cdd7 fix tests (i'll explain afterwards)
picnixz883e8d2 improve comments
picnixz220b669 change root name to avoid special wildcards
picnixz7f26430 avoid strong reference on the child to remove
picnixze8d84c8 address Serhiy's review
picnixz3a43c0f Merge branch 'main' into fix/xml-evil-remove-126033
picnixzbc52c04 Update Misc/NEWS.d/next/Library/2024-10-29-12-59-45.gh-issue-126033.s…
picnixzf4a4dae remove un-necessary subtest parameter
picnixz09a9fa9 Reduce the visual size of the tests
picnixzf5d352f fixup docs
picnixz2b47468 Merge branch 'main' into fix/xml-evil-remove-126033
picnixzdc576ab Merge branch 'main' into fix/xml-evil-remove-126033
picnixzce66ac7 Merge branch 'main' into fix/xml-evil-remove-126033
picnixz04cb600 do not pedantically test the pure Python implementation
picnixza0c2324 Merge branch 'main' into fix/xml-evil-remove-126033
picnixzFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
fix portability issues
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit4ca3cf04a5c56599c39f7b8caabdc3188d914fe4
There are no files selected for viewing
2 changes: 1 addition & 1 deletionLib/test/test_xml_etree_c.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletionsModules/_elementtree.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -231,9 +231,9 @@ typedef struct { | ||
| PyObject* _children[STATIC_CHILDREN]; | ||
| /* incremented whenever 'attrib' is externally mutated */ | ||
| size_t attrib_version; | ||
| /* incremented whenever children are externally mutated */ | ||
| size_t version; | ||
picnixz marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| } ElementObjectExtra; | ||
| typedef struct { | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.