Skip to content

Commit

Permalink
add license
Browse files Browse the repository at this point in the history
Signed-off-by: xiaguan <[email protected]>
  • Loading branch information
xiaguan committed Apr 14, 2024
1 parent 3f48bf4 commit 75c8a51
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion foyer-memory/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ edition = "2021"

[dependencies]
ahash = "0.8"
arbitrary = { version = "1", features = ["derive"] }
foyer-memory = { path = ".." }
foyer-workspace-hack = { version = "0.4", path = "../../foyer-workspace-hack" }
libfuzzer-sys = "0.4"
arbitrary = { version = "1", features = ["derive"] }

[package.metadata]
cargo-fuzz = true
Expand Down
16 changes: 15 additions & 1 deletion foyer-memory/fuzz/fuzz_targets/cache_fuzz.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 Foyer Project Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#![no_main]

use std::sync::Arc;
Expand Down Expand Up @@ -115,7 +129,7 @@ fuzz_target!(|data: Input| {
for op in data.operations {
match op {
Op::Insert(k, v, size) => {
cache.insert(k, v, size as usize);
cache.insert(k, v, size);
}
Op::Get(k) => {
let _ = cache.get(&k);
Expand Down

0 comments on commit 75c8a51

Please sign in to comment.