Commit c25f5f9
committed
fix(core): retain driver log buffers for CUlinkState lifetime
Linker_link was nulling self._drv_log_bufs right after cuLinkComplete,
releasing the bytearrays whose addresses were handed to the driver via
CU_JIT_INFO_LOG_BUFFER and CU_JIT_ERROR_LOG_BUFFER at cuLinkCreate time.
The CUlinkState retains those pointers until cuLinkDestroy, which runs
during Linker tp_dealloc. Freeing the bytearrays first left the driver
with dangling pointers and corrupted the heap; subsequent CUDA calls
(e.g. NVRTC compilation in the next test fixture) segfaulted.
This path became reachable in CI with the new per-instance backend
dispatch: CTK 12.9.1 + driver 13.0 runners now hit the driver linker
for cross-major linking, which was never exercised before.
Retain _drv_log_bufs until the cdef class is deallocated; pxd
declaration order ensures _culink_handle (and therefore cuLinkDestroy)
runs before the bytearrays are cleared.1 parent a4654e8 commit c25f5f9
2 files changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
632 | 634 | | |
633 | 635 | | |
634 | | - | |
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
| |||
0 commit comments