From 302dcecf7eafc80e3e27da635b8864c30911bbfd Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 18 May 2025 00:47:13 +0800 Subject: [PATCH 1/7] fix ci track: https://github.com/dtolnay/proc-macro2/pull/501 --- libafl_frida/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libafl_frida/Cargo.toml b/libafl_frida/Cargo.toml index d202be0cfaa..f7e8daa271c 100644 --- a/libafl_frida/Cargo.toml +++ b/libafl_frida/Cargo.toml @@ -125,3 +125,7 @@ winapi = { version = "0.3", features = [ errno = "0.3" [target.'cfg(target_vendor="apple")'.dependencies] mach-sys = { version = "0.5.4" } + +[patch.crates-io] +# Track issue: https://github.com/dtolnay/proc-macro2/pull/501 +proc-marco2 = { git = "https://github.com/wtdcode/proc-macro2", branch = "impl-proc-macro-span" } \ No newline at end of file From ee7829a1352d7336553169e7636123f00221f79e Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 18 May 2025 00:49:28 +0800 Subject: [PATCH 2/7] format toml --- libafl_frida/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libafl_frida/Cargo.toml b/libafl_frida/Cargo.toml index f7e8daa271c..1ba2351adc3 100644 --- a/libafl_frida/Cargo.toml +++ b/libafl_frida/Cargo.toml @@ -128,4 +128,4 @@ mach-sys = { version = "0.5.4" } [patch.crates-io] # Track issue: https://github.com/dtolnay/proc-macro2/pull/501 -proc-marco2 = { git = "https://github.com/wtdcode/proc-macro2", branch = "impl-proc-macro-span" } \ No newline at end of file +proc-marco2 = { git = "https://github.com/wtdcode/proc-macro2", branch = "impl-proc-macro-span" } From b180217b4633d963779e615d97b88e28acc29dea Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 18 May 2025 01:11:18 +0800 Subject: [PATCH 3/7] fix typo --- Cargo.toml | 5 +++++ libafl_frida/Cargo.toml | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1862e5d5218..5e0b904b11f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -187,3 +187,8 @@ lto = true codegen-units = 1 opt-level = 3 debug = true + + +[patch.crates-io] +# Track issue: https://github.com/dtolnay/proc-macro2/pull/501 +proc-macro2 = { git = "https://github.com/wtdcode/proc-macro2", branch = "impl-proc-macro-span" } diff --git a/libafl_frida/Cargo.toml b/libafl_frida/Cargo.toml index 1ba2351adc3..d202be0cfaa 100644 --- a/libafl_frida/Cargo.toml +++ b/libafl_frida/Cargo.toml @@ -125,7 +125,3 @@ winapi = { version = "0.3", features = [ errno = "0.3" [target.'cfg(target_vendor="apple")'.dependencies] mach-sys = { version = "0.5.4" } - -[patch.crates-io] -# Track issue: https://github.com/dtolnay/proc-macro2/pull/501 -proc-marco2 = { git = "https://github.com/wtdcode/proc-macro2", branch = "impl-proc-macro-span" } From d7ab210ffcff60af6e3b370a206fed3f3ec41001 Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 18 May 2025 19:37:50 +0800 Subject: [PATCH 4/7] Use nightly for libafl_frida --- Cargo.toml | 5 ----- utils/ci_splitter/src/main.rs | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5e0b904b11f..1862e5d5218 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -187,8 +187,3 @@ lto = true codegen-units = 1 opt-level = 3 debug = true - - -[patch.crates-io] -# Track issue: https://github.com/dtolnay/proc-macro2/pull/501 -proc-macro2 = { git = "https://github.com/wtdcode/proc-macro2", branch = "impl-proc-macro-span" } diff --git a/utils/ci_splitter/src/main.rs b/utils/ci_splitter/src/main.rs index 17e6728e21a..064e84a5da5 100644 --- a/utils/ci_splitter/src/main.rs +++ b/utils/ci_splitter/src/main.rs @@ -67,9 +67,13 @@ fn main() -> Result<(), Box> { // run each task, with DOCS_RS override for libafl_frida let mut cmd = Command::new("bash"); - cmd.arg("-c").arg(task); + cmd.arg("-c"); if task.contains("libafl_frida") { cmd.env("DOCS_RS", "1"); + let task = task.replace("cargo ", "cargo +nightly "); + cmd.arg(task); + } else { + cmd.arg(task); } let status = cmd.status()?; if !status.success() { From 03e77cb2e13b2a92b7efc107363a798a1d58d77b Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 18 May 2025 19:38:28 +0800 Subject: [PATCH 5/7] Install nightly for splitter --- .github/workflows/build_and_test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 74a090f0848..2498f737628 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -166,6 +166,13 @@ jobs: with: { shared-key: "ubuntu" } # ---- build and feature check ---- # cargo-hack's --feature-powerset would be nice here but libafl has a too many knobs + + # Tracking: https://github.com/CensoredUsername/dynasm-rs/issues/114 + # One dep of libafl_frida fails on `DOCS_RS` for stable toolchain. Therefore, we _only_ run nightly for that. + # For the rest of other crates, we still use stable toolchain + - name: "Setup nightly but not default to it" + run: | + rustup toolchain install nightly - name: Check each feature # Skipping `python` as it has to be built with the `maturin` tool # `sancov_pcguard_edges` is tested seperatelyc From 8b60b219b5c4ec808d67da5310095a68014a9f85 Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 18 May 2025 19:46:08 +0800 Subject: [PATCH 6/7] Use dtolnay/rust-toolchain@nightly --- .github/workflows/build_and_test.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 2498f737628..4b14083f6f7 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -169,10 +169,13 @@ jobs: # Tracking: https://github.com/CensoredUsername/dynasm-rs/issues/114 # One dep of libafl_frida fails on `DOCS_RS` for stable toolchain. Therefore, we _only_ run nightly for that. - # For the rest of other crates, we still use stable toolchain - - name: "Setup nightly but not default to it" - run: | - rustup toolchain install nightly + # For the rest of other crates, we still use stable toolchain. + - name: "Setup nightly" + uses: dtolnay/rust-toolchain@nightly + with: + components: clippy, rustfmt + - name: "But default to stable" + run: rustup default stable - name: Check each feature # Skipping `python` as it has to be built with the `maturin` tool # `sancov_pcguard_edges` is tested seperatelyc From 4ba6962df32fa11ebc460a0a120b492ab66285e1 Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 18 May 2025 20:51:50 +0800 Subject: [PATCH 7/7] install ca-certificates --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 51b46efbd53..54b388e7196 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,7 @@ RUN apt-get update && \ python3-pip \ python3-venv \ software-properties-common \ + ca-certificates \ wget RUN set -ex &&\ wget https://apt.llvm.org/llvm.sh &&\