fix: close the tail items from the targeted re-audit

Resolves the 13 rows still partial in docs/rewrite/notes/review-rv4-
codex.md (details in final-Z5.md):
- Escaped config strings are decoded to raw bytes at every OS boundary:
  Flatpak cwd/argv to D-Bus, screen-file paths, the default config
  template, GHOSTTY_RESOURCES_DIR/TERMINFO/shell integration/
  bindtextdomain consumers, custom shader loading, list-themes hyperlinks.
- osbytes escapes literal U+FDD0 on non-Unix too (bijective everywhere);
  the GTK paste dialog only decodes text that was actually encoded.
- shadertoy: whole-array uses of iChannelTime rebuild a plain float[4]
  from the std140-padded members (naga-validated, MSL offsets checked).
- libghostty-vt: the OSC parser holds caller-allocated storage inline
  and command payloads borrow from it, so ghostty_osc_end performs no
  global allocations (verified from Rust and C).
- crash: aarch64 Linux minidump context fixed; macOS fatal signals record
  siginfo, registers and a fault-safe stack walk.
- tripwire: selectionString map allocation-failure cleanup test ported.
- libghostty-vt emits the versioned soname libghostty-vt.so.0 at build
  time (no patchelf needed at install).

Test Plan:
- cargo test --workspace (3342 passed)
- just check-macos; just check-macos x86_64-apple-darwin;
  just check-windows; just check-wasm
- cargo check --target aarch64-unknown-linux-gnu -p ghostty-crash
This commit is contained in:
ddidderr committed 2026-10-12 08:45:21 +02:00
1 parent 5bfc7bd856
commit 1a13e8b556
49 files changed
+1785 -557

No files matched your search

+6 -7
View File
@@ -10,9 +10,12 @@
//! `GHOSTTY_OUT_OF_MEMORY` where Zig can report it (object creation) and
//! invalidates the OSC being parsed where Zig's writer fails.
//!
//! Transient values built while a command is parsed (the payload copies the
//! per-command parsers make before `ghostty_osc_end` returns) use the global
//! allocator; nothing of them outlives that call.
//! Commands produced by `ghostty_osc_end` borrow their byte payloads from the
//! parser's storage (as Zig's do), so ending an OSC does not allocate for the
//! payload at all; the parser itself holds the storage inline (no `Box`). The
//! only values still built on the global allocator are the small request
//! lists of the color OSCs (4, 5, 10-19, 21, 104-119), which are not exposed
//! through the C API and are dropped before `ghostty_osc_end` returns.
#![allow(unsafe_code)]
use std::{alloc::Layout, ffi::c_void, ptr::NonNull};
@@ -276,8 +279,4 @@ impl ByteStorage for CByteStorage {
self.block = b;
}
}
fn clone_box(&self) -> Box<dyn ByteStorage> {
Box::new(self.bytes().to_vec())
}
}