diff --git a/src/fuzz_introspector/analysis.py b/src/fuzz_introspector/analysis.py index 54f627878..e3f9f15ea 100644 --- a/src/fuzz_introspector/analysis.py +++ b/src/fuzz_introspector/analysis.py @@ -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 diff --git a/src/fuzz_introspector/commands.py b/src/fuzz_introspector/commands.py index db0dc5ee8..88240cdf4 100644 --- a/src/fuzz_introspector/commands.py +++ b/src/fuzz_introspector/commands.py @@ -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