Repository navigation
Commit f862b4b
authored
Fix Windows/x86 deallocation and sequence compatibility (#9427)
* Adopt pymath remainder fix on Windows
Pin pymath to the merged CPython-compatible remainder implementation and remove the passing Windows expected-failure marker.
Investigation, implementation, and validation assisted by Codex.
Assisted-by: Codex:GPT-5
* Keep deferred object deallocation iterative
Run deferred deallocators inside a guarded trashcan context so their end calls cannot recursively drain the same queue. Reset the depth on unwind and test the drain invariant. Fixes stack overflow while dropping deeply nested Element trees on Windows.
Investigation, implementation, validation, and focused review assisted by Codex.
Assisted-by: Codex:GPT-5
* Fix 32-bit sequence hashes, repetition errors, and range state
Use the declared 64-bit hash width for tuple hashing on every target, raise MemoryError for oversized sequence allocations, and preserve arbitrary-precision positions in long range iterators. Keep exhausted iterators exhausted instead of wrapping their counters.
Add Rust regression tests and verify the canonical Python suites with an optimized Windows x86 interpreter. Implementation, investigation, validation, and focused review assisted by Codex.
Assisted-by: Codex:GPT-51 parent 0342b80 commit f862b4b
7 files changed
Lines changed: 160 additions & 74 deletions
File tree
- Lib/test
- crates
- common/src
- vm/src
- builtins
- object
- vm
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1759 | 1759 | | |
1760 | 1760 | | |
1761 | 1761 | | |
1762 | | - | |
1763 | 1762 | | |
1764 | 1763 | | |
1765 | 1764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
240 | 223 | | |
241 | 224 | | |
242 | 225 | | |
| |||
309 | 292 | | |
310 | 293 | | |
311 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
312 | 307 | | |
313 | 308 | | |
314 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
376 | 375 | | |
377 | 376 | | |
378 | 377 | | |
379 | | - | |
| 378 | + | |
380 | 379 | | |
381 | 380 | | |
382 | 381 | | |
| |||
544 | 543 | | |
545 | 544 | | |
546 | 545 | | |
547 | | - | |
| 546 | + | |
548 | 547 | | |
549 | 548 | | |
550 | 549 | | |
| |||
566 | 565 | | |
567 | 566 | | |
568 | 567 | | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
| 568 | + | |
577 | 569 | | |
578 | 570 | | |
579 | 571 | | |
580 | | - | |
| 572 | + | |
581 | 573 | | |
582 | 574 | | |
583 | 575 | | |
| |||
594 | 586 | | |
595 | 587 | | |
596 | 588 | | |
597 | | - | |
| 589 | + | |
598 | 590 | | |
599 | 591 | | |
600 | 592 | | |
| |||
604 | 596 | | |
605 | 597 | | |
606 | 598 | | |
607 | | - | |
| 599 | + | |
| 600 | + | |
608 | 601 | | |
609 | 602 | | |
610 | 603 | | |
611 | 604 | | |
612 | 605 | | |
| 606 | + | |
613 | 607 | | |
614 | 608 | | |
615 | 609 | | |
616 | 610 | | |
617 | | - | |
| 611 | + | |
618 | 612 | | |
619 | 613 | | |
620 | 614 | | |
| |||
623 | 617 | | |
624 | 618 | | |
625 | 619 | | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
635 | 628 | | |
636 | | - | |
| 629 | + | |
| 630 | + | |
637 | 631 | | |
638 | 632 | | |
639 | 633 | | |
| |||
665 | 659 | | |
666 | 660 | | |
667 | 661 | | |
668 | | - | |
669 | | - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
670 | 667 | | |
671 | 668 | | |
672 | 669 | | |
| |||
676 | 673 | | |
677 | 674 | | |
678 | 675 | | |
679 | | - | |
| 676 | + | |
680 | 677 | | |
681 | 678 | | |
682 | 679 | | |
| |||
686 | 683 | | |
687 | 684 | | |
688 | 685 | | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
695 | 694 | | |
696 | 695 | | |
697 | 696 | | |
| |||
710 | 709 | | |
711 | 710 | | |
712 | 711 | | |
713 | | - | |
| 712 | + | |
714 | 713 | | |
715 | 714 | | |
716 | 715 | | |
717 | | - | |
718 | | - | |
719 | | - | |
| 716 | + | |
| 717 | + | |
720 | 718 | | |
721 | 719 | | |
722 | 720 | | |
| |||
727 | 725 | | |
728 | 726 | | |
729 | 727 | | |
730 | | - | |
731 | | - | |
| 728 | + | |
| 729 | + | |
732 | 730 | | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
| 731 | + | |
739 | 732 | | |
740 | 733 | | |
741 | 734 | | |
| |||
761 | 754 | | |
762 | 755 | | |
763 | 756 | | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
154 | 186 | | |
155 | 187 | | |
156 | 188 | | |
| |||
0 commit comments