• Joined on 2026-04-07
dailz created repository dailz/wl-webrtc 2026-06-04 20:52:12 +08:00
dailz commented on issue dailz/logViewer#10 2026-06-04 17:33:21 +08:00
🔴 [H10] Loading 状态下忽略文件变更事件

已修复

提交: 534a089 fix(tui): defer file-change events during Loading state to prevent stale reader

修复方案:延迟重载标记

App 中新增 reload_after_loading: bool 标志位: …

dailz pushed to master at dailz/logViewer 2026-06-04 17:33:07 +08:00
534a089b58 fix(tui): defer file-change events during Loading state to prevent stale reader (closes #10)
dailz closed issue dailz/logViewer#10 2026-06-04 17:33:07 +08:00
🔴 [H10] Loading 状态下忽略文件变更事件
dailz closed issue dailz/logViewer#9 2026-06-04 16:37:46 +08:00
🔴 [H9] 运行时 panic/error 无终端恢复保护
dailz commented on issue dailz/logViewer#9 2026-06-04 16:37:38 +08:00
🔴 [H9] 运行时 panic/error 无终端恢复保护

审核结论:已修复

该 Issue 描述的问题已不存在于当前代码中

当前代码分析

crates/tui/src/main.rs 已实现完整的 RAII TerminalGuard 模式(第 29-76 行):

  1. Drop trait 已实现
dailz commented on issue dailz/logViewer#8 2026-06-04 16:15:50 +08:00
🔴 [H8] 初始文件加载失败 → 终端状态损坏

Fixed in b7938e0. RAII TerminalGuard with Drop cleanup. 88 tests pass. tmux integration test verified terminal restored on error exit (exit code 1) and normal exit (exit code 0).

dailz pushed to master at dailz/logViewer 2026-06-04 16:11:24 +08:00
b7938e069d fix(tui): RAII TerminalGuard prevents terminal corruption on error exit (closes #8)
dailz closed issue dailz/logViewer#8 2026-06-04 16:11:24 +08:00
🔴 [H8] 初始文件加载失败 → 终端状态损坏
dailz closed issue dailz/logViewer#7 2026-06-04 14:33:49 +08:00
🔴 [H7] 文件监控回调中使用阻塞 send
dailz pushed to master at dailz/logViewer 2026-06-04 14:33:49 +08:00
d40d70c600 fix(watcher): use try_send to prevent blocking notify callback
dailz closed issue dailz/logViewer#6 2026-06-04 14:10:57 +08:00
🔴 [H6] 后台 mmap 索引期间文件截断 → SIGBUS
dailz pushed to master at dailz/logViewer 2026-06-04 14:10:57 +08:00
1350f659fa fix(io): eliminate SIGBUS risk in background indexer threads (closes #6)
dailz pushed to master at dailz/logViewer 2026-06-04 13:30:23 +08:00
1bb6b2e9f3 fix: eliminate TOCTOU race in IndexCache::save (closes #5)
dailz closed issue dailz/logViewer#5 2026-06-04 13:30:23 +08:00
🔴 [H5] 后台索引器:索引快照与缓存哈希不匹配
dailz closed issue dailz/logViewer#4 2026-06-04 13:15:22 +08:00
🔴 [H4] 缓存指纹太弱 → 中间修改检测不到
dailz commented on issue dailz/logViewer#4 2026-06-04 13:15:15 +08:00
🔴 [H4] 缓存指纹太弱 → 中间修改检测不到

审核结论:关闭(风险极低)

技术缺陷确认属实compute_file_hashcore/io/index_cache.rs:63)确实只采样 head 4KB + tail 4KB + file_size,中间区域不参与指纹计算。

但实际风险极低: -…

dailz pushed to master at dailz/logViewer 2026-06-03 15:39:12 +08:00
bef0b44e91 fix(io): guard sampled_offsets index in get_line() to prevent panic on corrupt cache
dailz closed issue dailz/logViewer#3 2026-06-03 15:39:12 +08:00
🔴 [H3] 缓存损坏时 get_line() 会 panic
dailz commented on issue dailz/logViewer#2 2026-06-03 15:12:30 +08:00
🔴 [H2] mmap 与索引构建之间存在 TOCTOU 竞态

修复方案

根因: FileReader::open()reload() 中,mmap 映射(快照 A)和 LineIndex::from_reader(BufReader) (快照 B)是两个独立的文件读取操作。如果文件在两步之间被外部修改,索引偏移量…