Skip to content

fix(gpu-interop): clean up pooled GL slots on constructor failure#76

Merged
hyperb1iss merged 1 commit into
mainfrom
codex/fix-gl-resource-leak-in-gpu-importer
May 19, 2026
Merged

fix(gpu-interop): clean up pooled GL slots on constructor failure#76
hyperb1iss merged 1 commit into
mainfrom
codex/fix-gl-resource-leak-in-gpu-importer

Conversation

@hyperb1iss
Copy link
Copy Markdown
Owner

Motivation

  • Prevent leaking GL memory objects, textures, and framebuffers when LinuxGlFramebufferImporter::new fails partway through creating pooled ImportedFrameSlots, which previously dropped partially-constructed slots without invoking GL cleanup and could exhaust GPU resources.

Description

  • In crates/hypercolor-linux-gpu-interop/src/linux.rs update LinuxGlFramebufferImporter::new to explicitly call destroy_gl_resources on all previously-created slots if ImportedFrameSlot::create(...) returns an error, then return the original error to avoid partial-construction leaks.

Testing

  • Ran cargo test -p hypercolor-linux-gpu-interop --no-default-features --lib --no-run and the test build completed successfully.

Codex Task

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Warning

Rate limit exceeded

@hyperb1iss has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 42 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 423f6cec-993b-46fc-9df1-d130845c1707

📥 Commits

Reviewing files that changed from the base of the PR and between 72769dd and 9aa082e.

📒 Files selected for processing (1)
  • crates/hypercolor-linux-gpu-interop/src/linux.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-gl-resource-leak-in-gpu-importer

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hyperb1iss hyperb1iss force-pushed the codex/fix-gl-resource-leak-in-gpu-importer branch from 4b59a66 to 9aa082e Compare May 19, 2026 09:22
@hyperb1iss hyperb1iss merged commit 748c7f4 into main May 19, 2026
@hyperb1iss hyperb1iss deleted the codex/fix-gl-resource-leak-in-gpu-importer branch May 19, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant