1350f659fa5ab1cfda9fae3a8fd0377663363d4f
Background threads (spawn_indexer, spawn_visual_height_rebuild) previously held mmap during entire file scan, risking SIGBUS if file was truncated externally. Now uses BufReader streaming scan with mmap created only after scan completes, plus stat validation. Changes: - spawn_indexer: replace mmap scan with BufReader fill_buf/consume loop, create mmap post-scan with fd stat validation - spawn_visual_height_rebuild: replace mmap/FileReader with sequential BufReader scan, discard results on line count mismatch - FileReader::open/reload/update_for_append: add stat-after-mmap check - LineIndex: make fields pub(crate) for direct construction from scan loop - Add 3 regression tests for truncation scenarios
Description
No description provided
Languages
Rust
100%