14582 Commits

Author SHA1 Message Date
Anders Schack-Mulligen
86755215ad Merge pull request #4225 from aschackmull/java/changenote-1.25
Java: Add 1.25 change notes.
v1.25.0
2020-09-08 14:50:46 +02:00
Anders Schack-Mulligen
02da80aa25 Java: Remove "New Queries" section. 2020-09-08 14:40:33 +02:00
Anders Schack-Mulligen
b1e6e3a6f2 Java: Add 1.25 change notes. 2020-09-08 14:18:20 +02:00
Jonas Jensen
8e8c65a164 Merge pull request #4146 from jbj/partiallyDefinesVariableAt
C++: Fix two join orders in FlowVar.qll
2020-09-02 13:11:29 +02:00
Jonas Jensen
e949c167fa C++: Add back getSubBasicBlockStart
It turns out this predicate was used in a test, and that use can't be
replaced with the new `partiallyDefinesVariableAt` predicate since
`partiallyDefinesVariableAt` doesn't hold for a `PartialDefinition` that
defines something other than a variable.
2020-08-27 11:14:47 +02:00
Jonas Jensen
f3e98c3bea C++: Fix join order of FlowVar::definedPartiallyAt
This predicate was very slow on kamailio/kamailio:

    (696s) Tuple counts for FlowVar::FlowVar::definedPartiallyAt_dispred#ff:
    703569     ~3%     {3} r1 = SCAN FlowVar::FlowVar_internal::TBlockVar#fff AS I OUTPUT I.<1>, I.<0>, I.<2>
    7679540588 ~3%     {3} r2 = JOIN r1 WITH FlowVar::PartialDefinitions::PartialDefinition::partiallyDefines_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r1.<1>, r1.<2>
    567217     ~2%     {2} r3 = JOIN r2 WITH project#FlowVar::PartialDefinitions::PartialDefinition#class#fff#2 AS R ON FIRST 2 OUTPUT r2.<2>, r2.<0>
                       return r3

After this change, the predicate takes no time at all:

    (22s) Tuple counts for FlowVar::FlowVar::definedPartiallyAt_dispred#ff:
    703569  ~3%     {3} r1 = SCAN FlowVar::FlowVar_internal::TBlockVar#fff AS I OUTPUT I.<1>, I.<0>, I.<2>
    567217  ~2%     {2} r2 = JOIN r1 WITH FlowVar::PartialDefinitions::PartialDefinition::partiallyDefinesVariableAt#fff_120#join_rhs AS R ON FIRST 2 OUTPUT r1.<2>, R.<2>
                    return r2

Looking at the code, it turned out that the predicates
`partiallyDefines` and `getSubBasicBlockStart` were almost always used
together and could therefore be merged into a single predicate to get
better join orderings. The predicate `partiallyDefinesThis` was never
used.
2020-08-27 09:52:22 +02:00
Jonas Jensen
2b720b332b C++: Fix join order in reachesWithoutAssignment
The negation in this predicate did not get pulled into an
`#antijoin_rhs` predicate but got materialized as part of each
iteration, which meant that the temporary `ControlFlowNode` column did
not get projected away. The tuple counts looked like this on
kamailio/kamailio (iteration 20):

    5724      ~13%      {3} r9 = JOIN r8 WITH BasicBlocks::Cached::bb_successor_cached#ff@staged_ext AS R ON FIRST 2 OUTPUT r8.<2>, r8.<3>, r8.<1>
    5724      ~12%      {3} r10 = JOIN r8 WITH BasicBlocks::Cached::bb_successor_cached#ff@staged_ext AS R ON FIRST 2 OUTPUT r8.<3>, r8.<2>, r8.<1>
    124717061 ~11%      {4} r11 = JOIN r10 WITH project#FlowVar::FlowVar_internal::assignmentLikeOperation#ffff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r10.<2>, r10.<1>, r10.<0>
    66        ~0%       {3} r12 = JOIN r11 WITH project#BasicBlocks::Cached::basic_block_member AS R ON FIRST 2 OUTPUT r11.<2>, r11.<3>, r11.<1>
    66                  {3} r13 = MATERIALIZE r12 AS antijoin_rhs
    5658      ~14%      {3} r14 = r9 AND NOT r13(r9.<0>, r9.<1>, r9.<2>)

