- 29 May, 2020 1 commit
-
-
Kirill Smelkov authored
Hello up there. To test my module that computes diff for BTrees I was playing with manually creating BTrees with different topologies[1,2] and hit the following bug that was leading to segmentation faults: C implementation of Tree.__setstate__ allows to pass in arbitrary objects in place of children and casts child to (Bucket*) if child type is not type of the tree _without further checking that type of the child is actually Bucket_ This leads to crashes when later the code, that is accessing tree nodes, goes to leafs, accesses passed in objects assuming they are buckets with corresponding C-level Bucket structure layout, and oops dereferences e.g. Bucket->keys, or Bucket->values from memory initialized via non-Bucket C-level data. -> Fix it by allowing to pass into tree.__setstate__ only children of either tree or bucket types. Note: for tree kind the type is checked exactly, because in many places C implementation already does `if (SameType_Check(tree, X))` and assumes X is of bucket kind if that check fails. For buckets we accept tree._bucket_type subclasses as they are handled correctly and bucket type for tree.firstbucket is already verified via "isinstance". Kirill P.S. test___setstate___to_multiple_buckets is adjusted to avoid test failures because Test_Tree._makeOne() was creating tree with ._bucket_type different from _Bucket defined in that test. [1] https://lab.nexedi.com/kirr/wendelin.core/blob/28010b7/wcfs/internal/xbtree.py [2] https://lab.nexedi.com/kirr/wendelin.core/blob/28010b7/wcfs/internal/xbtree_test.py /helped-by @jamadden
-
- 07 Apr, 2020 4 commits
-
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
Fix #140 by turning OverflowError into TypeError.
-
Jason Madden authored
This only showed up on Windows (because it follows the LLP64 data model). See https://ci.appveyor.com/project/mgedmin/btrees/builds/31998447/job/m3xs7q1d8b4u5u3b
-
- 06 Apr, 2020 2 commits
-
-
Jason Madden authored
Fingers crossed for 32-bit builds on Windows.
-
Jason Madden authored
-
- 22 Mar, 2020 5 commits
-
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
Ensure resolution order for all objects is consistent
-
Jason Madden authored
-
Jason Madden authored
Fixes #137.
-
- 21 Mar, 2020 5 commits
-
-
Éloi Rivard authored
Fixed tox 'docs' environment
-
Jason Madden authored
Fix __all__
-
Jason Madden authored
Python 3: Stop using undocumented PyLong_AS_LONG.
-
Jason Madden authored
Add unit tests for it and run the documentation tests that originaly caught the problem in CI. Fixes #132
-
Jason Madden authored
Since https://github.com/zopefoundation/persistent/issues/125 this would result in compiler warnings. No change note, this is an internal change. Fixes #131
-
- 20 Mar, 2020 1 commit
-
-
Éloi Rivard authored
-
- 18 Mar, 2020 3 commits
-
-
Éloi Rivard authored
Added internal documentation links
-
Éloi Rivard authored
-
Éloi Rivard authored
-
- 17 Mar, 2020 3 commits
-
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
Remove most all the boilerplate required to add new trees
-
- 16 Mar, 2020 2 commits
-
-
Éloi Rivard authored
Developper documentation improvements
-
Éloi Rivard authored
-
- 05 Mar, 2020 8 commits
-
-
Jason Madden authored
Generate the Python modules and test modules based off a description of the datatype. Several tests that were previously only used for a specific classes are now generalized and added to most trees, such as testing non-compliant keys and testing overflow for bounded values. Also always raise ``OverflowError`` for integer keys/values out of range.
-
Jason Madden authored
And some other small tweaks to the documentation to make cross-references work and things generally look good.
-
Jason Madden authored
-
Jason Madden authored
test__UUBTree.py is complete and passing on Python 3
-
Jason Madden authored
-
Jason Madden authored
Fix it. Also it's possible to statically know the expected value of using64bits for all included tree modules, so we don't need the (unexecuted) branch that creates (unused) test code in the *I* test modules.
-
Jason Madden authored
-
Jason Madden authored
And other small tweaks to bring test coverage up. Turns out there were several test methods being needlessly skipped.
-
- 13 Jan, 2020 1 commit
-
-
Forest Gregg authored
adds python 3.8 on macos to the travis build.
-
- 12 Jan, 2020 1 commit
-
-
Forest Gregg authored
-
- 21 Nov, 2019 1 commit
-
-
Marius Gedminas authored
-
- 13 Nov, 2019 1 commit
-
-
Marius Gedminas authored
Fix Python 3.5 MacOS wheel upload
-
- 12 Nov, 2019 1 commit
-
-
Marius Gedminas authored
Python 3.5 on Mac OS doesn't support TLS 1.2, which makes twine upload fail, but we can use system Python 2.7 for twine upload, which works. Also brings the rest of the Travis CI configuration closer in line to the rest of the packages updated for https://github.com/zopefoundation/meta/issues/11
-
- 09 Nov, 2019 1 commit
-
-
Jason Madden authored
Build using newer manylinux image.
-