Duplicate root-cause entries in PerWildPtrStats.json
for expression variables in shared header files
#730
Labels
PerWildPtrStats.json
for expression variables in shared header files
#730
IIUC, 3C currently doesn't try to deduplicate expression
ConstraintVariable
s generated for header files shared by multiple translation units because we don't yet have a good way to do it; PSL-based deduplication would cause incorrect behavior in some examples we care about with multiple expressionConstraintVariable
s at the same PSL. For the most part, this duplication has no observable ill effects: each time the body of a shared inline function is processed, 3C generates another copy of the constraint subgraph (connected to the same non-expressionConstraintVariable
s), but these multiple copies have the same ultimate effect on the solution for the non-expressionConstraintVariable
s that a single copy would.However, I noticed one ill effect: a root cause related to an expression
ConstraintVariable
can be listed multiple times inPerWildPtrStats.json
. Currently, only one root-cause warning will be generated because those warnings are deduplicated by PSL, but that may need to be changed to atom-based deduplication, at which point the warnings would exhibit the same duplication asPerWildPtrStats.json
.An example:
shared.h
:a.c
andb.c
each containing:After running
3c -dump-stats -output-dir=out.checked a.c b.c --
, we get inPerWildPtrStats.json
:If we discover other ill effects of duplication of expression
ConstraintVariable
s, it may make sense to add them to this issue.The text was updated successfully, but these errors were encountered: