Skip to content

fix(gpu): cu_state leak on import failure + gpu_dispatch_env TOCTOU (ADR-0840) - #259

Merged
lusoris merged 1 commit into
masterfrom
fix/gpu-dispatch-toctou-clean-20260530
May 30, 2026
Merged

lusoris merged 1 commit into
masterfrom
fix/gpu-dispatch-toctou-clean-20260530

Conversation

@lusoris

@lusoris lusoris commented May 30, 2026

Copy link
Copy Markdown
Contributor

Recreates closed PR #199's 6-file targeted change from current master. cu_state leak + gpu_dispatch_env TOCTOU fence.

no docs needed: internal C surface only; ADR-0840 + state.md row included in same PR.

Test plan

  • Local diff is 6 files only
  • CI: Sanitizers + Build green

Deep-dive deliverables (ADR-0108)

  • Research digest — no digest needed: tightly-scoped fix
  • Decision matrix — ADR-0840 ## Alternatives considered (in diff)
  • AGENTS.md invariant note — no rebase-sensitive invariants
  • Reproducer — ASan should report no leak after this PR
  • Changelog fragment — changelog.d/fixed/gpu-dispatch-toctou.md (in diff)
  • Rebase-notes entry — docs/rebase-notes.md updated (in diff)

Lint clean (CLAUDE §12 r12)

  • 6 files touched (2 C + 4 docs)

State drift (CLAUDE §12 r13)

  • docs/state.md updated (in diff)

FFmpeg-patch sync (CLAUDE §12 r14)

  • No public-API change — internal dispatch C functions only

🤖 Generated with Claude Code

…ADR-0840)

Recreates closed PR #199's 6-file targeted change from current master
(the original had cascading rebase conflicts from #197+#212+#256+#258).

- gpu_dispatch_env.c: TOCTOU window between getenv() and snapshot
- vmaf.c: cu_state leak on import failure path

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@lusoris
lusoris enabled auto-merge (squash) May 30, 2026 04:38
@lusoris
lusoris merged commit cba51a1 into master May 30, 2026
54 of 64 checks passed
@lusoris
lusoris deleted the fix/gpu-dispatch-toctou-clean-20260530 branch May 30, 2026 04:59
@lusoris lusoris added this to the 1.0.0 — First release milestone Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant