Skip to content

Improve glrenderer crash safety#84

Merged
zackslash merged 1 commit into
mainfrom
fix/glrenderer-crash-safety
Jul 18, 2026
Merged

Improve glrenderer crash safety#84
zackslash merged 1 commit into
mainfrom
fix/glrenderer-crash-safety

Conversation

@zackslash

Copy link
Copy Markdown
Owner

Memory-safety fixes for the kitty graphics upload path and PTY reader thread, all reachable from PTY output:

  • Key kitty texture staleness on the ghostty generation stamp, not byte length (was rendering stale on re-upload).
  • Set GL_UNPACK_ALIGNMENT=1 for GL_RGB uploads (was over-reading rows when width%4≠0).
  • Clamp image dims to GL_MAX_TEXTURE_SIZE + validate pixelsLen (closes a 32-bit ARM size_t overflow → heap over-read).
  • Detach PtyReaderThread in async stop() (was aborting on destruction).

@zackslash
zackslash merged commit 883bd7b into main Jul 18, 2026
3 checks passed
@zackslash
zackslash deleted the fix/glrenderer-crash-safety branch July 18, 2026 21:10
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