`save_initial_snapshot` unconditionally hashes `debuginfo_source_directory`, and `save_symbolic_coverage` has an inverted `is_dir()` check
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Both spots are in src/lib.rs: the SourceCache::new(&self.debuginfo_source_directory) call near lines 943-945 inside save_initial_snapshot, and the is_dir() check near lines 1188-1191 inside save_symbolic_coverage. Read both functions end to end first, then confirm where symbolic_coverage and symbolic_coverage_directory are set on self so the new guards are correct when coverage is enabled. Done means SourceCache::new only runs when symbolic coverage is on, and the directory is created only when it is missing; since the reporter could not run SIMICS, verify with cargo build/cargo test and note in the PR that runtime behaviour was not reproduced.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Rust
- Stars
- 337
- Forks
- 26
- Avg merge
- 5h 33m
- Merged PRs (30d)
- 30
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from intel/tsffs
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
awxkee/yuvutils-rs#149 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Ignore entry for RUSTSEC-2026-0002 no longer matches anything (`lru` is no longer in `Cargo.lock`)Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
influxdata/influxdb#27767 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
shell-pool/shpool#463 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
oras-project/rust-oci-client-node#132 ·
Maintainers usually reply within 2 days