After manually pulling out the join inside the negation, the time per
iteration drops from ~30 to <1s. The pipeline above is replaced with

    892394  ~0%      {4} r6 = r5 AND NOT FlowVar::FlowVar_internal::assignsToVar#fb AS R(r5.<3>, r5.<2>)
    892394  ~0%      {4} r7 = SCAN r6 OUTPUT r6.<1>, r6.<3>, r6.<0>, r6.<2>
    5658    ~11%     {3} r8 = JOIN r7 WITH BasicBlocks::Cached::bb_successor_cached#ff@staged_ext AS R ON FIRST 2 OUTPUT r7.<2>, r7.<1>, r7.<3>
2020-08-27 09:52:22 +02:00
Max Schaefer
c9e22ab271 Merge pull request #4133 from owen-mc/docs/add-go-frameworks
Add go frameworks to docs
2020-08-26 07:47:28 +01:00
Owen Mansel-Chan
b4c3ea41d1 Add go frameworks to docs 2020-08-26 07:26:31 +01:00
James Fletcher
97c107b926 Merge pull request #4091 from jf205/link-quotes-ql-handbook
QL language reference: update links to match GitHub docs style
2020-08-18 14:37:55 +01:00
Shati Patel
378e3b2df4 Merge pull request #4075 from shati-patel/docs-branch-rename
Docs: Rename default branch
2020-08-18 14:26:34 +01:00
james
8ad6947308 add quotes to several more links 2020-08-18 13:19:23 +01:00
james
b6b424dd00 remove spurious spaces 2020-08-17 21:14:08 +01:00
james
b150c6497f update links 2020-08-17 21:08:33 +01:00
CodeQL CI
a19963e9b7 Merge pull request #3930 from erik-krogh/fastProp
Approved by esbena
2020-08-17 13:42:12 +01:00
Shati Patel
b212af08a6 Docs: Rename default branch 2020-08-14 12:03:00 +01:00
Shati Patel
1d4978aa6e Merge pull request #4046 from jf205/link-quotes-learn-ql
Learning CodeQL docs: update links to match GitHub docs style
2020-08-14 11:57:09 +01:00
Robert Marsh
4a07bd5a15 Merge pull request #4032 from jbj/asExpr-docs
C++: Clarify the docs on DataFlow::Node::asExpr
2020-08-13 16:54:09 -04:00
Jonas Jensen
36373fce9b C++: Deprecate DataFlow::definitionByReferenceNode
This predicate name was only used in IR data flow, not in AST data flow.
2020-08-13 15:27:35 +02:00
Jonas Jensen
3f383784cd C++: QLDoc formatting fixup 2020-08-13 15:27:35 +02:00
Jonas Jensen
f70a17b858 C++: clearer wording in asExpr doc
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2020-08-13 15:27:35 +02:00
Jonas Jensen
5ae8b02bde C++: Clarify the docs on DataFlow::Node::asExpr
For IR data flow I also added a `definitionByReferenceNodeFromArgument`
predicate to improve compatibility with AST data flow.
2020-08-13 15:27:35 +02:00
Shati Patel
b1be3672e7 Merge pull request #4058 from shati-patel/metadata
Docs: Add metadata option missing from reference table
2020-08-13 11:31:52 +01:00
james
5fed92b2d0 remove new line 2020-08-12 20:30:24 +01:00
Shati Patel
78948139fd Add metadata option missing from reference table 2020-08-12 17:25:54 +01:00
james
bc02348a83 fix up table and remove another extra space 2020-08-12 09:54:42 +01:00
James Fletcher
f9f5a69a9f Apply suggestions from @hubwriter's code review
Co-authored-by: Alistair Christie <54933897+hubwriter@users.noreply.github.com>
2020-08-12 09:53:12 +01:00
james
4d723ba276 remove some spurious spaces 2020-08-12 09:48:00 +01:00
james
0dbe64eee7 address some review comments
stray quote
2020-08-12 09:38:00 +01:00
CodeQL CI
e603f5cc48 Merge pull request #4052 from github/max-schaefer-patch-2
Approved by shati-patel
2020-08-12 09:29:37 +01:00
Max Schaefer
6dad027eb6 Go: Claim support for 1.15
Go 1.15 was just released, and there are [no changes](https://golang.org/doc/go1.15#language) to the language, so we might as well list it as supported.
2020-08-12 09:11:57 +01:00
james
0ff10c319d update lots of links 2020-08-11 17:31:50 +01:00
Erik Krogh Kristensen
a1394c363a more consistent naming of predicates 2020-08-11 14:49:51 +02:00
Erik Krogh Kristensen
2974c4923f introduce and use isAPropertyWrite 2020-08-11 14:43:25 +02:00
Erik Krogh Kristensen
8f6721e087 add explanation for purity-check in getANodeAfterWrite/getANodeBeforeWrite and move them into an internal module 2020-08-11 14:40:13 +02:00
Erik Krogh Kristensen
9e768375ce mention purity check in docstring for maybeAssignsAccessedPropInBlock 2020-08-11 14:40:02 +02:00
Erik Krogh Kristensen
374b1b7b97 apply manual magic in both cases in maybeAssignsAccessedPropInBlock 2020-08-11 14:24:49 +02:00
CodeQL CI
d214cecf4d Merge pull request #4028 from asger-semmle/js/scope-manager-npe
Approved by max-schaefer
2020-08-10 09:47:09 +01:00
Asger Feldthaus
64f58b74f6 JS: Fix extractor crash when some parameters have no type annotation 2020-08-07 11:56:54 +01:00
James Fletcher
7f8bf21325 Merge pull request #4016 from jf205/learn-codeql/styles
CodeQL docs: update CSS and master page template
2020-08-05 14:20:13 +01:00
james
364cc19dea docs: update styles 2020-08-05 11:39:43 +01:00
Tom Hvitved
63115a36f7 Merge pull request #3994 from hvitved/csharp/dataflow/library-aps-adjust
C#: More type-based adjustment of library-flow access paths
2020-08-04 14:33:54 +02:00
Anders Schack-Mulligen
68441bdf99 Merge pull request #3987 from Marcono1234/patch-1
[Java] Improve InsecureJavaMail.qhelp references
2020-08-04 12:12:38 +02:00
Anders Schack-Mulligen
cdea0f05b0 Merge pull request #3946 from aibaars/util-collections-2
Java: Clean up ContainerFlow: address outstanding comments
2020-08-04 10:27:22 +02:00
Erik Krogh Kristensen
eccfade928 rewrite parts of the DeadStoreOfProperty query 2020-08-04 10:25:05 +02:00
Erik Krogh Kristensen
e629e6bbb0 changes based on review 2020-08-04 10:25:05 +02:00
Erik Krogh Kristensen
8131618382 revert making rankedAccessPath private 2020-08-04 10:25:05 +02:00
Erik Krogh Kristensen
97aa3cc8a3 rewrite DeadStoreOfProperty to improve worst-case complexity 2020-08-04 10:25:05 +02:00
Erik Krogh Kristensen
dbeef312ca add some TypeScript tests to DeadStoreOfProperty 2020-08-04 10:25:05 +02:00
Tom Hvitved
71933a4d8a Merge pull request #4009 from hvitved/csharp/extractor-pack-files
C#: Add CodeQL extractor pack files
2020-08-03 19:33:26 +02:00