Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fuzzing crashes with jemalloc ๐Ÿ˜ฑ๐Ÿ˜ฑ๐Ÿ˜ฑ๐Ÿ˜ฑ

phil a38ee2b5 390ef355

+11 -5
+1
Cargo.lock
··· 3816 3816 dependencies = [ 3817 3817 "jetstream", 3818 3818 "libfuzzer-sys", 3819 + "tikv-jemallocator", 3819 3820 "ufos", 3820 3821 ] 3821 3822
+3
ufos/fuzz/Cargo.toml
··· 16 16 [dependencies.jetstream] 17 17 path = "../../jetstream" 18 18 19 + [target.'cfg(not(target_env = "msvc"))'.dependencies] 20 + tikv-jemallocator = "0.6.0" 21 + 19 22 [[bin]] 20 23 name = "counts_value" 21 24 path = "fuzz_targets/counts_value.rs"
+7 -5
ufos/fuzz/fuzz_targets/counts_value.rs
··· 5 5 use ufos::store_types::CountsValue; 6 6 use libfuzzer_sys::fuzz_target; 7 7 8 + #[cfg(not(target_env = "msvc"))] 9 + use tikv_jemallocator::Jemalloc; 10 + 11 + #[cfg(not(target_env = "msvc"))] 12 + #[global_allocator] 13 + static GLOBAL: Jemalloc = Jemalloc; 14 + 8 15 fuzz_target!(|data: &[u8]| { 9 16 if let Ok((counts_value, n)) = CountsValue::from_db_bytes(data) { 10 17 assert!(n <= data.len()); ··· 14 21 assert_eq!(n_again, n); 15 22 assert_eq!(and_back.records(), counts_value.records()); 16 23 assert_eq!(and_back.dids().estimate(), counts_value.dids().estimate()); 17 - // assert_eq!(serialized, data[..n]); 18 - // counts_value.prefix.0 += 1; 19 - // counts_value.suffix.0.insert(&Did::new("did:plc:blah".to_string()).unwrap()); 20 - // assert!(counts_value.records() > 0); 21 - // assert!(counts_value.dids().estimate() > 0); 22 24 } 23 25 });