Commit Graph

33872 Commits

Author SHA1 Message Date
Dave Bartolomeo
125a09ce6e C++: Fix IR generation of return of void expression 2020-04-14 11:40:33 -04:00
Dave Bartolomeo
95a6dd01c6 C#: Accept test output 2020-04-14 11:11:36 -04:00
Asger Feldthaus
6668a7a546 JS: Add backwards-compatible predicates to SocketIO 2020-04-14 15:57:19 +01:00
Dave Bartolomeo
83cd78c6cf C++: Fix test output 2020-04-14 10:54:00 -04:00
Felicity Chapman
bc250506a1 Merge pull request #3227 from felicitymay/update-references
Update some out of date information
2020-04-14 14:56:05 +01:00
Asger F
c178eecd43 Update javascript/ql/src/semmle/javascript/Variables.qll
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com>
2020-04-14 14:40:21 +01:00
Felicity Chapman
c570ebe5bd Merge branch 'rc/1.24' into update-references 2020-04-14 14:10:26 +01:00
Geoffrey White
92187d9e71 C++: Change note. 2020-04-14 14:00:46 +01:00
Mathias Vorreiter Pedersen
721e9d532a Merge pull request #2704 from rdmarsh2/rdmarsh/cpp/ir-flow-through-outparams
C++: IR dataflow edges through outparams
2020-04-14 14:20:34 +02:00
Taus
3e46604fa5 Merge pull request #3223 from BekaValentine/python-objectapi-to-valueapi-iterreturnsnoniterator
Python: ObjectAPI to ValueAPI: IterReturnsNonIterator
2020-04-14 12:55:21 +02:00
Taus
d9a2429de8 Merge pull request #3244 from BekaValentine/python-objectapi-to-valueapi-wrongnumberargumentsinclassinstantiation
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInClassInstantiation
2020-04-14 12:46:29 +02:00
semmle-qlci
e21164e5ac Merge pull request #3258 from erik-krogh/NormalPathSanitizer-patch1
Approved by asgerf
2020-04-14 11:31:45 +01:00
semmle-qlci
52b76b1373 Merge pull request #3233 from RasmusWL/python-use-getAbsolutePath
Approved by BekaValentine
2020-04-14 10:43:24 +01:00
Mathias Vorreiter Pedersen
419b511ddb C++: Format 2020-04-14 11:39:44 +02:00
semmle-qlci
2e95cab970 Merge pull request #3234 from RasmusWL/python-modenise-files
Approved by BekaValentine
2020-04-14 10:38:26 +01:00
Asger Feldthaus
3515a2b412 JS: Update test output 2020-04-14 10:31:31 +01:00
Asger Feldthaus
88667206fc JS: Remove default hasLocationInfo case 2020-04-14 10:03:10 +01:00
Asger Feldthaus
5da968e34c JS: Specialize ASTNode.getFile 2020-04-14 10:03:10 +01:00
Asger Feldthaus
244a304e1d JS: Implement getFile() directly instead of via locations 2020-04-14 10:03:10 +01:00
Asger Feldthaus
dc084628cc JS: Avoid the special name getURL 2020-04-14 10:03:09 +01:00
Erik Krogh Kristensen
6827b84bdc change docstring to inline comment, and refer directly to array class 2020-04-14 10:32:16 +02:00
Erik Krogh Kristensen
e47575ce5b more precise getChild for matching "../" 2020-04-14 10:24:08 +02:00
Mathias Vorreiter Pedersen
d8dcbe3cbd C++: QLDoc for FileClosed, LoopBounds and MemoryFreed 2020-04-14 10:21:11 +02:00
Tom Hvitved
a9b88b6eaa C#: Update data flow tests 2020-04-14 09:31:10 +02:00
Robert Marsh
10824f9612 C++: add method qldoc in Class.qll 2020-04-13 15:49:37 -07:00
Dave Bartolomeo
1bde11706e C++: Connect InitializeIndirection to UnmodeledDefinition
The IR generation for `InitializeIndirection` currently connects its load operand to the result of the corresponding `InitializeParameter` instruction. This isn't exactly wrong, but it doesn't fit the IR invariant of "All unmodeled uses consume `UnmodeledDefinition`". Our current code doesn't care, because we just throw away all of the existing def-use information, modeled or otherwise, when we build unaliased SSA. However, some upcoming SSA changes don't work correctly if this invariant is broken.

