Skip to content

Commit

Permalink
Add another fuzzing test, make build script run on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem authored and khuey committed Jan 4, 2022
1 parent 872bd14 commit 3a3126a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
20 changes: 13 additions & 7 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ use std::io::Read;
"no file name for AFL.rs seed test case",
)
})?;
println!("cargo:rerun-if-changed=in/{}", Path::new(file_name).display());
println!(
"cargo:rerun-if-changed=in/{}",
Path::new(file_name).display()
);

// properly escape windows paths
let path = path.to_string_lossy().replace("\\", "\\\\");

writeln!(
&mut test_file,
Expand All @@ -85,7 +91,7 @@ fn test_afl_seed_{}() {{
}}
"#,
file_name.to_string_lossy(),
path.to_string_lossy()
path
)?;
}

Expand Down Expand Up @@ -190,7 +196,7 @@ use std::fmt::Write;
Some(Err(e)) => return Err(e),
};

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

// Skip tests for unsupported languages or options.
if options.find("--format=gnu-v3").is_none()
|| options.find("--is-v3-ctor").is_some()
|| options.find("--is-v3-dtor").is_some()
|| options.find("--ret-postfix").is_some()
if !options.contains("--format=gnu-v3")
|| options.contains("--is-v3-ctor")
|| options.contains("--is-v3-dtor")
|| options.contains("--ret-postfix")
{
continue;
}
Expand Down
1 change: 1 addition & 0 deletions in/sentry_recursion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_ZUlzjjlZZL1zStUlSt7j_Z3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjfjzL4t3kjIIjfjtUlSt7j_Z3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjfjzL4t3kjIIjfjzL4t7IjIjjzjjzSt7j_Z3kjIIjfjzStfjzSt7j_ZA3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjfjzL4t3kjIIjzL4t7IjIjjzjjzSt7j_Z3kjIIjfjzStfjzSt7j_ZA3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjIjL1vfIIEEEjzjjfjzSt7j_Z3kjIIjfjzL4t3kjIIjfjzL4t7IjIjL1vfIIEEEjzjjSI

0 comments on commit 3a3126a

Please sign in to comment.