Commit 9c8d18d
Round up the allocated size instead of rejecting the exact fit
Allocating one extra alignment block for a value whose encoded size is
a multiple of the alignment made a copy of the list wider than the
original. Round the size up instead, so that it is the same for the
same value, and keep allowing a value which fills the slot exactly:
rejecting it broke setting an 8-byte string in a slot of an integer.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 7abde77 commit 9c8d18d
3 files changed
Lines changed: 7 additions & 6 deletions
File tree
- Lib
- multiprocessing
- test
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
| 322 | + | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
| 474 | + | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5018 | 5018 | | |
5019 | 5019 | | |
5020 | 5020 | | |
5021 | | - | |
5022 | | - | |
| 5021 | + | |
| 5022 | + | |
| 5023 | + | |
5023 | 5024 | | |
5024 | 5025 | | |
5025 | | - | |
| 5026 | + | |
5026 | 5027 | | |
5027 | 5028 | | |
5028 | 5029 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments