Skip to content

Conversation

jbj
Copy link
Contributor

@jbj jbj commented Sep 21, 2018

This should be merged together with the corresponding internal PR. The tests on this PR can be ignored.

jbj and others added 11 commits September 11, 2018 11:43
On a snapshot of Postgres, evaluation of
`getNextExplicitlyInitializedElementAfter#fff#antijoin_rhs#1` took
forever, preventing the computation of the IR. I haven't been able to
reproduce it with a small test case, but the implementation of
`getNextExplicitlyInitializedElementAfter` was fragile because it called
the inline predicate `ArrayAggregateLiteral.isInitialized`. It also
seemed inefficient that `getNextExplicitlyInitializedElementAfter` was
computed for many values of its parameters that were never needed by the
caller.

This commit replaces `getNextExplicitlyInitializedElementAfter` with a
new predicate named `getEndOfValueInitializedRange`, which should have
the same behavior but a more efficient implementation. It uses a helper
predicate `getNextExplicitlyInitializedElementAfter`, which shares its
name with the now-deleted predicate but has behavior that I think
matches the name.
C++: IR: Fix performance of value-init ranges
With the new formulation, we can join on function and index at the
same time, leading to significant performance gains on large code
bases that use templates extensively.
These tests exercise the problematic cases where a variable can appear
to have multiple types because of how we fail to account for qualified
names when comparing type names.
Also exclude templates as their names are not canonical.

The test changes in `isfromtemplateinstantiation/` are the inverses of
what we got in 34c9892, which should be a good thing.
…ntry

Parameter.qll: Tweak how effective declaration entries are computed
@jbj jbj added C++ depends on internal PR This PR should only be merged in sync with an internal Semmle PR Mergeback labels Sep 21, 2018
@nickrolfe nickrolfe merged commit e21a5e4 into github:master Sep 21, 2018
aibaars pushed a commit that referenced this pull request Oct 14, 2021
Use RegExp prefix instead of Regex, for consistency with other languages.
smowton pushed a commit to smowton/codeql that referenced this pull request Feb 7, 2022
Fix unbound `symbol.owner` references, missing elements in declaration stack and add todos
MathiasVP pushed a commit to MathiasVP/ql that referenced this pull request Aug 10, 2025
…k-org

PowerShell Lib Pack: Change microsoft-sdl to microsoft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ depends on internal PR This PR should only be merged in sync with an internal Semmle PR Mergeback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants