diff options
| author | Felix Croasdale <205819305+etcetera-yt@users.noreply.github.com> | 2026-11-22 17:26:51 -0600 |
|---|---|---|
| committer | Felix Croasdale <205819305+etcetera-yt@users.noreply.github.com> | 2026-11-22 17:26:51 -0600 |
| commit | c5c9ff002ac564a687a3f3f4a418079e9881c8e0 (patch) | |
| tree | 5a70e5e1e1faca36c1d0847cccc254bec3785289 /scripts/run_gpu_tests.py | |
| parent | aa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff) | |
gameinput: the poll thread no longer revives a force-feedback effect being released (RT-262)
ForceFeedbackEffect::Release() drops the count to 0 and deletes the
effect; its destructor then waits for g().mu to unlink it from the
device. In that window apply_effects (holding g().mu) could AddRef the
dying effect from 0 to 1, sync it after it was freed, and delete it a
second time with its own Release (@AAyberkU's finding).
apply_effects now takes a reference only on a live effect
(add_ref_if_live: a compare-exchange that never moves a count up from 0),
so an effect whose last Release ran is skipped.
gameinput_test: add_ref_if_live itself, and 20,000 effects created and
released while a second thread runs the poll step. With the old AddRef
that run ends in STATUS_HEAP_CORRUPTION (0xC0000374) every time here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/run_gpu_tests.py')
0 files changed, 0 insertions, 0 deletions