Repository navigation
Commit aba373c
gh-159184: Do not intern NaN constants on the free-threaded build
compare_constants() matches floats by bits, but hash_const() uses the object
hash, which for a NaN depends on its address, so each NaN loaded by
marshal.loads() added an immortal entry to the constants table. Hashing the
bits would merge NaNs and shrink frozensets, so leave them out of the table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 9c37326 commit aba373c
2 files changed
Lines changed: 12 additions & 2 deletions
File tree
- Misc/NEWS.d/next/Core_and_Builtins
- Objects
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
178 | 186 | | |
179 | 187 | | |
180 | 188 | | |
| |||
0 commit comments