`save_initial_snapshot` unconditionally hashes `debuginfo_source_directory`, and `save_symbolic_coverage` has an inverted `is_dir()` check
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
两个位置都在 src/lib.rs 中:save_initial_snapshot 内第 943-945 行左右的 SourceCache::new(&self.debuginfo_source_directory) 调用,以及 save_symbolic_coverage 内第 1188-1191 行左右的 is_dir() 检查。请先完整阅读这两个函数,然后确认 symbolic_coverage 和 symbolic_coverage_directory 在 self 上是在哪里设置的,以确保在启用覆盖率时新增的保护条件是正确的。完成的标准是:只有在启用符号覆盖率时才运行 SourceCache::new,且只有目录缺失时才创建该目录。由于报告人无法运行 SIMICS,请使用 cargo build/cargo test 进行验证,并在 PR 中说明未复现运行时行为。
由索引模型根据 Issue 内容生成。
描述
Where
- https://github.com/intel/tsffs/blob/ed67e1c07ffb59ca45d4cd1ab1ed50a61effb60c/src/lib.rs#L943-L945
- https://github.com/intel/tsffs/blob/ed67e1c07ffb59ca45d4cd1ab1ed50a61effb60c/src/lib.rs#L1188-L1191
Problem
save_initial_snapshotcallsSourceCache::new(&self.debuginfo_source_directory)?unconditionally on every run, even whenself.symbolic_coverageisfalse.SourceCache::newwalks the directory and hashes every file with MD5, SHA1, and SHA256, propagating any read error out of the stop HAP (which panics Simics).save_symbolic_coveragewritesif self.symbolic_coverage_directory.is_dir() { create_dir_all(&self.symbolic_coverage_directory)?; }(missing!), making directory creation a no-op when the directory does not yet exist.
Impact
Non-symbolic fuzzing campaigns pay unnecessary startup I/O and abort Simics if debuginfo_source_directory contains an unreadable file. save_symbolic_coverage fails to create symbolic_coverage_directory itself when it does not exist.
Suggested fix
Gate SourceCache::new behind if self.symbolic_coverage, and negate line 1189 to if !self.symbolic_coverage_directory.is_dir().
Status
Found by reading the code at ed67e1c; not reproduced under SIMICS.
- 主要语言
- Rust
- 星标
- 337
- 派生
- 26
- 平均合并
- 5 小时 33 分钟
- 30 天内合并 PR
- 30
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
intel/tsffs 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 80/100
awxkee/yuvutils-rs#149 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
Ignore entry for RUSTSEC-2026-0002 no longer matches anything (`lru` is no longer in `Cargo.lock`)未关闭
难度 1/5 1 小时以内 新手友好度 72/100
influxdata/influxdb#27767 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
shell-pool/shpool#463 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
oras-project/rust-oci-client-node#132 ·
维护者通常 2 天内回复