Repository navigation
Commit 4fb742c
authored
[no-ci] Fix Windows coverage test stack overflows (NVIDIA#3342)
Closes NVIDIA#3341.
Windows coverage tests overflow the default stack in uv-managed Python.
The existing `run_pytest_with_stack.py` enlarges only the pytest worker
thread's stack; samples, subprocess tests, and multiprocessing workers
start fresh interpreters with the executable's original stack reserve.
Running pytest on a worker thread can also delay deferred cleanup
scheduled on Python's main thread.
Add an opt-in `stack-reserve` input to `setup-hardened-python`. Both Windows
coverage jobs request at least 8 MiB. The action uses pinned `pefile` to
prepare a patched executable, replaces the original after Python exits,
and verifies the running interpreter's stack with
`GetCurrentThreadStackLimits`.
This consolidates stack preparation without requiring MSVC on GPU runners.
Remove the custom PE parser and its tests, replace the build job's
`editbin` step, and run pytest directly on the main thread. Keep
`continue-on-error: true`.
Validation:
- Verified patching of real PE32 and PE32+ executables, including preservation
of larger existing reserves.
- Exercised runtime-check success and failure paths with a simulated Windows API.
- YAML, Bash, embedded Python syntax, and Ruff checks passed.
- Native Windows coverage CI confirmation remains pending.1 parent 4862cc1 commit 4fb742c
3 files changed
Lines changed: 55 additions & 72 deletions
File tree
- .github
- actions/setup-hardened-python
- workflows
- ci/tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | 254 | | |
262 | 255 | | |
263 | 256 | | |
| |||
381 | 374 | | |
382 | 375 | | |
383 | 376 | | |
384 | | - | |
| 377 | + | |
385 | 378 | | |
386 | 379 | | |
387 | 380 | | |
| 381 | + | |
388 | 382 | | |
389 | 383 | | |
390 | 384 | | |
| |||
435 | 429 | | |
436 | 430 | | |
437 | 431 | | |
438 | | - | |
439 | | - | |
440 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
441 | 435 | | |
442 | 436 | | |
443 | | - | |
444 | | - | |
| 437 | + | |
| 438 | + | |
445 | 439 | | |
446 | 440 | | |
447 | 441 | | |
448 | 442 | | |
449 | | - | |
| 443 | + | |
450 | 444 | | |
451 | 445 | | |
452 | | - | |
453 | | - | |
| 446 | + | |
| 447 | + | |
454 | 448 | | |
455 | 449 | | |
456 | 450 | | |
| |||
This file was deleted.
0 commit comments