Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/fuzz_introspector/datatypes/project_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def __init__(self, profiles: List[fuzzer_profile.FuzzerProfile],
# Add all functions from the various profiles into the merged profile. Don't
# add duplicates
logger.info("Creating all_functions dictionary")
excluded_functions = {"sanitizer", "llvm", "LLVMFuzzerTestOneInput"}
# Performance Optimization: Using a tuple for string checks is faster.
excluded_functions = ("sanitizer", "llvm", "LLVMFuzzerTestOneInput")
for profile in profiles:
# Handles jvm constructors
for fd in profile.all_class_constructors.values():
Expand All @@ -159,8 +160,12 @@ def __init__(self, profiles: List[fuzzer_profile.FuzzerProfile],
# Handles normal functions
for fd in profile.all_class_functions.values():
# continue if the function is to be excluded
if any(to_exclude in fd.function_name
for to_exclude in excluded_functions):
is_excluded = False
for to_exclude in excluded_functions:
if to_exclude in fd.function_name:
is_excluded = True
break
if is_excluded:
continue

current_fd = self.all_functions.get(fd.function_name)
Expand Down
Loading