Hello, dear maintainers!
I built the introspector locally and attempted to run some simple examples from tests/. However, when I followed the step-by-step guide from https://github.com/ossf/fuzz-introspector/blob/main/doc/LocalBuild.md, python3 threw some errors.
After spending some time on this, I discovered a "bug" either in the documentation or in src/fuzz-introspector/analyses/frontend_analyser.py. So, if you don't set $SRC environment, default value (/src) will be used, but there is no such directory and code.
On first analysis the value of --target-dir is used, but during second phase of analysis this value is replaced by $SRC var here:
|
basefolder = os.environ.get('SRC', '/src') |
This section was changed it this PR: #2179
Maybe it fixed some error explained in this PR, but it also "add a new bug".
Idk, if there is a confirmed error and #2179 PR naturally fixes it, I think the info about required $SRC variable should be in documentation.
Steps to reproduce:
- cd to simple-example dir
- Build example:
FUZZ_INTROSPECTOR=1 clang -fsanitize=fuzzer-no-link -g -c -flto -fprofile-instr-generate -fcoverage-mapping ../fuzzer.c -o fuzzer.o
FUZZ_INTROSPECTOR=1 clang -fsanitize=fuzzer -g -flto -fprofile-instr-generate -fcoverage-mapping ./fuzzer.o -o fuzzer
- Run introspector correlate:
python3 /fuzz-introspector/src/main.py correlate --binaries-dir=.
- Run introspector report:
python3 /fuzz-introspector/src/main.py report --target-dir=. --correlation-file=./exe_to_fuzz_introspector_logs.yaml
- Get an error during run:
2026-04-10 15:20:36.414 INFO oss_fuzz - analyse_folder: Found 0 files to include in analysis
2026-04-10 15:20:36.414 ERROR oss_fuzz - analyse_folder: Unsupported language:
2026-04-10 15:20:36.415 INFO analysis - load_data_files: Loading profiles using files
2026-04-10 15:20:36.415 INFO data_loader - load_all_profiles: Loading profiles from /src
2026-04-10 15:20:36.415 INFO data_loader - load_all_profiles: []
2026-04-10 15:20:36.415 INFO data_loader - load_all_profiles: - found 0 profiles to load
2026-04-10 15:20:36.437 INFO analysis - load_data_files: Found 0 profiles
2026-04-10 15:20:36.437 INFO analysis - load_data_files: Found no profiles
Traceback (most recent call last):
File "/fuzz-introspector/src/main.py", line 25, in <module>
main()
~~~~^^
File "/fuzz-introspector/src/main.py", line 20, in main
cli.main()
~~~~~~~~^^
File "/fuzz-introspector/src/fuzz_introspector/cli.py", line 312, in main
return_code, _ = commands.run_analysis_on_dir(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
args.target_dir, args.coverage_url, args.analyses,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args.correlation_file, args.enable_all_analyses, args.name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args.language, args.output_json)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/fuzz-introspector/src/fuzz_introspector/commands.py", line 167, in run_analysis_on_dir
html_report.create_html_report(introspection_proj,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
analyses_to_run,
^^^^^^^^^^^^^^^^
...<2 lines>...
dump_files,
^^^^^^^^^^^
out_dir=out_dir)
^^^^^^^^^^^^^^^^
File "/fuzz-introspector/src/fuzz_introspector/html_report.py", line 807, in create_html_report
html_report_core += create_section_optional_analyses(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
table_of_contents, analyses_to_run, output_json, tables,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
introspection_proj, introspection_proj.proj_profile.basefolder,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
introspection_proj.proj_profile.coverage_url, conclusions, dump_files,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
out_dir)
^^^^^^^^
File "/fuzz-introspector/src/fuzz_introspector/html_report.py", line 697, in create_section_optional_analyses
html_string = analysis_instance.analysis_func(
table_of_contents, tables, introspection_proj.proj_profile,
introspection_proj.profiles, basefolder, coverage_url,
conclusions, out_dir)
File "/fuzz-introspector/src/fuzz_introspector/analyses/frontend_analyser.py", line 148, in analysis_func
introspection_proj.load_data_files(True, temp_dir, basefolder)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/fuzz-introspector/src/fuzz_introspector/analysis.py", line 81, in load_data_files
raise DataLoaderError("No fuzzer profiles")
fuzz_introspector.exceptions.DataLoaderError: No fuzzer profiles
Hello, dear maintainers!
I built the introspector locally and attempted to run some simple examples from
tests/. However, when I followed the step-by-step guide from https://github.com/ossf/fuzz-introspector/blob/main/doc/LocalBuild.md, python3 threw some errors.After spending some time on this, I discovered a "bug" either in the documentation or in
src/fuzz-introspector/analyses/frontend_analyser.py. So, if you don't set $SRC environment, default value (/src) will be used, but there is no such directory and code.On first analysis the value of
--target-diris used, but during second phase of analysis this value is replaced by $SRC var here:fuzz-introspector/src/fuzz_introspector/analyses/frontend_analyser.py
Line 130 in 7835818
This section was changed it this PR: #2179
Maybe it fixed some error explained in this PR, but it also "add a new bug".
Idk, if there is a confirmed error and #2179 PR naturally fixes it, I think the info about required $SRC variable should be in documentation.
Steps to reproduce: