Repository navigation
Commit 0b9d037
committed
Preserve errno across thread-state attachment in release builds
Keep the existing _PyThreadState_Attach errno save/restore in release
builds as well as debug builds. A release free-threaded attachment can
wait for GC or critical-section resumption and change errno, causing valid
directory EOF and cold FileFinder operations to raise spurious EAGAIN.
Add a public directory/scandir/FileFinder regression under real child-local
GC, without native diagnostic modules or third-party code. The identical
test fails on current main 3.16 before the four-guard-line change and passes
afterwards. Original IO, GC, threading and import suites also pass on the
native musl release FT source build. No installed SDK is modified.1 parent 9d4a35c commit 0b9d037
2 files changed
Lines changed: 82 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
13 | 66 | | |
14 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
15 | 97 | | |
16 | 98 | | |
17 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2383 | 2383 | | |
2384 | 2384 | | |
2385 | 2385 | | |
2386 | | - | |
2387 | 2386 | | |
2388 | 2387 | | |
2389 | 2388 | | |
2390 | | - | |
2391 | 2389 | | |
2392 | 2390 | | |
2393 | 2391 | | |
| |||
2434 | 2432 | | |
2435 | 2433 | | |
2436 | 2434 | | |
2437 | | - | |
2438 | 2435 | | |
2439 | | - | |
2440 | 2436 | | |
2441 | 2437 | | |
2442 | 2438 | | |
| |||
0 commit comments