Skip to content

Github workflows frida build on windows #536

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

Merged
merged 5 commits into from
Feb 13, 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
12 changes: 10 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,16 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
#- name: Build frida
# run: cd fuzzers/frida_libpng/ && cargo build --release
- name: Install LLVM and Clang # required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797
uses: KyleMayes/install-llvm-action@32c4866ebb71e0949e8833eb49beeebed48532bd
with:
version: "12.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- name: Build frida
run: cd fuzzers/frida_libpng/ && cargo build --release

macos:
runs-on: macOS-latest
steps:
Expand Down
6 changes: 2 additions & 4 deletions libafl_frida/src/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,8 @@ impl Allocator {
let base: usize = 2;
// On x64, if end > 2**48, then that's in vsyscall or something.
#[cfg(target_arch = "x86_64")]
if end <= base.pow(48) {
if end > userspace_max {
userspace_max = end;
}
if end <= base.pow(48) && end > userspace_max {
userspace_max = end;
}

// On x64, if end > 2**52, then range is not in userspace
Expand Down
7 changes: 2 additions & 5 deletions libafl_frida/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,8 @@ where

/// Pointer to coverage map
pub fn map_ptr_mut(&mut self) -> Option<*mut u8> {
if let Some(rt) = self.runtime_mut::<CoverageRuntime>() {
Some(rt.map_ptr_mut())
} else {
None
}
self.runtime_mut::<CoverageRuntime>()
.map(CoverageRuntime::map_ptr_mut)
}

/// Ranges
Expand Down
1 change: 1 addition & 0 deletions libafl_sugar/src/forkserver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ pub mod pybind {
impl ForkserverBytesCoverageSugar {
/// Create a new [`ForkserverBytesCoverageSugar`]
#[new]
#[allow(clippy::too_many_arguments)]
fn new(
input_dirs: Vec<PathBuf>,
output_dir: PathBuf,
Expand Down
1 change: 1 addition & 0 deletions libafl_sugar/src/inmemory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ pub mod pybind {
impl InMemoryBytesCoverageSugar {
/// Create a new [`InMemoryBytesCoverageSugar`]
#[new]
#[allow(clippy::too_many_arguments)]
fn new(
input_dirs: Vec<PathBuf>,
output_dir: PathBuf,
Expand Down
1 change: 1 addition & 0 deletions libafl_sugar/src/qemu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ pub mod pybind {
impl QemuBytesCoverageSugar {
/// Create a new [`QemuBytesCoverageSugar`]
#[new]
#[allow(clippy::too_many_arguments)]
fn new(
input_dirs: Vec<PathBuf>,
output_dir: PathBuf,
Expand Down