I've added the trivial IR generation change, along with a new sanity query.
2020-04-13 18:37:47 -04:00
Dave Bartolomeo
603a3af19b C++: Treat implicit end of body of non-void function as Unreached
When the extractor can't prove that control flow will never reach the end of a non-`void`-returning function without reaching an explicit `return` statement, it inserts an implicit `return` without an operand. If control actually reaches this point, the behavior is undefined.

We were previously generating invalid IR for these implicit `return` statements, because the lack of an operand meant that there was no definition of the return value variable along that path. Instead, I've changed the IR generation to emit an `Unreached` instruction for the implicit `return`. This ensures that we don't create a control flow edge from the end of the body to the function epilogue.

The change to the range analysis test avoids having that test depend on the previous bad IR behavior, while still preserving the original spirit of the test.
2020-04-13 18:09:44 -04:00
Robert Marsh
f24c4e51c5 C++: add method qldoc in Diagnostics.qll 2020-04-13 14:58:30 -07:00
Robert Marsh
d065389a6b C++: add method commetns in Compilation.qll 2020-04-13 14:41:25 -07:00
Robert Marsh
de29d93ede C++: add method qldoc for Comment.qll 2020-04-13 14:39:51 -07:00
Robert Marsh
8779177839 C++: accept minor test change 2020-04-13 14:03:02 -07:00
Robert Marsh
a5e7db73b2 Merge branch 'rc/1.24' into rdmarsh/cpp/ir-flow-through-outparams
For submodule consistency
2020-04-13 12:02:59 -07:00
Mathias Vorreiter Pedersen
cde34c9b1b C++: Accept test output which I previously forgot to accept 2020-04-13 16:19:21 +02:00
Mathias Vorreiter Pedersen
daac5c5ab3 Merge branch 'master' into ir-flow-fields 2020-04-13 14:19:17 +02:00
Mathias Vorreiter Pedersen
945ecffd05 C++: Add charpred to ParameterNode 2020-04-13 14:18:57 +02:00
Pavel Avgustinov
7c5c9ea8ea Merge pull request #3240 from Semmle/update-license-in-readme
Update README to reflect new license
2020-04-10 17:36:36 +01:00
Rebecca Valentine
8e91f10030 Python: ObjectAPI to ValueAPI: UselessClass: Adds preliminary modernization 2020-04-09 15:25:38 -07:00
Rebecca Valentine
339758fa70 Python: ObjectAPI to ValueAPI: WrongNameForArgumentInClassInstantiation: Adds preliminary modernization 2020-04-09 15:04:44 -07:00
Rebecca Valentine
8dc1933a02 Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInClassInstantiation: Adds preliminary modernization 2020-04-09 14:58:30 -07:00
Rebecca Valentine
336e48c5c6 Python: ObjectAPI to ValueAPI: IncorrectlySpecifiedOverriddenMethod: Adds preliminary modernization 2020-04-09 14:50:26 -07:00
Rebecca Valentine
be00d71b99 Python: ObjectAPI to ValueAPI: IncorrectlyOverriddenMethod: Adds preliminary modernization 2020-04-09 14:41:22 -07:00
Rebecca Valentine
7a586c97a4 Python: ObjectAPI to ValueAPI: IterReturnsNonIterature: Replaces custom return_type predicate with call to getAnInferredReturnType 2020-04-09 14:30:40 -07:00
Dave Bartolomeo
9f18a15a93 Merge pull request #3231 from MathiasVP/qualified-static-calls-are-static
C++: Do not generate this parameters and read/write side effects from static member functions
2020-04-09 10:48:59 -04:00
Pavel Avgustinov
6737e99d65 Merge pull request #3209 from hmakholm/baselib-extractor
Add extractor field in base language QL packs
2020-04-09 15:24:49 +01:00
Mathias Vorreiter Pedersen
7f5330dd0a Merge branch 'master' into ir-flow-fields 2020-04-09 16:08:44 +02:00
Geoffrey White
ba3a8d0872 C++: Improve naming and QLDoc. 2020-04-09 15:06:23 +01:00
Geoffrey White
a7979fdc12 C++: Base results purely on allocations now, not multiplications by a sizeof. 2020-04-09 15:05:29 +01:00
Geoffrey White
febbbc4423 C++: Additional test cases. 2020-04-09 15:03:35 +01:00
James Fletcher
6e88b6d4f4 Merge pull request #3239 from jf205/update-support-project
docs: Update support project to use fewer reusables
2020-04-09 14:18:55 +01:00
Geoffrey White
2f7ec49684 Merge pull request #3238 from MathiasVP/TlsSettingsMisconfiguration-id-no-underscores
C++: Replace underscores with dashes in query @id
2020-04-09 13:07:08 +01:00