Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyser: Fix unexpected exit from coverage extraction #2007

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/fuzz_introspector/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ def get_node_coverage_hitcount(demangled_name: str, callstack: Dict[int, str],
# The difference is this node has node "parent" or prior nodes.

if not profile.func_is_entrypoint(demangled_name):
raise AnalysisError(
"First node in calltree is non-fuzzer function")
logger.warning("First node in calltree is non-fuzzer function")
return 0
if profile.coverage.get_type() == 'kernel':
# For now, assume EP is hit. TODO(David) adjust this.
return 100
Expand Down
8 changes: 6 additions & 2 deletions src/fuzz_introspector/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,13 @@ def analyse(args) -> int:
entrypoint=entrypoint,
out=out_dir)

if 'c' in args.language:
language = 'c-cpp'
else:
language = args.language

# Perform the FI backend project analysis from the frontend
introspection_proj = analysis.IntrospectionProject(args.language, out_dir,
'')
introspection_proj = analysis.IntrospectionProject(language, out_dir, '')
introspection_proj.load_data_files(True, '', out_dir)

# Perform the chosen standalone analysis
Expand Down
Loading