From 3d31adcca177858e95f2a9b5fe3b83743b960c7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 22:28:00 +0100 Subject: [PATCH] Update ctor requirement to 0.4.0 (#3005) * Update ctor requirement from 0.2.9 to 0.3.6 --- updated-dependencies: - dependency-name: ctor dependency-type: direct:production ... Signed-off-by: dependabot[bot] * ctor 0.4.0 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dominik Maier Co-authored-by: Dominik Maier --- libafl_bolts/Cargo.toml | 2 +- libafl_bolts/src/lib.rs | 2 +- libafl_bolts/src/serdeany.rs | 8 ++++---- libafl_concolic/symcc_runtime/Cargo.toml | 2 +- utils/noaslr/libnoaslr/Cargo.toml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libafl_bolts/Cargo.toml b/libafl_bolts/Cargo.toml index dfffb75edf..199c81fdd9 100644 --- a/libafl_bolts/Cargo.toml +++ b/libafl_bolts/Cargo.toml @@ -141,7 +141,7 @@ num_enum = { workspace = true, default-features = false } ahash = { workspace = true, optional = true } # The hash function already used in hashbrown backtrace = { workspace = true, default-features = true, optional = true } # Used to get the stacktrace in StacktraceObserver -ctor = { optional = true, version = "0.2.9" } +ctor = { optional = true, version = "0.4.0" } miniz_oxide = { version = "0.8.0", optional = true } hostname = { version = "0.4.0", optional = true } # Is there really no gethostname in the stdlib? rand_core = { version = "0.9.0", optional = true } diff --git a/libafl_bolts/src/lib.rs b/libafl_bolts/src/lib.rs index 6207d65f1e..7281353058 100644 --- a/libafl_bolts/src/lib.rs +++ b/libafl_bolts/src/lib.rs @@ -77,7 +77,7 @@ pub extern crate alloc; #[cfg(feature = "ctor")] #[doc(hidden)] -pub use ctor::ctor; +pub use ctor; #[cfg(feature = "alloc")] pub mod anymap; #[cfg(feature = "std")] diff --git a/libafl_bolts/src/serdeany.rs b/libafl_bolts/src/serdeany.rs index 14be4c4864..6fc23087b4 100644 --- a/libafl_bolts/src/serdeany.rs +++ b/libafl_bolts/src/serdeany.rs @@ -840,17 +840,17 @@ impl<'de> Deserialize<'de> for Box { #[macro_export] macro_rules! create_register { ($struct_type:ty) => { - const _: () = { + $crate::ctor::declarative::ctor! { /// Automatically register this type - #[$crate::ctor] - fn register() { + #[ctor(anonymous)] + unsafe fn register() { // # Safety // This `register` call will always run at startup and never in parallel. unsafe { $crate::serdeany::RegistryBuilder::register::<$struct_type>(); } } - }; + } }; } diff --git a/libafl_concolic/symcc_runtime/Cargo.toml b/libafl_concolic/symcc_runtime/Cargo.toml index a0f91e025e..4ac7c162f9 100644 --- a/libafl_concolic/symcc_runtime/Cargo.toml +++ b/libafl_concolic/symcc_runtime/Cargo.toml @@ -36,7 +36,7 @@ libafl = { workspace = true, features = ["std", "serdeany_autoreg"] } libafl_bolts = { workspace = true, features = ["std", "serdeany_autoreg"] } unchecked_unwrap = "4.0.0" -ctor = "0.2.9" +ctor = "0.4.0" libc = { workspace = true } [build-dependencies] diff --git a/utils/noaslr/libnoaslr/Cargo.toml b/utils/noaslr/libnoaslr/Cargo.toml index ed1be271be..9a5fe8cdb0 100644 --- a/utils/noaslr/libnoaslr/Cargo.toml +++ b/utils/noaslr/libnoaslr/Cargo.toml @@ -12,7 +12,7 @@ crate-type = ["dylib"] [dependencies] anyhow = { version = "1.0", default-features = false } -ctor = { version = "0.2.9", default-features = false } +ctor = "0.4.0" nix = { version = "0.29", default-features = false, features = [ "process", "personality",