Overlay: Add overlay annotations to Java & shared libraries #19779
+979
−0
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 PR adds overlay annotations for Java libraries and shared libraries to support experimentation with Java overlay analysis. Overlay annotations were added automatically using the
add-overlay-annotations.py
script. The high-level intend is that dataflow should be global and as much as possible below dataflow should be local. To achieve this the script adds top-leveloverlay[local?]
annotations to Java and shared libraries based on a simple heuristic:Test.qll
Query.qll
orConfig.qll
if they containimplements DataFlow::ConfigSig
.For files selected for annotation, the script also adds
overlay[caller]
annotations on all public predicates annotated withpragma[inline]
to ensure that those predicates will still be inlined across the overlay frontier once overlay compilation is enabled. See the internal Incremental CodeQL docs for additional details.This PR does not enable overlay compilation for Java and therefore currently has no effect on the generated DIL, RA or QLX (as witnessed by the uneventful DCA runs). The only current impact of adding the annotations will be that the compiler will check for overlay annotation errors, but in the absence of errors the overlay annotations currently have no effect on compilation. See the internal Incremental CodeQL docs for additional details.
A CI check will be added in a subsequent PR to enforce usage of the
add-overlay-annotations.py
script to automatically add overlay annotations to newly added files.