Merge branch 'main' into dev
This commit is contained in:
commit
ff99a442e5
@ -8,6 +8,7 @@ debug = true
|
||||
[workspace]
|
||||
members = [
|
||||
"libafl",
|
||||
"libafl_derive",
|
||||
|
||||
#example fuzzers
|
||||
"fuzzers/libfuzzer_libpng",
|
||||
|
@ -23,11 +23,11 @@ We're still working on the documentation. In the meantime, you can watch the Vid
|
||||
[](http://www.youtube.com/watch?v=3RWkT1Q5IV0 "Fuzzers Like LEGO")
|
||||
## Roadmap for release
|
||||
|
||||
+ Minset corpus scheduler
|
||||
+ ~~Minset corpus scheduler~~ still doc missing
|
||||
+ Win32 shared mem and crash handler to have Windows in-process executor
|
||||
+ Other feedbacks examples (e.g. maximize allocations to spot OOMs)
|
||||
+ Other objectives examples (e.g. execution of a given program point)
|
||||
+ A macro crate with derive directives (e.g. for SerdeAny impl).
|
||||
+ ~~A macro crate with derive directives (e.g. for SerdeAny impl)~~ just `derive(SerdeAny)`, missing doc.
|
||||
+ Good documentation
|
||||
|
||||
For further TODOs, see [TODO.md](./TODO.md)
|
4
TODO.md
4
TODO.md
@ -1,11 +1,11 @@
|
||||
# TODOs
|
||||
|
||||
- [ ] Minset corpus scheduler
|
||||
- [x] ~~Minset corpus scheduler~~ still doc missing
|
||||
- [ ] Win32 shared mem and crash handler to have Windows in-process executor
|
||||
- [ ] Other feedbacks examples (e.g. maximize allocations to spot OOMs)
|
||||
- [ ] Other objectives examples (e.g. execution of a given program point)
|
||||
- [ ] Objective-Specific Corpuses (named per objective)
|
||||
- [ ] A macro crate with derive directives (e.g. for SerdeAny impl).
|
||||
- [x] A macro crate with derive directives (e.g. for SerdeAny impl).
|
||||
- [ ] Good documentation
|
||||
- [ ] LLMP brotli compression
|
||||
- [ ] Timeouts (timeout observer, objective)
|
||||
|
@ -30,10 +30,11 @@ harness = false
|
||||
#debug = true
|
||||
|
||||
[features]
|
||||
default = ["std", "anymapdbg"]
|
||||
default = ["std", "anymapdbg", "derive"]
|
||||
std = [] # print, sharedmap, ... support
|
||||
runtime = [] # a runtime for clang inmem-executor
|
||||
anymapdbg = [] # uses serde_json to Debug the anymap trait. Disable for smaller footprint.
|
||||
anymapdbg = ["serde_json"] # uses serde_json to Debug the anymap trait. Disable for smaller footprint.
|
||||
derive = ["libafl_derive"] # provide derive(SerdeAny) macro.
|
||||
|
||||
[[example]]
|
||||
name = "llmp_test"
|
||||
@ -49,8 +50,9 @@ serde = { version = "1.0", default-features = false, features = ["alloc"] } # se
|
||||
erased-serde = "0.3.12"
|
||||
postcard = { version = "0.5.1", features = ["alloc"] } # no_std compatible serde serialization fromat
|
||||
static_assertions = "1.1.0"
|
||||
serde_json = { version = "1.0", default-features = false, features = ["alloc"] } # an easy way to debug print SerdeAnyMap
|
||||
ctor = "0.1.3"
|
||||
ctor = "*"
|
||||
libafl_derive = { version = "*", optional = true, path = "../libafl_derive" }
|
||||
serde_json = { version = "1.0", optional = true, default-features = false, features = ["alloc"] } # an easy way to debug print SerdeAnyMap
|
||||
#TODO: for llmp brotli = { version = "3.3.0", default-features = false } # brotli compression
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
|
@ -12,6 +12,15 @@ extern crate static_assertions;
|
||||
#[macro_use]
|
||||
extern crate ctor;
|
||||
|
||||
// Re-export derive(SerdeAny)
|
||||
#[cfg(feature = "libafl_derive")]
|
||||
#[allow(unused_imports)]
|
||||
#[macro_use]
|
||||
extern crate libafl_derive;
|
||||
#[cfg(feature = "libafl_derive")]
|
||||
#[doc(hidden)]
|
||||
pub use libafl_derive::*;
|
||||
|
||||
pub mod bolts;
|
||||
pub mod corpus;
|
||||
pub mod events;
|
||||
|
12
libafl_derive/Cargo.toml
Normal file
12
libafl_derive/Cargo.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "libafl_derive"
|
||||
version = "0.1.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
||||
[dependencies]
|
||||
syn = { version = "1", features = ["full", "extra-traits"] }
|
||||
quote = "1"
|
12
libafl_derive/src/lib.rs
Normal file
12
libafl_derive/src/lib.rs
Normal file
@ -0,0 +1,12 @@
|
||||
extern crate proc_macro;
|
||||
use proc_macro::TokenStream;
|
||||
use quote::quote;
|
||||
use syn::{parse_macro_input, DeriveInput};
|
||||
|
||||
#[proc_macro_derive(SerdeAny)]
|
||||
pub fn libafl_serdeany_derive(input: TokenStream) -> TokenStream {
|
||||
let name = parse_macro_input!(input as DeriveInput).ident;
|
||||
TokenStream::from(quote! {
|
||||
libafl::impl_serdeany!(#name);
|
||||
})
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user