Fuzz introspector

Project overview

High level conclusions

Fuzzers reach 8.522% of all functions. Improvements need to be made
Fuzzers reach 7.066% of cyclomatic complexity. Improvements could be made

Reachability and coverage overview

Functions statically reachable by fuzzers
8.52%
1130/13259
Cyclomatic complexity statically reachable by fuzzers
7.07%
7769/109936
Functions covered at runtime
5647

Fuzzers overview

Fuzzer Fuzzer filename Functions Reached Functions unreached Fuzzer depth Files reached Basic blocks reached Cyclomatic complexity Details
gstoraster_fuzzer storaster_fuzzer.cc 1130 12129 26 133 19045 7769 storaster_fuzzer.cc

Fuzzer details

Fuzzer: gstoraster_fuzzer

Call tree overview

The following is the call tree with color coding for which functions are hit/not hit. This info is based on the coverage achieved of all fuzzers together and not just this specific fuzzer. This should change in the future to be per-fuzzer-basis.

For further technical details on what the call tree overview is, please see the Glossary .

Full calltree

The following link provides a visualisation of the full calltree overlayed with coverage information: full calltree

For futher technical details on how the call tree is made, please see the Glossary .

Fuzz blockers

The followings nodes represent call sites where fuzz blockers occur

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
122 2968 run_finish call site argproc
66 3249 swproc call site gsapi_set_param
62 2147 gs_scan_token call site scan_binary_token
51 2820 epo_check_and_install call site enable_self
48 943 _cmsLockMutex call site SaveTags
46 3127 gp_validate_path_len call site argproc
42 2753 check_device_compatible_encoding call site gx_output_saved_page
35 592 gs_getdevice call site print_paths
33 909 gscms_release_profile call site cmsSaveProfileToFile
33 2872 gx_default_fillpage call site gx_device_subclass

Functions hit (dynamic analysis based)

Covered functions
5644
Functions that are reachable but not covered
320
Reachable functions
1130
Percentage of reachable functions covered
71.68%
NB: The sum of covered functions and functions that are reachable but not covered need not be Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation our of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files hit

