Commit 59e9e7d
authored
Fix infinite loop on empty Buffer (#20024)
Currently `Buffer(b"")` (as opposite to `Buffer()`) can go into an
infinite loop when resizing. Fix this by allocating one more byte, that
is conveniently guaranteed by `bytes` ABI.
I also move the `librt/__init__.py` hack to tests, since this is the
only place where it is needed. I am still not sure why `*.so` from
`site-packages` is preferred over a "local" namespace package with the
same `*.so`.1 parent 4ff1830 commit 59e9e7d
File tree
4 files changed
+20
-4
lines changed- mypyc
- lib-rt
- test-data
- test
4 files changed
+20
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
668 | 667 | | |
669 | 668 | | |
670 | 669 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | | - | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2866 | 2866 | | |
2867 | 2867 | | |
2868 | 2868 | | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
2869 | 2878 | | |
2870 | 2879 | | |
2871 | 2880 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
288 | 294 | | |
289 | 295 | | |
290 | 296 | | |
| |||
0 commit comments