Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add another fuzzing test, make build script run on Windows #236

Merged
merged 1 commit into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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