filename functions hit
storaster_fuzzer.cc 3
hostpdl/./psi/iapi.c 8
hostpdl/./psi/psapi.c 8
hostpdl/./base/gp_psync.c 14
/ 54
hostpdl/./base/gslibctx.c 31
hostpdl/./base/gsmalloc.c 4
hostpdl/./base/gxsync.c 4
hostpdl/./base/gpmisc.c 19
hostpdl/./base/gp.h 11
hostpdl/./base/gp_unifs.c 4
hostpdl/./base/gp_unifn.c 10
hostpdl/./base/gp_getnv.c 1
hostpdl/./obj/gscdefs.c 1
hostpdl/./base/gsmisc.c 14
hostpdl/./base/gp_unix.c 6
hostpdl/./base/gsicc_lcms2mt.c 10
hostpdl/./lcms2mt/src/cmsplugin.c 20
hostpdl/./lcms2mt/src/cmserr.c 25
hostpdl/./lcms2mt/src/lcms2_internal.h 2
hostpdl/./lcms2mt/src/cmsxform.c 5
hostpdl/./lcms2mt/src/cmsintrp.c 2
hostpdl/./lcms2mt/src/cmsgamma.c 3
hostpdl/./lcms2mt/src/cmspack.c 3
hostpdl/./lcms2mt/src/cmstypes.c 12
hostpdl/./lcms2mt/src/cmscnvrt.c 3
hostpdl/./lcms2mt/src/cmsopt.c 3
hostpdl/./base/sjpx_openjpeg.c 2
hostpdl/./base/gsmemory.c 7
hostpdl/./psi/imain.c 29
hostpdl/./psi/imainarg.c 25
hostpdl/./base/gsargs.c 10
hostpdl/./psi/zfile.c 9
hostpdl/./base/gsiodev.c 4
hostpdl/./psi/idict.c 20
hostpdl/./psi/iname.c 13
hostpdl/./psi/iutil.c 15
hostpdl/./base/gsutil.c 4
hostpdl/./base/sfxcommon.c 5
hostpdl/./base/stream.c 21
hostpdl/./base/sfxstdio.c 3
hostpdl/./base/scommon.h 2
hostpdl/./psi/ialloc.c 11
hostpdl/./base/gsfname.c 1
hostpdl/./base/gsinit.c 2
hostpdl/./base/gxfapi.c 1
hostpdl/./base/gsdevice.c 28
hostpdl/./obj/gconfig.c 1
hostpdl/./psi/iinit.c 13
hostpdl/./base/gsalloc.c 15
hostpdl/./psi/isave.c 8
hostpdl/./psi/interp.c 19
hostpdl/./psi/icontext.c 3
hostpdl/./psi/istack.c 18
hostpdl/./psi/zgstate.c 1
hostpdl/./base/gsstate.c 35
hostpdl/./base/gxpath.c 8
hostpdl/./base/gxcpath.c 14
hostpdl/./base/gsgstate.c 3
hostpdl/./base/gscspace.c 11
hostpdl/./base/gsicc_cache.c 4
hostpdl/./base/gsicc_manage.c 33
hostpdl/./base/gsicc_profilecache.c 2
hostpdl/./base/strmio.c 6
hostpdl/./lcms2mt/src/cmsio0.c 37
hostpdl/./lcms2mt/src/cmswtpnt.c 1
hostpdl/./lcms2mt/src/cmsnamed.c 2
hostpdl/./base/gsmd5.c 4
hostpdl/./lcms2mt/src/cmspcs.c 1
hostpdl/./base/gssprintf.c 12
hostpdl/./base/gsstrtok.c 2
hostpdl/./base/gdevdflt.c 46
hostpdl/./base/gxdevcli.h 3
hostpdl/./base/gsdparam.c 26
hostpdl/./base/gsparam.c 29
hostpdl/./base/gdevmem.c 5
hostpdl/./base/gdevnfwd.c 2
hostpdl/./base/gxcmap.c 4
hostpdl/./base/gscoord.c 3
hostpdl/./base/gspath.c 4
hostpdl/./base/gsmatrix.c 6
hostpdl/./base/gstrans.c 5
hostpdl/./base/gscolor.c 4
hostpdl/./base/gsht.c 4
hostpdl/./base/gsline.c 18
hostpdl/./base/gscolor2.c 2
hostpdl/./base/gscolor3.c 1
hostpdl/./base/gxgstate.h 2
hostpdl/./base/gxht.c 1
hostpdl/./psi/idstack.c 3
hostpdl/./psi/zusparam.c 2
hostpdl/./psi/iparam.c 6
hostpdl/./psi/iplugin.c 4
hostpdl/./base/gsparamx.c 2
hostpdl/./base/gxdcolor.c 1
hostpdl/./psi/zarith.c 2
hostpdl/./psi/zdict.c 1
hostpdl/./psi/zstack.c 2
hostpdl/./psi/zfileio.c 5
hostpdl/./psi/iscan.c 12
hostpdl/./psi/zpacked.c 1
hostpdl/./psi/iscannum.c 1
hostpdl/./psi/iscanbin.c 10
hostpdl/./psi/ibnum.c 6
hostpdl/./psi/zfproc.c 5
hostpdl/./psi/ztoken.c 3
hostpdl/./psi/zcontrol.c 1
hostpdl/./base/gscparam.c 5
hostpdl/./psi/idisp.c 1
hostpdl/./base/gxclpage.c 9
hostpdl/./base/gdevprn.c 8
hostpdl/./base/gxclist.c 26
hostpdl/./base/gxclthrd.c 2
hostpdl/./base/gsmchunk.c 1
hostpdl/./base/gxbcache.c 2
hostpdl/./base/gxclutil.c 6
hostpdl/./base/gsparams.c 7
hostpdl/./base/gxcldev.h 1
hostpdl/./base/gxclread.c 7
hostpdl/./base/gspaint.c 2
hostpdl/./base/gdevepo.c 36
hostpdl/./base/gdevsclass.c 6
hostpdl/./base/gdevddrw.c 1
hostpdl/./base/gxhldevc.c 1
hostpdl/./base/gsicc_monitorcm.c 9
hostpdl/./base/gdevp14.c 1
hostpdl/./base/gp_strdl.c 1
hostpdl/./psi/ziodevsc.c 1
hostpdl/./psi/zdevice.c 1
hostpdl/./psi/idebug.c 8
hostpdl/./base/gsparaml.c 10
//usr/include/stdlib.h 1
//usr/include/x86_64-linux-gnu/bits/stdlib-float.h 1

Analyses and suggestions

Optimal target analysis

Remaining optimal interesting functions

The following table shows a list of functions that are optimal targets. Optimal targets are identified by finding the functions that in combination reaches a high amount of code coverage.

Func name Functions filename Arg count Args Function depth hitcount instr count bb count cyclomatic complexity Reachable functions Incoming references total cyclomatic complexity Unreached complexity
pdfi_process_collection /src/ghostpdl/./pdf/ghostpdf.c 1 ['struct.pdf_context_s.47421 *'] 36 0 137 29 11 2619 2 21769 18258
eprn_initialize_device_procs /src/ghostpdl/./contrib/pcl3/src/gdevpcl3.c 1 ['struct.gx_device_s.11749 *'] 31 0 30 3 2 970 0 8354 4159
opj_jp2_decode /src/ghostpdl/./openjpeg/src/lib/openjp2/jp2.c 4 ['struct.opj_jp2 *', 'struct.opj_stream_private *', 'struct.opj_image *', 'struct.opj_event_mgr *'] 12 0 162 37 17 213 0 3656 3646
pdf14_CMYK_initialize_device_procs /src/ghostpdl/./base/gdevp14.c 1 ['struct.gx_device_s.3171 *'] 22 0 12 3 2 1234 0 9727 2687
upd_initialize_device_procs /src/ghostpdl/./devices/gdevupd.c 1 ['struct.gx_device_s.3171 *'] 22 0 22 1 2 539 0 5042 1671

