analyze: allow pointee analysis to work interprocedurally #1172
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.
This branch modifies the pointee-type analysis to use a single global
VarTable
for all functions, which allows pointee inference variables produced in one function to be resolved in another. This is necessary for lighttpd'sbuffer
module, which allocates abuffer
object in one function (producing an inference variable for themalloc
) and initializes it in a different function (where the inference variable can now be resolved).The pointee analysis previously involved an "export" operation that ran after processing each function to convert the analysis results to a form that makes sense in other functions. This meant that the results couldn't contain any inference variables or mention any local
PointerId
s. Any entries in the results that violated these constraints would be erased, and the result set would be marked "incomplete". With this branch, both constraints are lifted, as both inference variables and localPointerId
s are representable in the global scope.