Repository navigation
perf(library): write the analysis logs only for a violation - #98
Open
GuilhermeBn198 wants to merge 1 commit into
Open
GuilhermeBn198 wants to merge 1 commit into
GuilhermeBn198 wants to merge 1 commit into
Conversation
list_log.csv, heap_log.csv and allocation_log.csv are read by nothing, yet every path that ends writes them. Under KLEE that is every forked state, through uclibc's fprintf: on a Juliet CWE-761 good program it was 59.5 M of 66.7 M instructions (run.istats), and KLEE ran out of time before it finished the paths. Measured on that program (KLEE only, --timeout 60, --model-input): bound 2 went from TRUE in 36 s to TRUE in 7 s, bound 4 from UNKNOWN (13 paths completed) to TRUE in 24 s (55 paths). track_bb_log.st, which the witness graph reads, is still written on every path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every path that ends calls
generate_aux_files, which writeslist_log.csv,heap_log.csvandallocation_log.csv. Nothing reads these three files:git grepfinds no reader in the frontend, the tests or the scripts. Under KLEE, "every path" means every forked state, and the writes go through uclibc'sfprintf.Measurement
The program is Juliet
CWE761_..._char_console_01(good), run with--memtrack --model-input, KLEE only,--timeout 60. The profile comes from--debugandrun.istats.map2check_success → generate_aux_files → analysis_generate_aux_witness_files.Change
generate_aux_fileswrites the analysis logs only for a violation, where they remain a record of it.track_bb_log.st, which the witness graph reads, is still written on every path.The change applies to every KLEE run, with or without
--model-input.Tests
Run in
map2check-v9-evalagainst an install with this change and #99:test_model_input: 10/10test_modes: 16/16test_testcomp_regressions: 53/53test_exit_codes: 3/3test_test_suite_emission: 14/14