Commit Graph

28282 Commits

Author SHA1 Message Date
Harry Maclean
c71f538a5a Extend the scope of self variables
`self` variables are scoped to methods, modules, classes and the
top-level of the program. Prior to this change, they were treated as
being scoped just to methods.

This change means we (once again) correctly synthesise `self` receivers
for method calls in class bodies, module bodies and at the top-level.
2021-10-20 09:43:23 +01:00
Harry Maclean
647485acde Don't omit self from uninitialized writes
We can safely create uninitialized writes for `self` variables, because
they appear at index -1 in the entry block of a method, and are
immediately overwritten by a write to `self` at index 0. As a result,
they are not live and will be pruned from the CFG.
2021-10-20 09:43:22 +01:00
Tom Hvitved
446eb13471 Minor adjustments to SSA library for self variables 2021-10-20 09:43:21 +01:00
Harry Maclean
0d39a15786 Model implicit reads of self variables
We already synthesise `self` nodes for method calls with no receiver.
This change creates read accesses for each of these synthesised nodes.
2021-10-20 09:43:20 +01:00
Harry Maclean
e7a3050fb2 Improve the modelling of self variables.
We model `self` variables by inserting a write at the start of every
method body. We then treat them as local variables that are alive for
the extent of the method body.
2021-10-20 09:43:19 +01:00
Tom Hvitved
3f396ac10e Merge pull request #371 from github/hvitved/dataflow/arg-sugar
Data flow: Fix bug for sugared call arguments
2021-10-19 15:48:21 +02:00
Tom Hvitved
c57b7c5b2b Data flow: Restrict ExprReturnNode to nodes from the body of the callable 2021-10-18 17:01:30 +02:00
Tom Hvitved
397b8345e0 Data flow: Fix bug for sugared call arguments 2021-10-18 13:48:11 +02:00
Tom Hvitved
0de27bbc7e Data flow: Add ArgumentNode test 2021-10-18 13:47:50 +02:00
Arthur Baars
e26cf7c354 Merge pull request #369 from github/rc/3.3
Merge 3.3 into main
2021-10-15 23:04:12 +02:00
Arthur Baars
9b88bbdd04 Merge pull request #367 from github/shati-patel/queriesxml
Add a queries.xml file (for CWE coverage docs)
2021-10-15 20:50:21 +02:00
shati-patel
c37cf71766 Add a queries.xml file (for CWE coverage) docs 2021-10-15 20:33:16 +02:00
Nick Rolfe
8469a535e3 Merge pull request #366 from github/merge-3.3-main-1
Merge 3.3 into main
2021-10-15 17:18:39 +01:00
Arthur Baars
804aef9b4a Merge remote-tracking branch 'codeql/main' into 'main'
Conflicts:
	config/identical-files.json
