Skip to content

Commit

Permalink
Limit size of fuzzing targets when run under asan.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 572745780
Change-Id: Ibaf9196cd28563f82cf736aad4fa8005eb98f120
  • Loading branch information
v-gogte authored and copybara-github committed Oct 12, 2023
1 parent 8b2ed9a commit 3f411b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tcmalloc/huge_page_aware_allocator_fuzz.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return 0;
}

#if ABSL_HAVE_ADDRESS_SANITIZER
// Since asan introduces runtime overhead, limit size of fuzz targets further.
if (size > 10000) {
return 0;
}
#endif

// We interpret data as a small DSL for exploring the state space of
// HugePageAwareAllocator.
//
Expand Down

0 comments on commit 3f411b6

Please sign in to comment.