Implementing fuzzers that target the above functions will improve reachability such that it becomes:

Functions statically reachable by fuzzers
30.34%
4023/13259
Cyclomatic complexity statically reachable by fuzzers
34.73%
38179 / 109936

All functions overview

The status of all functions in the project will be as follows if you implement fuzzers for these functions

Func name Functions filename Args Function call depth Reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Runtime coverage analysis

This section gives analysis based on data about the runtime coverage information

For futher technical details on how this section is made, please see the Glossary .

Complex functions with low coverage

Func name Function total lines Lines covered at runtime percentage covered
check_device_compatible_encoding 53 10 18.86
install_internal_subclass_devices 111 9 8.108
mem_mono_strip_copy_rop2_dev 369 50 13.55
pdf14_determine_default_blend_cs 144 21 14.58
get_pdf14_clist_device_proto 115 22 19.13
gp_enumerate_files_next_impl 150 16 10.66
gs_updatematrices 122 21 17.21
c_param_read_typed 55 8 14.54
check_cmyk_color_model_comps 79 15 18.98
gx_parse_output_format 62 10 16.12
gsicc_support_named_color 95 14 14.73
rewrite_percent_specifiers 65 10 15.38
c_overprint_create_default_compositor 65 9 13.84
rop_get_run_op 288 52 18.05
gs_type1_interpret 501 85 16.96
art_blend_pixel_8_inline 248 20 8.064
memfile_get_pdata 159 14 8.805
clist_teardown_render_threads 64 8 12.5
gs_image_class_2_fracs 80 5 6.25
gs_image_class_0_interpolate 458 23 5.021
gx_scan_convert 121 14 11.57
try_device_linear_color 75 4 5.333
width_is_thin 75 9 12.0
write_main_dictionary 234 28 11.96
write_private_blend_dictionary 261 6 2.298
cups_get_color_comp_index 145 17 11.72
cups_map_cmyk 456 31 6.798
cups_print_chunked 214 37 17.28
af_sort_and_quantize_widths 70 8 11.42
FT_Render_Glyph_Internal 242 30 12.39
BDF_Face_Init 371 23 6.199
bdf_free_font 63 7 11.11
_bdf_parse_start 286 23 8.041
cff_charset_load 180 31 17.22
cff_encoding_load 235 45 19.14
cid_face_open 170 17 10.0
cid_face_init 166 31 18.67
cid_parser_new 197 21 10.65
FT_Stream_OpenGzip 96 11 11.45
pcf_load_font 317 14 4.416
pcf_read_TOC 165 12 7.272
pfr_face_init 208 16 7.692
cf2_computeDarkening 176 6 3.409
cf2_glyphpath_computeOffset 131 7 5.343
tt_face_load_colr 135 13 9.629
tt_face_load_cpal 165 16 9.696
ft_smooth_render 134 21 15.67
tt_get_metrics_incremental 63 9 14.28
tt_done_blend 59 5 8.474
tt_hvadvance_adjust 94 9 9.574
Ins_FDEF 292 44 15.06
Ins_GETINFO 215 18 8.372
parse_encoding 239 19 7.949
T42_Face_Init 234 25 10.68
T42_Open_Face 124 20 16.12
FNT_Face_Init 210 29 13.80
fnt_face_get_dll_font 335 18 5.373
_cmsHandleExtraChannels 104 10 9.615
DefaultEvalParametricFn 363 30 8.264
OptimizeMatrixShaper 122 9 7.377
OptimizeByComputingLinearization 209 21 10.04
_cmsLCMScolorSpace 65 10 15.38
start_pass 264 37 14.01
jpeg_core_output_dimensions 154 5 3.246
realize_virt_arrays 100 12 12.0
opj_j2k_merge_ppm 130 8 6.153
opj_j2k_merge_ppt 51 8 15.68
opj_jp2_check_color 138 6 4.347
opj_jp2_read_colr 127 24 18.89
opj_thread_pool_submit_job 63 7 11.11
pdfi_report_errors 72 5 6.944
pdfi_annot_draw_Popup 141 22 15.60
pdfi_check_page 135 22 16.29
pdf_fontmap_lookup_cidfont 149 22 14.76
pdfi_generate_native_fontmap 165 22 13.33
pdfi_do_halftone 255 46 18.03
pdfi_pdfmark_write_boxes 85 11 12.94
check_user_password_preR5 172 33 19.18
dict_uid_param 59 11 18.64
swproc 664 102 15.36
zcurrentcolorspace 63 12 19.04
match_page_size 103 11 10.67