Commit 829735e
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 52bb1e7 commit 829735e
2 files changed
Lines changed: 5 additions & 4 deletions
| 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 | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
637 | | - | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
638 | 640 | | |
639 | 641 | | |
640 | | - | |
641 | 642 | | |
642 | 643 | | |
643 | 644 | | |
| |||
0 commit comments