Skip to content

Conversation

@adityasharad
Copy link
Collaborator

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

One minor conflict resolved: QLDoc for hasCompleteTwin in ResolveClass.qll.

jbj and others added 13 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
We currently erroneously keep mentions of class instantiations, which
can lead to bad performance on template-heavy code bases. We never
want to link those anyway, so we can simply suppress them.
C++ definitions: Ignore type mentions of class inatantiations.
@adityasharad adityasharad added depends on internal PR This PR should only be merged in sync with an internal Semmle PR Mergeback labels Sep 25, 2018
@nickrolfe
Copy link
Contributor

Which internal PR corresponds with this? 28026 has been merged already.

@adityasharad
Copy link
Collaborator Author

adityasharad commented Sep 26, 2018 via email

@nickrolfe nickrolfe merged commit 314e1a1 into github:next Sep 26, 2018
aibaars added a commit that referenced this pull request Oct 14, 2021
smowton pushed a commit to smowton/codeql that referenced this pull request Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

6 participants