Commit 6d12e258 authored by Andre Maroneze's avatar Andre Maroneze 💬
Browse files

Merge branch 'improve-miniz' into 'master'

Improve miniz

See merge request !18
parents 7ed51c66 96587864
Pipeline #35666 passed with stage
in 88 minutes and 44 seconds
(* Frama-C journal generated at 17:04 the 21/05/2021 *)
exception Unreachable
exception Exception of string
[@@@ warning "-26"]
(* Run the user commands *)
let run () = ()
(* Main *)
let main () =
Journal.keep_file ".frama-c/frama_c_journal.ml";
try run ()
with
| Unreachable -> Kernel.fatal "Journal reaches an assumed dead code"
| Exception s -> Kernel.log "Journal re-raised the exception %S" s
| exn ->
Kernel.fatal
"Journal raised an unexpected exception: %s"
(Printexc.to_string exn)
(* Registering *)
let main : unit -> unit =
Dynamic.register
~plugin:"Frama_c_journal.ml"
"main"
(Datatype.func Datatype.unit Datatype.unit)
~journalize:false
main
(* Hooking *)
let () = Cmdline.run_after_loading_stage main; Cmdline.is_going_to_load ()
......@@ -44,6 +44,7 @@ miniz-example1.parse: \
../examples/example1.c \
../miniz.c \
../miniz_tdef.c \
../miniz_tinfl.c \
miniz-example2.parse: \
stubs.c \
......@@ -79,6 +80,10 @@ miniz-example6.parse: \
../miniz.c \
../miniz_tdef.c \
miniz-example6.parse: FCFLAGS += \
-cpp-extra-args-per-file=../miniz.c:"-DMINIZ_NO_TIME -DMINIZ_NO_STDIO" \
-cpp-extra-args-per-file=../miniz_tdef.c:"-DMINIZ_NO_TIME -DMINIZ_NO_STDIO" \
### Epilogue. Do not modify this block. #######################################
include $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/epilogue.mk
###############################################################################
......
This source diff could not be displayed because it is too large. You can view the blob instead.
[metrics] Eva coverage statistics
=======================
Syntactically reachable functions = 42 (out of 59)
Semantically reached functions = 19
Coverage estimation = 45.2%
Unreached functions (23) =
<miniz.c>: miniz_def_free_func; mz_adler32; mz_inflate; mz_inflateEnd;
mz_inflateInit; mz_inflateInit2; mz_uncompress; mz_uncompress2;
<miniz_tdef.c>: tdefl_calculate_minimum_redundancy; tdefl_compress_block;
tdefl_compress_fast; tdefl_compress_lz_codes; tdefl_flush_block;
tdefl_flush_output_buffer; tdefl_get_adler32;
tdefl_huffman_enforce_max_code_size; tdefl_optimize_huffman_table;
tdefl_radix_sort_syms; TDEFL_READ_UNALIGNED_WORD32; tdefl_record_match;
tdefl_start_dynamic_block; tdefl_start_static_block;
<miniz_tinfl.h>: tinfl_decompress;
Syntactically reachable functions = 42 (out of 64)
Semantically reached functions = 42
Coverage estimation = 100.0%
[metrics] References to non-analyzed functions
------------------------------------
Function main calls mz_uncompress (at examples/example1.c:66)
Function mz_deflate calls tdefl_get_adler32 (at miniz.c:268)
Function mz_deflateInit2 references miniz_def_free_func (at miniz.c:213)
Function tdefl_compress calls tdefl_flush_output_buffer (at miniz_tdef.c:1280)
Function tdefl_compress calls tdefl_compress_fast (at miniz_tdef.c:1287)
Function tdefl_compress calls mz_adler32 (at miniz_tdef.c:1298)
Function tdefl_compress calls tdefl_flush_block (at miniz_tdef.c:1302)
Function tdefl_compress calls tdefl_flush_output_buffer (at miniz_tdef.c:1313)
Function tdefl_compress_normal calls tdefl_record_match (at miniz_tdef.c:1174)
Function tdefl_compress_normal calls tdefl_record_match (at miniz_tdef.c:1187)
Function tdefl_compress_normal calls tdefl_record_match (at miniz_tdef.c:1196)
Function tdefl_compress_normal calls tdefl_flush_block (at miniz_tdef.c:1217)
[metrics] Statements analyzed by Eva
--------------------------
794 stmts in analyzed functions, 347 stmts analyzed (43.7%)
3659 stmts in analyzed functions, 3431 stmts analyzed (93.8%)
TDEFL_READ_UNALIGNED_WORD: 2 stmts out of 2 (100.0%)
TDEFL_READ_UNALIGNED_WORD2: 2 stmts out of 2 (100.0%)
TDEFL_READ_UNALIGNED_WORD32: 2 stmts out of 2 (100.0%)
eva_main: 13 stmts out of 13 (100.0%)
main: 74 stmts out of 74 (100.0%)
miniz_def_alloc_func: 2 stmts out of 2 (100.0%)
miniz_def_free_func: 2 stmts out of 2 (100.0%)
mz_adler32: 49 stmts out of 49 (100.0%)
mz_compress: 2 stmts out of 2 (100.0%)
mz_compress2: 27 stmts out of 27 (100.0%)
mz_compressBound: 2 stmts out of 2 (100.0%)
mz_deflateInit: 2 stmts out of 2 (100.0%)
tdefl_init: 80 stmts out of 80 (100.0%)
mz_inflateInit: 2 stmts out of 2 (100.0%)
mz_uncompress: 2 stmts out of 2 (100.0%)
mz_uncompress2: 30 stmts out of 30 (100.0%)
tdefl_calculate_minimum_redundancy: 82 stmts out of 82 (100.0%)
tdefl_compress_block: 5 stmts out of 5 (100.0%)
tdefl_compress_fast: 257 stmts out of 257 (100.0%)
tdefl_compress_lz_codes: 131 stmts out of 131 (100.0%)
tdefl_compress_normal: 166 stmts out of 166 (100.0%)
tdefl_find_match: 142 stmts out of 142 (100.0%)
tdefl_flush_output_buffer: 18 stmts out of 18 (100.0%)
tdefl_get_adler32: 2 stmts out of 2 (100.0%)
tdefl_huffman_enforce_max_code_size: 32 stmts out of 32 (100.0%)
tdefl_init: 81 stmts out of 81 (100.0%)
tdefl_optimize_huffman_table: 79 stmts out of 79 (100.0%)
tdefl_radix_sort_syms: 51 stmts out of 51 (100.0%)
tdefl_record_literal: 15 stmts out of 15 (100.0%)
tdefl_record_match: 33 stmts out of 33 (100.0%)
tdefl_start_static_block: 55 stmts out of 55 (100.0%)
tinfl_decompress: 1106 stmts out of 1125 (98.3%)
tdefl_start_dynamic_block: 366 stmts out of 399 (91.7%)
tdefl_compress: 90 stmts out of 103 (87.4%)
mz_inflateInit2: 34 stmts out of 41 (82.9%)
mz_deflateBound: 4 stmts out of 5 (80.0%)
mz_compress2: 20 stmts out of 27 (74.1%)
tdefl_flush_block: 254 stmts out of 318 (79.9%)
mz_inflate: 110 stmts out of 140 (78.6%)
mz_deflate: 49 stmts out of 72 (68.1%)
mz_deflateEnd: 6 stmts out of 9 (66.7%)
mz_inflateEnd: 6 stmts out of 9 (66.7%)
tdefl_create_comp_flags_from_zip_params: 17 stmts out of 29 (58.6%)
mz_deflateInit2: 27 stmts out of 47 (57.4%)
mz_deflateEnd: 4 stmts out of 9 (44.4%)
tdefl_record_literal: 6 stmts out of 15 (40.0%)
main: 27 stmts out of 74 (36.5%)
tdefl_compress_normal: 57 stmts out of 166 (34.3%)
tdefl_compress: 33 stmts out of 103 (32.0%)
mz_deflate: 20 stmts out of 72 (27.8%)
tdefl_find_match: 27 stmts out of 142 (19.0%)
miniz_tdef.c:1043:[nonterm:stmt] warning: non-terminating statement
stack: tdefl_record_literal :: miniz_tdef.c:1193 <-
tdefl_compress_normal :: miniz_tdef.c:1293 <-
tdefl_compress :: miniz.c:264 <-
mz_deflate :: miniz.c:335 <-
mz_compress2 :: miniz.c:348 <-
mz_compress :: examples/example1.c:43 <-
main :: stubs.c:21 <-
eva_main
miniz_tdef.c:1088:[nonterm:stmt] warning: non-terminating loop
stack: tdefl_compress_normal :: miniz_tdef.c:1293 <-
tdefl_compress :: miniz.c:264 <-
mz_deflate :: miniz.c:335 <-
mz_compress2 :: miniz.c:348 <-
mz_compress :: examples/example1.c:43 <-
main :: stubs.c:21 <-
eva_main
miniz_tdef.c:1313:[nonterm:unreachable] warning: unreachable return
miniz_tdef.c:715:[nonterm:stmt] warning: non-terminating function call
stack 1: tdefl_flush_block :: miniz_tdef.c:979 <-
tdefl_compress_fast :: miniz_tdef.c:1287 <-
tdefl_compress :: miniz.c:264 <-
mz_deflate :: miniz.c:335 <-
mz_compress2 :: miniz.c:348 <-
mz_compress :: examples/example1.c:43 <-
main :: stubs.c:21 <-
eva_main
stack 2: tdefl_flush_block :: miniz_tdef.c:1217 <-
tdefl_compress_normal :: miniz_tdef.c:1293 <-
tdefl_compress :: miniz.c:264 <-
mz_deflate :: miniz.c:335 <-
mz_compress2 :: miniz.c:348 <-
mz_compress :: examples/example1.c:43 <-
main :: stubs.c:21 <-
eva_main
stack 3: tdefl_flush_block :: miniz_tdef.c:1302 <-
tdefl_compress :: miniz.c:264 <-
mz_deflate :: miniz.c:335 <-
mz_compress2 :: miniz.c:348 <-
mz_compress :: examples/example1.c:43 <-
main :: stubs.c:21 <-
eva_main
miniz.c:335:[eva:locals-escaping] warning: locals {in_bytes} escaping the scope of mz_deflate through __malloc_miniz_def_alloc_func_l169
miniz.c:335:[eva:locals-escaping] warning: locals {out_bytes} escaping the scope of mz_deflate through __malloc_miniz_def_alloc_func_l169
miniz.c:335:[eva:locals-escaping] warning: locals {in_bytes, out_bytes} escaping the scope of mz_deflate through stream
miniz.c:335:[eva:locals-escaping] warning: locals {in_bytes, out_bytes} escaping the scope of mz_deflate through __malloc_main_l34
miniz.c:335:[eva:locals-escaping] warning: locals {in_bytes, out_bytes} escaping the scope of mz_deflate through __malloc_w_miniz_def_alloc_func_l169
examples/example1.c:52:[eva:garbled-mix] warning: The specification of function printf_va_4 has generated a garbled mix for assigns clause __fc_stdout->__fc_FILE_data.
examples/example1.c:71:[eva:garbled-mix] warning: The specification of function printf_va_5 has generated a garbled mix for assigns clause __fc_stdout->__fc_FILE_data.
examples/example1.c:83:[eva:garbled-mix] warning: The specification of function printf_va_7 has generated a garbled mix for assigns clause __fc_stdout->__fc_FILE_data.
miniz.c:335:[eva:locals-escaping] warning: locals {in_bytes, out_bytes} escaping the scope of mz_deflate through __malloc_w_miniz_def_alloc_func_l169_0
examples/example1.c:38:[eva:garbled-mix] warning: The specification of function printf_va_2 has generated a garbled mix for assigns clause __fc_stdout->__fc_FILE_data.
examples/example1.c:46:[eva:garbled-mix] warning: The specification of function printf_va_3 has generated a garbled mix for assigns clause __fc_stdout->__fc_FILE_data.
examples/example1.c:77:[eva:garbled-mix] warning: The specification of function printf_va_6 has generated a garbled mix for assigns clause __fc_stdout->__fc_FILE_data.
examples/example1.c:88:[eva:garbled-mix] warning: The specification of function printf_va_8 has generated a garbled mix for assigns clause __fc_stdout->__fc_FILE_data.
examples/example1.c:103:[eva:garbled-mix] warning: The specification of function printf_va_9 has generated a garbled mix for assigns clause __fc_stdout->__fc_FILE_data.
[eva:garbled-mix] warning: Garbled mix generated during analysis:
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169}
(origin: Merge {miniz_tdef.c:1042}) }}
{{ garbled mix of &{__malloc_main_l34; __malloc_w_miniz_def_alloc_func_l169}
(origin: Merge {miniz_tdef.c:1042}) }}
{{ garbled mix of &{"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson."}
(origin: Merge {miniz_tdef.c:1042}) }}
{{ garbled mix of &{in_bytes} (origin: Merge {miniz_tdef.c:1042}) }}
{{ garbled mix of &{__malloc_main_l34} (origin: Merge {miniz_tdef.c:1042}) }}
{{ garbled mix of &{out_bytes} (origin: Merge {miniz_tdef.c:1042}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169}
(origin: Misaligned {miniz_tdef.c:1067}) }}
{{ garbled mix of &{__malloc_main_l34; __malloc_w_miniz_def_alloc_func_l169}
(origin: Misaligned {miniz_tdef.c:1067}) }}
{{ garbled mix of &{"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson."}
(origin: Misaligned {miniz_tdef.c:1067}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Misaligned {miniz_tdef.c:1067}) }}
{{ garbled mix of &{in_bytes} (origin: Misaligned {miniz_tdef.c:1067}) }}
{{ garbled mix of &{out_bytes} (origin: Misaligned {miniz_tdef.c:1067}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169}
(origin: Arithmetic {miniz_tdef.c:1212}) }}
{{ garbled mix of &{syms1} (origin: Arithmetic {miniz_tdef.c:126}) }}
{{ garbled mix of &{syms0; syms1} (origin: Arithmetic {miniz_tdef.c:126}) }}
{{ garbled mix of &{syms0; syms1} (origin: Arithmetic {miniz_tdef.c:169}) }}
{{ garbled mix of &{"\002\003\007"}
(origin: Arithmetic {miniz_tdef.c:423}) }}
{{ garbled mix of &{in_bytes; out_bytes; __malloc_main_l34;
__malloc_w_miniz_def_alloc_func_l169}
(origin: Arithmetic {miniz_tdef.c:522}) }}
{{ garbled mix of &{"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson."}
(origin: Arithmetic {miniz_tdef.c:1097}) }}
{{ garbled mix of &{"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson."}
(origin: Arithmetic {miniz_tdef.c:1298}) }}
{{ garbled mix of &{"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.Good morning Dr. Chandra. This is Hal. I am ready for my first lesson."}
(origin: Arithmetic {miniz.c:265}) }}
{{ garbled mix of &{__malloc_main_l34} (origin: Arithmetic {miniz.c:270}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169}
(origin: Arithmetic {miniz_tdef.c:885}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {examples/example1.c:61}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:186}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:400}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:402}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:261}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:262}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:371}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:400}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:490}) }}
{{ garbled mix of &{__malloc_main_l34}
(origin: Arithmetic {miniz_tinfl.c:612}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:613}) }}
{{ garbled mix of &{__malloc_main_l34} (origin: Arithmetic {miniz.c:468}) }}
{{ garbled mix of &{__malloc_main_l35} (origin: Arithmetic {miniz.c:472}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:262}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:259}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:400}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:506}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:516}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:613}) }}
{{ garbled mix of &{__malloc_main_l34} (origin: Arithmetic {miniz.c:509}) }}
{{ garbled mix of &{__malloc_main_l35} (origin: Arithmetic {miniz.c:518}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:188}) }}
{{ garbled mix of &{"\005\005\004"}
(origin: Arithmetic {miniz_tinfl.c:292}) }}
{{ garbled mix of &{"\002\003\007"}
(origin: Arithmetic {miniz_tinfl.c:381}) }}
{{ garbled mix of &{"\003\003\011"}
(origin: Arithmetic {miniz_tinfl.c:383}) }}
{{ garbled mix of &{__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:500}) }}
{{ garbled mix of &{__malloc_main_l34; __malloc_w_miniz_def_alloc_func_l169;
__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:541}) }}
{{ garbled mix of &{__malloc_main_l34; __malloc_w_miniz_def_alloc_func_l169;
__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:561}) }}
{{ garbled mix of &{in_bytes; out_bytes; __malloc_main_l34;
__malloc_w_miniz_def_alloc_func_l169;
__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tdef.c:522}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:187}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:516}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:500}) }}
{{ garbled mix of &{__malloc_main_l35}
(origin: Arithmetic {miniz_tinfl.c:506}) }}
{{ garbled mix of &{__malloc_main_l34; __malloc_main_l35;
__malloc_w_miniz_def_alloc_func_l169;
__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:541}) }}
{{ garbled mix of &{__malloc_main_l34; __malloc_main_l35;
__malloc_w_miniz_def_alloc_func_l169;
__malloc_w_miniz_def_alloc_func_l169_0}
(origin: Arithmetic {miniz_tinfl.c:561}) }}
{{ garbled mix of &{__malloc_main_l35} (origin: Arithmetic {miniz.c:493}) }}
[metrics] Defined functions (58)
[metrics] Defined functions (64)
======================
TDEFL_READ_UNALIGNED_WORD (5 calls); TDEFL_READ_UNALIGNED_WORD2 (18 calls);
TDEFL_READ_UNALIGNED_WORD32 (2 calls); eva_main (0 call); main (1 call);
......@@ -28,38 +28,44 @@
tdefl_record_match (3 calls); tdefl_start_dynamic_block (1 call);
tdefl_start_static_block (1 call);
tdefl_write_image_to_png_file_in_memory (0 call);
tdefl_write_image_to_png_file_in_memory_ex (1 call);
tdefl_write_image_to_png_file_in_memory_ex (1 call);
tinfl_decompress (5 calls); tinfl_decompress_mem_to_callback (0 call);
tinfl_decompress_mem_to_heap (0 call); tinfl_decompress_mem_to_mem (0 call);
tinfl_decompressor_alloc (0 call); tinfl_decompressor_free (0 call);
Specified-only functions (0)
============================
Undefined and unspecified functions (1)
Undefined and unspecified functions (0)
=======================================
tinfl_decompress (2 calls);
'Extern' global variables (0)
=============================
Potential entry points (13)
Potential entry points (18)
===========================
eva_main; miniz_def_realloc_func; mz_deflateReset; mz_error; mz_free;
mz_inflateReset; mz_version; tdefl_compress_mem_to_heap;
tdefl_compress_mem_to_mem; tdefl_compressor_alloc; tdefl_compressor_free;
tdefl_get_prev_return_status; tdefl_write_image_to_png_file_in_memory;
tdefl_get_prev_return_status; tdefl_write_image_to_png_file_in_memory;
tinfl_decompress_mem_to_callback; tinfl_decompress_mem_to_heap;
tinfl_decompress_mem_to_mem; tinfl_decompressor_alloc;
tinfl_decompressor_free;
Global metrics
==============
Sloc = 2808
Decision point = 458
Global variables = 14
If = 458
Loop = 95
Goto = 117
Assignment = 1411
Exit point = 58
Function = 59
Function call = 209
Pointer dereferencing = 1240
Cyclomatic complexity = 516
Sloc = 4061
Decision point = 698
Global variables = 20
If = 666
Loop = 179
Goto = 162
Assignment = 1998
Exit point = 64
Function = 64
Function call = 231
Pointer dereferencing = 1486
Cyclomatic complexity = 762
This source diff could not be displayed because it is too large. You can view the blob instead.
[metrics] Eva coverage statistics
=======================
Syntactically reachable functions = 89 (out of 179)
Semantically reached functions = 73
Coverage estimation = 82.0%
Unreached functions (16) =
<miniz.c>: mz_adler32;
<miniz_tdef.c>: tdefl_calculate_minimum_redundancy; tdefl_compress_block;
tdefl_compress_fast; tdefl_compress_lz_codes; tdefl_flush_block;
tdefl_flush_output_buffer; tdefl_huffman_enforce_max_code_size;
tdefl_optimize_huffman_table; tdefl_radix_sort_syms;
TDEFL_READ_UNALIGNED_WORD32; tdefl_record_match;
tdefl_start_dynamic_block; tdefl_start_static_block;
<miniz_zip.c>: mz_zip_heap_write_func; mz_zip_writer_add_put_buf_callback;
Semantically reached functions = 89
Coverage estimation = 100.0%
[metrics] References to non-analyzed functions
------------------------------------
Function mz_zip_writer_add_mem_ex_v2 references mz_zip_writer_add_put_buf_callback (at miniz_zip.c:3367)
Function mz_zip_writer_end_internal references mz_zip_heap_write_func (at miniz_zip.c:2676)
Function mz_zip_writer_init_from_reader_v2 references mz_zip_heap_write_func (at miniz_zip.c:2929)
Function tdefl_compress calls tdefl_flush_output_buffer (at miniz_tdef.c:1280)
Function tdefl_compress calls tdefl_compress_fast (at miniz_tdef.c:1287)
Function tdefl_compress calls mz_adler32 (at miniz_tdef.c:1298)
Function tdefl_compress calls tdefl_flush_block (at miniz_tdef.c:1302)
Function tdefl_compress calls tdefl_flush_output_buffer (at miniz_tdef.c:1313)
Function tdefl_compress_normal calls tdefl_record_match (at miniz_tdef.c:1174)
Function tdefl_compress_normal calls tdefl_record_match (at miniz_tdef.c:1187)
Function tdefl_compress_normal calls tdefl_record_match (at miniz_tdef.c:1196)
Function tdefl_compress_normal calls tdefl_flush_block (at miniz_tdef.c:1217)
[metrics] Statements analyzed by Eva
--------------------------
4017 stmts in analyzed functions, 2311 stmts analyzed (57.5%)
5589 stmts in analyzed functions, 5164 stmts analyzed (92.4%)
TDEFL_READ_UNALIGNED_WORD: 2 stmts out of 2 (100.0%)
TDEFL_READ_UNALIGNED_WORD2: 2 stmts out of 2 (100.0%)
TDEFL_READ_UNALIGNED_WORD32: 2 stmts out of 2 (100.0%)
eva_main: 13 stmts out of 13 (100.0%)
main: 131 stmts out of 131 (100.0%)
miniz_def_alloc_func: 2 stmts out of 2 (100.0%)
......@@ -67,39 +46,54 @@ mz_zip_reader_sort_central_dir_offsets_by_filename: 72 stmts out of 72 (100.0%)
mz_zip_set_error: 4 stmts out of 4 (100.0%)
mz_zip_time_t_to_dos_time: 4 stmts out of 4 (100.0%)
mz_zip_writer_add_mem_ex: 2 stmts out of 2 (100.0%)
mz_zip_writer_add_put_buf_callback: 12 stmts out of 12 (100.0%)
mz_zip_writer_create_central_dir_header: 41 stmts out of 41 (100.0%)
mz_zip_writer_create_zip64_extra_data: 20 stmts out of 20 (100.0%)
mz_zip_writer_end: 2 stmts out of 2 (100.0%)
mz_zip_writer_validate_archive_name: 6 stmts out of 6 (100.0%)
mz_zip_zero_struct: 3 stmts out of 3 (100.0%)
tdefl_init: 80 stmts out of 80 (100.0%)
tdefl_calculate_minimum_redundancy: 82 stmts out of 82 (100.0%)
tdefl_compress_block: 5 stmts out of 5 (100.0%)
tdefl_compress_buffer: 3 stmts out of 3 (100.0%)
tdefl_compress_fast: 257 stmts out of 257 (100.0%)
tdefl_compress_lz_codes: 131 stmts out of 131 (100.0%)
tdefl_compress_normal: 166 stmts out of 166 (100.0%)
tdefl_find_match: 142 stmts out of 142 (100.0%)
tdefl_flush_output_buffer: 18 stmts out of 18 (100.0%)
tdefl_huffman_enforce_max_code_size: 32 stmts out of 32 (100.0%)
tdefl_init: 81 stmts out of 81 (100.0%)
tdefl_optimize_huffman_table: 79 stmts out of 79 (100.0%)
tdefl_radix_sort_syms: 51 stmts out of 51 (100.0%)
tdefl_record_literal: 15 stmts out of 15 (100.0%)
tdefl_record_match: 33 stmts out of 33 (100.0%)
tdefl_start_static_block: 55 stmts out of 55 (100.0%)
mz_zip_writer_finalize_archive: 103 stmts out of 104 (99.0%)
mz_zip_reader_read_central_dir: 269 stmts out of 273 (98.5%)
mz_zip_file_stat_internal: 108 stmts out of 110 (98.2%)
mz_zip_writer_finalize_archive: 102 stmts out of 104 (98.1%)
mz_zip_writer_create_central_dir_header: 39 stmts out of 41 (95.1%)
mz_zip_writer_end_internal: 37 stmts out of 38 (97.4%)
mz_adler32: 46 stmts out of 49 (93.9%)
tinfl_decompress: 1056 stmts out of 1125 (93.9%)
mz_zip_writer_create_local_dir_header: 30 stmts out of 32 (93.8%)
mz_zip_reader_locate_header_sig: 44 stmts out of 47 (93.6%)
tdefl_start_dynamic_block: 366 stmts out of 399 (91.7%)
mz_zip_reader_end_internal: 33 stmts out of 36 (91.7%)
mz_zip_writer_add_to_central_dir: 41 stmts out of 45 (91.1%)
mz_zip_writer_end_internal: 34 stmts out of 38 (89.5%)
mz_zip_writer_add_mem_ex_v2: 288 stmts out of 329 (87.5%)
mz_zip_reader_init_file_v2: 47 stmts out of 54 (87.0%)
mz_zip_reader_extract_to_mem_no_alloc: 163 stmts out of 188 (86.7%)
mz_zip_heap_write_func: 32 stmts out of 37 (86.5%)
mz_zip_writer_init_from_reader_v2: 64 stmts out of 74 (86.5%)
mz_zip_string_equal: 25 stmts out of 29 (86.2%)
mz_zip_reader_init_internal: 30 stmts out of 36 (83.3%)
mz_zip_reader_extract_to_heap: 29 stmts out of 35 (82.9%)
mz_zip_writer_add_mem_ex_v2: 266 stmts out of 329 (80.9%)
tdefl_flush_block: 260 stmts out of 318 (81.8%)
tdefl_compress: 84 stmts out of 103 (81.6%)
mz_zip_reader_get_num_files: 4 stmts out of 5 (80.0%)
mz_zip_add_mem_to_archive_file_in_place_v2: 62 stmts out of 78 (79.5%)
mz_zip_get_cdh: 11 stmts out of 14 (78.6%)
mz_zip_reader_extract_to_mem_no_alloc: 142 stmts out of 182 (78.0%)
tdefl_create_comp_flags_from_zip_params: 22 stmts out of 29 (75.9%)
mz_zip_writer_init_from_reader_v2: 56 stmts out of 74 (75.7%)
mz_zip_writer_compute_padding_needed_for_file_alignment: 5 stmts out of 7 (71.4%)
mz_zip_writer_create_zip64_extra_data: 14 stmts out of 20 (70.0%)
tdefl_compress_buffer: 2 stmts out of 3 (66.7%)
mz_zip_writer_init_v2: 33 stmts out of 50 (66.0%)
mz_zip_reader_locate_file_v2: 48 stmts out of 82 (58.5%)
mz_zip_writer_init_file_v2: 26 stmts out of 49 (53.1%)
tdefl_record_literal: 6 stmts out of 15 (40.0%)
tdefl_compress_normal: 58 stmts out of 166 (34.9%)
mz_zip_writer_write_zeros: 8 stmts out of 24 (33.3%)
tdefl_compress: 32 stmts out of 103 (31.1%)
tdefl_find_match: 29 stmts out of 142 (20.4%)
tinfl_decompress: 11 stmts out of 1120 (1.0%)
miniz_tdef.c:1043:[nonterm:stmt] warning: non-terminating statement
stack: tdefl_record_literal :: miniz_tdef.c:1193 <-
tdefl_compress_normal :: miniz_tdef.c:1293 <-
tdefl_compress :: miniz_tdef.c:1319 <-
tdefl_compress_buffer :: miniz_zip.c:3368 <-
mz_zip_writer_add_mem_ex_v2 :: miniz_zip.c:3139 <-
mz_zip_writer_add_mem_ex :: miniz_zip.c:4409 <-
mz_zip_add_mem_to_archive_file_in_place_v2 :: miniz_zip.c:4346 <-
mz_zip_add_mem_to_archive_file_in_place :: examples/example2.c:64 <-
main :: stubs.c:21 <-
eva_main
miniz_tdef.c:1088:[nonterm:stmt] warning: non-terminating loop
stack: tdefl_compress_normal :: miniz_tdef.c:1293 <-
tdefl_compress :: miniz_tdef.c:1319 <-
tdefl_compress_buffer :: miniz_zip.c:3368 <-
mz_zip_writer_add_mem_ex_v2 :: miniz_zip.c:3139 <-
mz_zip_writer_add_mem_ex :: miniz_zip.c:4409 <-
mz_zip_add_mem_to_archive_file_in_place_v2 :: miniz_zip.c:4346 <-
mz_zip_add_mem_to_archive_file_in_place :: examples/example2.c:64 <-
main :: stubs.c:21 <-
eva_main
miniz_tdef.c:1313:[nonterm:unreachable] warning: unreachable return
miniz_tdef.c:1319:[nonterm:unreachable] warning: unreachable return
miniz_tinfl.c:197:[nonterm:stmt] warning: non-terminating statement
stack: tinfl_decompress :: miniz_zip.c:1544 <-
mz_zip_reader_extract_to_mem_no_alloc :: miniz_zip.c:1583 <-
mz_zip_reader_extract_to_mem :: miniz_zip.c:1622 <-
mz_zip_reader_extract_to_heap :: miniz_zip.c:1642 <-
mz_zip_reader_extract_file_to_heap :: examples/example2.c:134 <-
main :: stubs.c:21 <-
eva_main
......@@ -67,7 +67,7 @@
mz_zip_reader_locate_header_sig (1 call);
mz_zip_reader_read_central_dir (4 calls);
mz_zip_reader_sort_central_dir_offsets_by_filename (1 call);
mz_zip_set_error (256 calls); mz_zip_set_file_times (1 call);
mz_zip_set_error (257 calls); mz_zip_set_file_times (1 call);
mz_zip_set_last_error (1 call); mz_zip_string_equal (2 calls);
mz_zip_time_t_to_dos_time (3 calls); mz_zip_validate_archive (2 calls);
mz_zip_validate_file (1 call); mz_zip_validate_file_archive (0 call);
......@@ -157,15 +157,15 @@ Potential entry points (55)
Global metrics
==============
Sloc = 8478
Decision point = 1622
Sloc = 8523
Decision point = 1624
Global variables = 22
If = 1558
If = 1560
Loop = 211
Goto = 660
Assignment = 3859
Goto = 664
Assignment = 3904
Exit point = 179
Function = 179
Function call = 991
Pointer dereferencing = 2782
Cyclomatic complexity = 1801
Function call = 993
Pointer dereferencing = 2811
Cyclomatic complexity = 1803
[metrics] Eva coverage statistics
=======================
Syntactically reachable functions = 36 (out of 64)
Semantically reached functions = 35
Coverage estimation = 97.2%
Unreached functions (1) =
<miniz.c>: mz_inflateEnd;
Semantically reached functions = 36
Coverage estimation = 100.0%
[metrics] References to non-analyzed functions
------------------------------------
Function main calls mz_inflateEnd (at examples/example3.c:246)
[metrics] Statements analyzed by Eva
--------------------------
3726 stmts in analyzed functions, 2306 stmts analyzed (61.9%)
3747 stmts in analyzed functions, 3489 stmts analyzed (93.1%)
TDEFL_READ_UNALIGNED_WORD: 2 stmts out of 2 (100.0%)
TDEFL_READ_UNALIGNED_WORD2: 2 stmts out of 2 (100.0%)
TDEFL_READ_UNALIGNED_WORD32: 2 stmts out of 2 (100.0%)
......@@ -27,7 +23,7 @@ tdefl_find_match: 142 stmts out of 142 (100.0%)
tdefl_flush_output_buffer: 18 stmts out of 18 (100.0%)
tdefl_get_adler32: 2 stmts out of 2 (100.0%)
tdefl_huffman_enforce_max_code_size: 32 stmts out of 32 (100.0%)
tdefl_init: 80 stmts out of 80 (100.0%)
tdefl_init: 81 stmts out of 81 (100.0%)
tdefl_optimize_huffman_table: 79 stmts out of 79 (100.0%)
tdefl_radix_sort_syms: 51 stmts out of 51 (100.0%)