Skip to content

Commit 08fecd0

Browse files
Merge branch 'main' into proofs/idris2-cat-a-rmo-redesigns-119B
2 parents e8fabc4 + 2beddd0 commit 08fecd0

4 files changed

Lines changed: 17 additions & 9 deletions

File tree

impl/rust-cli/fuzz/fuzz_targets/fuzz_glob_expansion.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#![no_main]
1212

1313
use libfuzzer_sys::fuzz_target;
14+
use tempfile::TempDir;
1415
use vsh::glob::expand_glob;
1516

1617
fuzz_target!(|data: &[u8]| {
@@ -33,12 +34,18 @@ fuzz_target!(|data: &[u8]| {
3334
return;
3435
}
3536

37+
// Create temporary directory for glob expansion
38+
let temp = match TempDir::new() {
39+
Ok(t) => t,
40+
Err(_) => return,
41+
};
42+
3643
// Expand glob (should complete quickly or return error)
3744
// Should NEVER:
3845
// - Hang (exponential backtracking)
3946
// - Panic
4047
// - Use excessive memory
41-
let _ = expand_glob(pattern);
48+
let _ = expand_glob(pattern, temp.path());
4249

4350
// Test cases include:
4451
// - Simple wildcards: *.txt, file?.rs

impl/rust-cli/fuzz/fuzz_targets/fuzz_path_operations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fuzz_target!(|data: &[u8]| {
3535
Err(_) => return,
3636
};
3737

38-
let mut state = match ShellState::new(temp.path()) {
38+
let mut state = match ShellState::new(temp.path().to_str().unwrap()) {
3939
Ok(s) => s,
4040
Err(_) => return,
4141
};

impl/rust-cli/fuzz/fuzz_targets/fuzz_state_machine.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fuzz_target!(|data: &[u8]| {
5151
Err(_) => return,
5252
};
5353

54-
let mut state = match ShellState::new(temp.path()) {
54+
let mut state = match ShellState::new(temp.path().to_str().unwrap()) {
5555
Ok(s) => s,
5656
Err(_) => return,
5757
};
@@ -75,7 +75,7 @@ fuzz_target!(|data: &[u8]| {
7575
let _ = rm(&mut state, &target, true);
7676
}
7777
Action::Undo => {
78-
let _ = state.pop_undo();
78+
let _ = state.pop_redo();
7979
}
8080
Action::Redo => {
8181
let _ = state.pop_redo();
@@ -95,7 +95,7 @@ fuzz_target!(|data: &[u8]| {
9595
.map(|e| e.count())
9696
.unwrap_or(0);
9797

98-
while state.pop_undo().is_ok() {
98+
while state.pop_redo().is_ok() {
9999
// Keep undoing
100100
}
101101

proofs/lean4/FilesystemModel.lean

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/- Valence Shell - Filesystem Model (Lean 4)
22
3-
A formal model of POSIX-like filesystem operations for proving
4-
MAA (Mutually Assured Accountability) properties.
3+
A formal model of POSIX-like filesystem operations for proving
4+
MAA (Mutually Assured Accountability) properties.
55
6-
This model focuses on directory operations (mkdir/rmdir) with
7-
the goal of proving reversibility and correctness properties.
6+
This model focuses on directory operations (mkdir/rmdir) with
7+
the goal of proving reversibility and correctness properties.
88
-/
99

1010
-- Path Model
@@ -94,6 +94,7 @@ theorem nonempty_path_ne_parent (p : Path) (h : p ≠ []) :
9494
have hp2 : p.reverse = x :: rest := hp
9595
rw [heq] at hp2
9696
simp at hp2
97+
contradiction
9798

9899
theorem pathExists_emptyFS_root :
99100
pathExists rootPath emptyFS := by

0 commit comments

Comments
 (0)