-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small output readability improvements #1312
Merged
Merged
Changes from 23 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
55f51df
Add test for not repeating constants in intervals in warning outputs
karoliineh 4d31efa
Move functions same and to_int upwards
karoliineh 3713f67
Do not repeat constants in intervals in warning outputs
karoliineh 74a333a
Fix missing parentheses in cram test
karoliineh b41967d
Add --disable warn.info hack for MacOS CI build
karoliineh adafde1
Remove initial cram test
karoliineh 45d818b
Modify regtest 01 74 to include unknown case
karoliineh 151bf5f
Add cram test for 01-oob-heap-simple
karoliineh 68f5fba
Prettify top intervals (Unknown int([-63,63]),[-9223372036854775808,9…
karoliineh 5b00197
Add cram test for not printing malloc uniqueness counter when disabled
karoliineh 47e11ee
Do not print disabled malloc uniqueness counter
karoliineh 53f8cc2
Add cram test for 87-casts-dep-on-param.c
karoliineh 5e10539
Do not print top thread ID in warnings
karoliineh df5a698
Add cram test for 14-list_entry_rc.c
karoliineh 19fe5fc
Do not print def_exc domain name in case of constant
karoliineh 1864fed
Make IntDomLifter show similar to pretty
karoliineh 4a90a97
Promote cram test 14-list_entry_rc
karoliineh cf8d588
Modify cram tests to not repeat tid in mhp in warnings
karoliineh 8ffcc4f
Remove duplicated tid printing from mhp
karoliineh d0a2a28
Do not print mhp results when empty
karoliineh 2d91b7a
Remove excessive top thread id uniqueness counter from cram tests
karoliineh 2686841
Do not show excessive top thread id uniqueness counter in warnings
karoliineh 51dfd45
Make printXml functions consistent with show and pretty
karoliineh 2cc5e7d
Replace sid-s in cram tests for macos tests to pass
karoliineh 5a397bc
Add dbg.full-output option for getting 'old' output
karoliineh 6f83a80
Add cram tests with dbg.full-output for testing mhp, thread ID and ma…
karoliineh 313d821
Use dbg.full-output option in mHP, threadId and wrapperFunction
karoliineh 4cfd2bc
Add cram tests with dbg.full-output for testing intervals
karoliineh 1148df3
Use dbg.full-output option in intDomain
karoliineh cc689ce
Indentation
karoliineh a9d5358
Simplify show in threadIdDomain
karoliineh 0ad7f6f
Merge branch 'master' into issue-1192
karoliineh 5419d44
Use diffs in cram tests
karoliineh c28e863
Use dbg.full-output in printXml
karoliineh cfd6b0e
tID #top -> ⊤ and change cram tests accordingly
karoliineh 24b6664
Update dbg.full-output description in options.schema.json
karoliineh f4d5a45
Merge branch 'master' into issue-1192
karoliineh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
$ goblint --set ana.activated "['base', 'mallocWrapper']" --set ana.ctx_insens[+] 'base' --set ana.ctx_insens[+] 'mallocWrapper' --set ana.base.privatization none --enable warn.debug 87-casts-dep-on-param.c | ||
Option warning: Without thread escape analysis, every local variable whose address is taken is considered escaped, i.e., global! | ||
[Info][Unsound] Unknown address in {&i} has escaped. (87-casts-dep-on-param.c:11:3-11:11) | ||
[Info][Unsound] Unknown value in {?} could be an escaped pointer address! (87-casts-dep-on-param.c:11:3-11:11) | ||
[Debug][Analyzer] Base EvalInt i query answering bot instead of {?, NULL, &(alloc@sid:22)} (87-casts-dep-on-param.c:13:7-13:15) | ||
[Debug][Analyzer] Base EvalInt i query answering bot instead of {?, NULL, &(alloc@sid:22)} (87-casts-dep-on-param.c:14:3-14:11) | ||
[Info][Unsound] Unknown address in {&p} has escaped. (87-casts-dep-on-param.c:17:7-17:19) | ||
[Info][Unsound] Unknown address in {&i} has escaped. (87-casts-dep-on-param.c:17:7-17:19) | ||
[Info][Unsound] Unknown value in {?} could be an escaped pointer address! (87-casts-dep-on-param.c:17:7-17:19) | ||
[Info][Deadcode] Logical lines of code (LLoC) summary: | ||
live: 15 | ||
dead: 0 | ||
total lines: 15 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(cram | ||
(deps (glob_files *.c))) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
$ goblint --enable warn.deterministic --enable ana.race.direct-arithmetic --enable allglobs 49-type-invariants.c | ||
[Warning][Behavior > Undefined > NullPointerDereference][CWE-476] May dereference NULL pointer (49-type-invariants.c:21:3-21:21) | ||
[Warning][Race] Memory location s.field (race with conf. 110): (49-type-invariants.c:8:10-8:11) | ||
write with [mhp:{tid=[main]; created={[main, [email protected]:20:3-20:40#top]}}, thread:[main]] (conf. 100) (exp: & tmp->field) (49-type-invariants.c:21:3-21:21) | ||
read with [mhp:{tid=[main, [email protected]:20:3-20:40#top]}, thread:[main, [email protected]:20:3-20:40#top]] (conf. 110) (exp: & s.field) (49-type-invariants.c:11:3-11:23) | ||
write with [mhp:{created={[main, [email protected]:20:3-20:40]}}, thread:[main]] (conf. 100) (exp: & tmp->field) (49-type-invariants.c:21:3-21:21) | ||
read with thread:[main, [email protected]:20:3-20:40] (conf. 110) (exp: & s.field) (49-type-invariants.c:11:3-11:23) | ||
[Info][Race] Memory locations race summary: | ||
safe: 1 | ||
vulnerable: 0 | ||
unsafe: 1 | ||
total memory locations: 2 | ||
[Success][Race] Memory location (struct S).field (safe): | ||
write with [mhp:{tid=[main]; created={[main, [email protected]:20:3-20:40#top]}}, thread:[main]] (conf. 100) (exp: & tmp->field) (49-type-invariants.c:21:3-21:21) | ||
write with [mhp:{created={[main, [email protected]:20:3-20:40]}}, thread:[main]] (conf. 100) (exp: & tmp->field) (49-type-invariants.c:21:3-21:21) | ||
[Info][Deadcode] Logical lines of code (LLoC) summary: | ||
live: 7 | ||
dead: 0 | ||
|
@@ -24,15 +24,15 @@ | |
$ goblint --enable warn.deterministic --disable ana.race.direct-arithmetic --enable allglobs 49-type-invariants.c | ||
[Warning][Behavior > Undefined > NullPointerDereference][CWE-476] May dereference NULL pointer (49-type-invariants.c:21:3-21:21) | ||
[Warning][Race] Memory location s.field (race with conf. 110): (49-type-invariants.c:8:10-8:11) | ||
write with [mhp:{tid=[main]; created={[main, [email protected]:20:3-20:40#top]}}, thread:[main]] (conf. 100) (exp: & tmp->field) (49-type-invariants.c:21:3-21:21) | ||
read with [mhp:{tid=[main, [email protected]:20:3-20:40#top]}, thread:[main, [email protected]:20:3-20:40#top]] (conf. 110) (exp: & s.field) (49-type-invariants.c:11:3-11:23) | ||
write with [mhp:{created={[main, [email protected]:20:3-20:40]}}, thread:[main]] (conf. 100) (exp: & tmp->field) (49-type-invariants.c:21:3-21:21) | ||
read with thread:[main, [email protected]:20:3-20:40] (conf. 110) (exp: & s.field) (49-type-invariants.c:11:3-11:23) | ||
[Info][Race] Memory locations race summary: | ||
safe: 1 | ||
vulnerable: 0 | ||
unsafe: 1 | ||
total memory locations: 2 | ||
[Success][Race] Memory location (struct S).field (safe): | ||
write with [mhp:{tid=[main]; created={[main, [email protected]:20:3-20:40#top]}}, thread:[main]] (conf. 100) (exp: & tmp->field) (49-type-invariants.c:21:3-21:21) | ||
write with [mhp:{created={[main, [email protected]:20:3-20:40]}}, thread:[main]] (conf. 100) (exp: & tmp->field) (49-type-invariants.c:21:3-21:21) | ||
[Info][Deadcode] Logical lines of code (LLoC) summary: | ||
live: 7 | ||
dead: 0 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,15 @@ | |
[Warning][Behavior > Undefined > NullPointerDereference][CWE-476] May dereference NULL pointer (77-type-nested-fields.c:31:3-31:20) | ||
[Warning][Behavior > Undefined > NullPointerDereference][CWE-476] May dereference NULL pointer (77-type-nested-fields.c:38:3-38:22) | ||
[Warning][Race] Memory location (struct T).s.field (race with conf. 100): | ||
write with [mhp:{tid=[main, [email protected]:37:3-37:40#top]}, thread:[main, [email protected]:37:3-37:40#top]] (conf. 100) (exp: & tmp->field) (77-type-nested-fields.c:31:3-31:20) | ||
write with [mhp:{tid=[main]; created={[main, [email protected]:37:3-37:40#top]}}, thread:[main]] (conf. 100) (exp: & tmp->s.field) (77-type-nested-fields.c:38:3-38:22) | ||
write with thread:[main, [email protected]:37:3-37:40] (conf. 100) (exp: & tmp->field) (77-type-nested-fields.c:31:3-31:20) | ||
write with [mhp:{created={[main, [email protected]:37:3-37:40]}}, thread:[main]] (conf. 100) (exp: & tmp->s.field) (77-type-nested-fields.c:38:3-38:22) | ||
[Info][Race] Memory locations race summary: | ||
safe: 1 | ||
vulnerable: 0 | ||
unsafe: 1 | ||
total memory locations: 2 | ||
[Success][Race] Memory location (struct S).field (safe): | ||
write with [mhp:{tid=[main, [email protected]:37:3-37:40#top]}, thread:[main, [email protected]:37:3-37:40#top]] (conf. 100) (exp: & tmp->field) (77-type-nested-fields.c:31:3-31:20) | ||
write with thread:[main, [email protected]:37:3-37:40] (conf. 100) (exp: & tmp->field) (77-type-nested-fields.c:31:3-31:20) | ||
[Info][Deadcode] Logical lines of code (LLoC) summary: | ||
live: 7 | ||
dead: 0 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,15 @@ | |
[Warning][Behavior > Undefined > NullPointerDereference][CWE-476] May dereference NULL pointer (79-type-nested-fields-deep1.c:36:3-36:20) | ||
[Warning][Behavior > Undefined > NullPointerDereference][CWE-476] May dereference NULL pointer (79-type-nested-fields-deep1.c:43:3-43:24) | ||
[Warning][Race] Memory location (struct U).t.s.field (race with conf. 100): | ||
write with [mhp:{tid=[main, [email protected]:42:3-42:40#top]}, thread:[main, [email protected]:42:3-42:40#top]] (conf. 100) (exp: & tmp->field) (79-type-nested-fields-deep1.c:36:3-36:20) | ||
write with [mhp:{tid=[main]; created={[main, [email protected]:42:3-42:40#top]}}, thread:[main]] (conf. 100) (exp: & tmp->t.s.field) (79-type-nested-fields-deep1.c:43:3-43:24) | ||
write with thread:[main, [email protected]:42:3-42:40] (conf. 100) (exp: & tmp->field) (79-type-nested-fields-deep1.c:36:3-36:20) | ||
write with [mhp:{created={[main, [email protected]:42:3-42:40]}}, thread:[main]] (conf. 100) (exp: & tmp->t.s.field) (79-type-nested-fields-deep1.c:43:3-43:24) | ||
[Info][Race] Memory locations race summary: | ||
safe: 1 | ||
vulnerable: 0 | ||
unsafe: 1 | ||
total memory locations: 2 | ||
[Success][Race] Memory location (struct S).field (safe): | ||
write with [mhp:{tid=[main, [email protected]:42:3-42:40#top]}, thread:[main, [email protected]:42:3-42:40#top]] (conf. 100) (exp: & tmp->field) (79-type-nested-fields-deep1.c:36:3-36:20) | ||
write with thread:[main, [email protected]:42:3-42:40] (conf. 100) (exp: & tmp->field) (79-type-nested-fields-deep1.c:36:3-36:20) | ||
[Info][Deadcode] Logical lines of code (LLoC) summary: | ||
live: 7 | ||
dead: 0 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,15 @@ | |
[Warning][Behavior > Undefined > NullPointerDereference][CWE-476] May dereference NULL pointer (80-type-nested-fields-deep2.c:36:3-36:22) | ||
[Warning][Behavior > Undefined > NullPointerDereference][CWE-476] May dereference NULL pointer (80-type-nested-fields-deep2.c:43:3-43:24) | ||
[Warning][Race] Memory location (struct U).t.s.field (race with conf. 100): | ||
write with [mhp:{tid=[main, [email protected]:42:3-42:40#top]}, thread:[main, [email protected]:42:3-42:40#top]] (conf. 100) (exp: & tmp->s.field) (80-type-nested-fields-deep2.c:36:3-36:22) | ||
write with [mhp:{tid=[main]; created={[main, [email protected]:42:3-42:40#top]}}, thread:[main]] (conf. 100) (exp: & tmp->t.s.field) (80-type-nested-fields-deep2.c:43:3-43:24) | ||
write with thread:[main, [email protected]:42:3-42:40] (conf. 100) (exp: & tmp->s.field) (80-type-nested-fields-deep2.c:36:3-36:22) | ||
write with [mhp:{created={[main, [email protected]:42:3-42:40]}}, thread:[main]] (conf. 100) (exp: & tmp->t.s.field) (80-type-nested-fields-deep2.c:43:3-43:24) | ||
[Info][Race] Memory locations race summary: | ||
safe: 1 | ||
vulnerable: 0 | ||
unsafe: 1 | ||
total memory locations: 2 | ||
[Success][Race] Memory location (struct T).s.field (safe): | ||
write with [mhp:{tid=[main, [email protected]:42:3-42:40#top]}, thread:[main, [email protected]:42:3-42:40#top]] (conf. 100) (exp: & tmp->s.field) (80-type-nested-fields-deep2.c:36:3-36:22) | ||
write with thread:[main, [email protected]:42:3-42:40] (conf. 100) (exp: & tmp->s.field) (80-type-nested-fields-deep2.c:36:3-36:22) | ||
[Info][Deadcode] Logical lines of code (LLoC) summary: | ||
live: 7 | ||
dead: 0 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
$ goblint --enable warn.deterministic --enable allglobs 84-distribute-fields-1.c | ||
[Warning][Race] Memory location s.data (race with conf. 110): (84-distribute-fields-1.c:9:10-9:11) | ||
write with [mhp:{tid=[main, [email protected]:18:3-18:40#top]}, thread:[main, [email protected]:18:3-18:40#top]] (conf. 110) (exp: & s.data) (84-distribute-fields-1.c:12:3-12:13) | ||
write with [mhp:{tid=[main]; created={[main, [email protected]:18:3-18:40#top]}}, thread:[main]] (conf. 110) (exp: & s) (84-distribute-fields-1.c:20:3-20:9) | ||
write with thread:[main, [email protected]:18:3-18:40] (conf. 110) (exp: & s.data) (84-distribute-fields-1.c:12:3-12:13) | ||
write with [mhp:{created={[main, [email protected]:18:3-18:40]}}, thread:[main]] (conf. 110) (exp: & s) (84-distribute-fields-1.c:20:3-20:9) | ||
[Info][Race] Memory locations race summary: | ||
safe: 1 | ||
vulnerable: 0 | ||
unsafe: 1 | ||
total memory locations: 2 | ||
[Success][Race] Memory location s (safe): (84-distribute-fields-1.c:9:10-9:11) | ||
write with [mhp:{tid=[main]; created={[main, [email protected]:18:3-18:40#top]}}, thread:[main]] (conf. 110) (exp: & s) (84-distribute-fields-1.c:20:3-20:9) | ||
write with [mhp:{created={[main, [email protected]:18:3-18:40]}}, thread:[main]] (conf. 110) (exp: & s) (84-distribute-fields-1.c:20:3-20:9) | ||
[Info][Deadcode] Logical lines of code (LLoC) summary: | ||
live: 8 | ||
dead: 0 | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this an improvement? All this information is needed to understand why accesses are considered racy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
mhp.ml
these exact conditions are already used to not show empty sets. This just means we don't printmhp:{}
without anything in it.We also don't print empty locksets etc. Everything we analyze and print for accesses is what we have for why access are not racy, i.e. information that can rule something out. If we don't have any excluding information (e.g. no locks), then we don't print that we don't know it. If we printed everything we didn't know, we'd have to print complete states.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, for must-joined I guess this holds.
An empty created set is very strong information though (no information would be top).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the created set is empty, we're already single-threaded and that's already reflected by the thread flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that's true: The created set is relative to the things the current thread created: We may be in a multi-threaded setting and I may not be the main thread but unique. Then an empty created set means that none of my children can be created yet.