Skip to content

Commit 3a3126a

Browse files
Swatinemkhuey
authored andcommitted
Add another fuzzing test, make build script run on Windows
1 parent 872bd14 commit 3a3126a

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

build.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ use std::io::Read;
7070
"no file name for AFL.rs seed test case",
7171
)
7272
})?;
73-
println!("cargo:rerun-if-changed=in/{}", Path::new(file_name).display());
73+
println!(
74+
"cargo:rerun-if-changed=in/{}",
75+
Path::new(file_name).display()
76+
);
77+
78+
// properly escape windows paths
79+
let path = path.to_string_lossy().replace("\\", "\\\\");
7480

7581
writeln!(
7682
&mut test_file,
@@ -85,7 +91,7 @@ fn test_afl_seed_{}() {{
8591
}}
8692
"#,
8793
file_name.to_string_lossy(),
88-
path.to_string_lossy()
94+
path
8995
)?;
9096
}
9197

@@ -190,7 +196,7 @@ use std::fmt::Write;
190196
Some(Err(e)) => return Err(e),
191197
};
192198

193-
if options.find("--no-params").is_some() {
199+
if options.contains("--no-params") {
194200
// This line is the expected demangled output without function and
195201
// template parameters, but we don't currently have such an option
196202
// in `cpp_demangle`, so just consume and ignore the line.
@@ -207,10 +213,10 @@ use std::fmt::Write;
207213
}
208214

209215
// Skip tests for unsupported languages or options.
210-
if options.find("--format=gnu-v3").is_none()
211-
|| options.find("--is-v3-ctor").is_some()
212-
|| options.find("--is-v3-dtor").is_some()
213-
|| options.find("--ret-postfix").is_some()
216+
if !options.contains("--format=gnu-v3")
217+
|| options.contains("--is-v3-ctor")
218+
|| options.contains("--is-v3-dtor")
219+
|| options.contains("--ret-postfix")
214220
{
215221
continue;
216222
}

in/sentry_recursion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_ZUlzjjlZZL1zStUlSt7j_Z3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjfjzL4t3kjIIjfjtUlSt7j_Z3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjfjzL4t3kjIIjfjzL4t7IjIjjzjjzSt7j_Z3kjIIjfjzStfjzSt7j_ZA3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjfjzL4t3kjIIjzL4t7IjIjjzjjzSt7j_Z3kjIIjfjzStfjzSt7j_ZA3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjfjzL4t3kjIIjfjzL4t7IjIjL1vfIIEEEjzjjSI

0 commit comments

Comments
 (0)