Commit 762cb25
pythongh-116510: Fix a Crash Due to Shared Immortal Interned Strings (pythongh-124865)
Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init. In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it. For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.
This is an un-revert of pythongh-124646 that then addresses the Py_TRACE_REFS
failures identified by pythongh-124785.
(cherry picked from commit f2cb399)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>1 parent 046687c commit 762cb25
3 files changed
Lines changed: 91 additions & 6 deletions
File tree
- Misc/NEWS.d/next/Core_and_Builtins
- Objects
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2218 | 2218 | | |
2219 | 2219 | | |
2220 | 2220 | | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
2221 | 2257 | | |
2222 | 2258 | | |
2223 | 2259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
290 | 307 | | |
291 | 308 | | |
292 | 309 | | |
293 | 310 | | |
294 | | - | |
295 | | - | |
296 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
297 | 321 | | |
298 | 322 | | |
299 | 323 | | |
| |||
304 | 328 | | |
305 | 329 | | |
306 | 330 | | |
307 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
308 | 335 | | |
309 | 336 | | |
310 | 337 | | |
| |||
14939 | 14966 | | |
14940 | 14967 | | |
14941 | 14968 | | |
| 14969 | + | |
| 14970 | + | |
| 14971 | + | |
| 14972 | + | |
14942 | 14973 | | |
14943 | 14974 | | |
14944 | 14975 | | |
| |||
14954 | 14985 | | |
14955 | 14986 | | |
14956 | 14987 | | |
| 14988 | + | |
| 14989 | + | |
| 14990 | + | |
| 14991 | + | |
14957 | 14992 | | |
14958 | 14993 | | |
14959 | 14994 | | |
| |||
15140 | 15175 | | |
15141 | 15176 | | |
15142 | 15177 | | |
| 15178 | + | |
| 15179 | + | |
| 15180 | + | |
| 15181 | + | |
| 15182 | + | |
| 15183 | + | |
| 15184 | + | |
15143 | 15185 | | |
15144 | 15186 | | |
15145 | 15187 | | |
| |||
15658 | 15700 | | |
15659 | 15701 | | |
15660 | 15702 | | |
15661 | | - | |
15662 | | - | |
| 15703 | + | |
| 15704 | + | |
| 15705 | + | |
| 15706 | + | |
15663 | 15707 | | |
15664 | 15708 | | |
15665 | 15709 | | |
| |||
0 commit comments