2021-10-15 16:37:59 +02:00
Arthur Baars
0e7b1f516c Merge remote-tracking branch 'origin/rc/3.3' into 'main' 2021-10-15 16:36:09 +02:00
Arthur Baars
3cb9a4921d Merge pull request #363 from github/codeql-merge
Merge `github/codeql` into rc/3.3
2021-10-15 16:17:20 +02:00
Arthur Baars
f296cc7860 Merge pull request #362 from github/merge-3.3-main
Merge 3.3 into main
2021-10-15 16:01:56 +02:00
Arthur Baars
568872a2f5 Add ruby to CODEOWNERS 2021-10-15 15:38:16 +02:00
Arthur Baars
103d9420d2 Update CodeSpaces configuration 2021-10-15 15:38:16 +02:00
Arthur Baars
5cd9b9cfc5 Remove github/codeql submodule 2021-10-15 15:38:16 +02:00
Arthur Baars
5a16f1e093 Merge identical-files.json 2021-10-15 15:38:16 +02:00
Arthur Baars
56953f5d5d Merge commit 'codeql-ruby/rc/3.3' into codeql/rc/3.3 2021-10-15 15:33:47 +02:00
Arthur Baars
ceecb23118 Merge remote-tracking branch 'rc/3.3' into 'main' 2021-10-15 15:21:48 +02:00
Arthur Baars
2444f6e7eb Merge pull request #361 from github/prepare-merge
Prepare merge into github/codeql
2021-10-15 15:07:35 +02:00
Arthur Baars
472fe0064f Update dependabot config 2021-10-15 14:20:07 +02:00
Arthur Baars
a9ba13c557 Drop LICENSE and CODE_OF_CONDUCT.md 2021-10-15 14:20:07 +02:00
Arthur Baars
21373c43eb Add change note 2021-10-15 14:20:07 +02:00
Arthur Baars
c66bf38f8d Update Ruby workflows 2021-10-15 14:20:07 +02:00
Arthur Baars
393800e4b9 Move create-extractor-pack Action 2021-10-15 11:47:57 +02:00
Arthur Baars
c815178f31 Remove CodeSpaces configuration 2021-10-15 11:47:56 +02:00
Arthur Baars
976daddd36 Move files to ruby subfolder 2021-10-15 11:47:28 +02:00
Taus
b2e4276bc8 Merge pull request #6886 from aschackmull/java-python/perffix-transitive-step-x3
Java/Python: Fix some potential performance problems due to transitive deltas.
2021-10-15 11:06:35 +02:00
Tom Hvitved
86b1305e35 Merge pull request #6883 from hvitved/csharp/inline-expectations
C#: Adopt inline test expectations framework
2021-10-15 09:33:22 +02:00
Anders Schack-Mulligen
4de1deefc4 Merge pull request #6889 from tausbn/java-fix-import-order
Java: Fix import order in `SignAnalysisSpecific`
2021-10-15 09:17:50 +02:00
Anders Schack-Mulligen
0b82289950 Merge pull request #6828 from zbazztian/adjust-jsp-locations
Adjust locations of results in JSP files
2021-10-15 08:28:11 +02:00
Taus
a9c5fd2cc0 Java: Fix import order in SignAnalysisSpecific 2021-10-14 15:51:56 +00:00
Anders Schack-Mulligen
eb0a88d39c Merge pull request #6885 from aschackmull/java/perffix-transitve-step
Java: Fix performance problem due to transitive step.
2021-10-14 16:51:51 +02:00
Anders Schack-Mulligen
f6a517c998 Merge pull request #6882 from MathiasVP/fix-unnecessary-exists
C++/Python: Remove unnecessary `exists`
2021-10-14 16:44:05 +02:00
Anders Schack-Mulligen
310eec07c1 Java/Python: Fix some potential performance problems due to transitive deltas. 2021-10-14 16:10:00 +02:00
Anders Schack-Mulligen
cb5f2559ea Java: Fix performance problem due to transitive step. 2021-10-14 15:54:54 +02:00
Tom Hvitved
083214f85a C#: Use inline test expectations for FieldFlow.ql 2021-10-14 15:22:21 +02:00
Tom Hvitved
ed6a182cd1 C#: Adopt inline test expectations framework 2021-10-14 15:22:21 +02:00
Anders Schack-Mulligen
8b6baa250c Merge pull request #6878 from aschackmull/remove-singleton-setliteral
C++/C#/Java/JavaScript/Python: Remove singleton set literals.
2021-10-14 14:53:05 +02:00
Rasmus Wriedt Larsen
7cd5e681dd Merge pull request #6693 from yoff/python/promote-regex-injection
Python: Promote `py/regex-injection`
2021-10-14 14:49:05 +02:00
Mathias Vorreiter Pedersen
47a85bbb1d Merge pull request #6869 from MathiasVP/fix-prefix/suffix-equality
Java/JS/Python: Replace '.prefix'/'.suffix' with '.matches'
2021-10-14 13:47:03 +01:00
Rasmus Wriedt Larsen
a5ab0b9100 Merge pull request #6871 from tausbn/python-fix-uses-of-implicit-this
Python: Fix uses of "implicit `this`"
2021-10-14 14:38:13 +02:00
Tom Hvitved
3acd718876 Merge pull request #360 from github/bump-codeql
Bump `codeql` submodule
2021-10-14 14:00:57 +02:00
Tom Hvitved
b12561865a Bump codeql submodule 2021-10-14 13:41:48 +02:00
Nick Rolfe
1920cd1c7e Merge pull request #359 from github/explicit_this
Add explicit `this` qualifiers in generated code
2021-10-14 12:40:09 +01:00
Anders Schack-Mulligen
10d6803b05 Merge pull request #6880 from hvitved/csharp/explicit-this
C#: Add explicit `this` qualifiers
2021-10-14 13:31:04 +02:00