Commit Graph

33872 Commits

Author SHA1 Message Date
semmle-qlci
da566a4484 Merge pull request #2828 from erik-krogh/CVE24
Approved by esbena
2020-02-14 09:12:48 +00:00
semmle-qlci
769dce511b Merge pull request #2788 from erik-krogh/CVE42-sink
Approved by esbena
2020-02-14 08:00:00 +00:00
Mathias Vorreiter Pedersen
98db6d8fd7 C#: Fix format and sync files 2020-02-14 08:22:25 +01:00
Robert Marsh
b4ff1216cc C++: sync identical files 2020-02-13 17:02:00 -08:00
Aditya Sharad
5e0d640f57 Merge pull request #2841 from BekaValentine/gitignore_vim_swap_files
Adds .gitignore entry for vim swap files.
2020-02-13 16:20:33 -08:00
Robert Marsh
0f58887396 C++: unique value number for filtered instructions
Instructions that are removed from the normal value numbering recursion
because they have a duplicated type or AST element get unique value
numbers rather than going unnumbered. This ensures comparisons of value
numbers using `!=` hold for filtered instructions.
2020-02-13 15:36:42 -08:00
Rebecca Valentine
2ee38f246b Adds .gitignore entry for vim swap files. 2020-02-13 15:23:50 -08:00
Rebecca Valentine
6a04004d94 Adds test cases and qlref. 2020-02-13 14:49:01 -08:00
Rebecca Valentine
b665f54a31 Corrects query to use builtin instead of special 2020-02-13 14:48:46 -08:00
Rebecca Valentine
3b45fbc87c Adds rough modernization. 2020-02-13 14:22:00 -08:00
Mathias Vorreiter Pedersen
d4c6f487bc C++/C#: Fix sync config file for value numbering sharing 2020-02-13 22:32:52 +01:00
Mathias Vorreiter Pedersen
ed7888c612 C++: Sync identical files 2020-02-13 21:50:03 +01:00
Mathias Vorreiter Pedersen
57613d5507 C++: Reintroduce the type in TConstantValueNumber to avoid giving constant with different signed-ness the same value number. Instead filter those with more than one type out. 2020-02-13 21:49:40 +01:00
Dave Bartolomeo
9e1ea01be8 Fix typo 2020-02-13 13:01:09 -07:00
Tom Hvitved
09b1e8b161 C#: Update expected test output 2020-02-13 20:08:11 +01:00
james
b32683fc9f docs: expand handbook entry on monotonic aggregates 2020-02-13 18:06:44 +00:00
Mathias Vorreiter Pedersen
cb510edcf0 C++: Sync up identical files and restore imports 2020-02-13 18:02:56 +01:00
Mathias Vorreiter Pedersen
04c5f1cbb4 C++: Perf fix for value numbering 2020-02-13 18:02:56 +01:00
Jonas Jensen
24396905a5 WIP: Try to reduce ambiguous value numbers
This is not enough to get genome/breakdancer working.
2020-02-13 18:02:56 +01:00
Jonas Jensen
8054cde9fc WIP: Switch on IR 2020-02-13 18:02:56 +01:00
Tom Hvitved
332733a92e Java/C++: Follow-up changes 2020-02-13 16:34:06 +01:00
Tom Hvitved
b5b0c2b8cf Data flow: Sync files 2020-02-13 16:34:06 +01:00
Tom Hvitved
6be2bf8374 Address review comments 2020-02-13 16:34:06 +01:00
James Fletcher
c95f58c30d Merge pull request #2830 from shati-patel/docs-preparation
Merge master into `docs-preparation` branch
2020-02-13 14:59:09 +00:00
Henning Makholm
3ec11a1089 Don't chain to ./codeql in .codeqlmanifest.json
This entry in `.codeqlmanifest.json` was intended to allow
unpacking the CodeQL CLI as a subdirectory of `ql`, and things
would Just Work.

However, it is not necessary anymore because recent releases of
the CLI will search their own directory as a fallback
_independently_ of the parent directory.

On the contrary, removing this link will make internal testing
easier because you then run a test build of the CLI with
`--search-path` pointing to the `ql` checkout without inadvertently
making extractors in a _different_ build that is unpacked there visible.
2020-02-13 15:30:15 +01:00
Erik Krogh Kristensen
897bb4d801 add test for chrome-remote-interface 2020-02-13 15:12:45 +01:00
Erik Krogh Kristensen
1ab5ca4e64 typo in docstring
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com>
2020-02-13 14:15:28 +01:00
jack1142
e1644dd68b Python: Handle __class_getitem__ in py/not-named-self (#2825)
Fixes #2824
2020-02-13 13:38:36 +01:00
Rasmus Wriedt Larsen
1558cf2eae Python: Fix typo (decent => descent) 2020-02-13 13:35:29 +01:00
Tom Hvitved
8748a1218d C#: Generate fresh TRAP ID for local functions 2020-02-13 13:02:46 +01:00
Taus
dcb41a139c Merge pull request #2780 from RasmusWL/python-clean-qltest-options
Python: clean qltest options files
2020-02-13 12:14:17 +01:00
Erik Krogh Kristensen
7c69ee1aff Merge remote-tracking branch 'upstream/master' into CVE74 2020-02-13 11:09:09 +01:00
Erik Krogh Kristensen
d6afd438ba add model for chrome-remote-interface as a ClientRequest 2020-02-13 10:58:07 +01:00
Geoffrey White
4412cea04a Merge pull request #2821 from jbj/ValueNumbering-var-operand
C++: Fix perf of IR value numbering
2020-02-13 09:11:34 +00:00
Rebecca Valentine
acb3c524dd Updates expected results. 2020-02-12 19:46:43 -08:00
Rebecca Valentine
65cba82c7e Fixes bug w/ use of pointsTo 2020-02-12 19:45:55 -08:00
Rebecca Valentine
bfb720c7f3 Adds range and tuple types 2020-02-12 19:36:03 -08:00
Rebecca Valentine
3ce250b2cf Adds some debugging changes. 2020-02-12 19:29:42 -08:00
Robert Marsh
52b164434d C++: remove accidental commit 2020-02-12 15:23:30 -08:00
Robert Marsh
1d5971f8ec C++: accept test changes from extractor update 2020-02-12 13:29:21 -08:00
Tom Hvitved
89527766be Merge pull request #2744 from calumgrant/cs/local-var-parent
C#: Distinguish between local variables extracted in different compil…
2020-02-12 19:41:29 +01:00
Felicity Chapman
39ba3dedc1 Fix build failure by moving control-flow image 2020-02-12 17:16:31 +00:00
Felicity Chapman
8db3651dfd Add draft introductions and create map topic for Python 2020-02-12 16:38:23 +00:00
Jonas Jensen
2abe416670 Merge pull request #2799 from MathiasVP/missing-flow-in-crement
C++: Fix false negatives for postfix crement expressions
2020-02-12 15:03:48 +01:00
Jonas Jensen
033a4c30ea C++: Fix perf of IR value numbering
On some snapshots, notably ffmpeg, the IR `ValueNumbering` recursion
would generate billions of tuples and eventually run out of space.

It turns out it was fairly common for an `Instruction` to get more than
one `ValueNumber` in the base cases for `VariableAddressInstruction` and
`InitializeParameterInstruction`, and it could also happen in an
instruction with more than one operand of the same `OperandTag`. When a
binary operation was applied to an instruction with `m` value numbers
and another instruction with `n` value numbers, the result would get
`m * n` value numbers. This led to doubly-exponential growth in the
number of value numbers in rare cases.

The underlying reason why a `VariableAddressInstruction` could get
multiple value numbers is that it was keyed on the associated
`IRVariable`, and the `IRVariable` is defined in part by the type of its
underlying `Variable` (or other AST element). If the extractor defines a
variable to have multiple types because of linker ambiguity, this leads
to the creation of multiple `IRVariable`s. That should ideally be solved
in `TIRVariable.qll`, but for now I've put a workaround in
`ValueNumberingInternal.qll` instead.

To remove the problem with instructions having multiple operands, the
construction in `Operand.qll` will now filter out any such operand. It
wasn't enough to apply that filter to the `raw` stage, so I've applied
it to all three stages.
2020-02-12 14:38:41 +01:00
Taus
895f2f74ab Merge branch 'master' into python-clean-qltest-options 2020-02-12 13:44:41 +01:00
Taus
12113e947f Merge pull request #2603 from RasmusWL/python-fix-http-source-sink
Python: Make web libs use HttpRequestTaintSource and HttpResponseTaintSink
2020-02-12 13:42:22 +01:00
Mathias Vorreiter Pedersen
c8be67ce0e C++: Generalize PostfixCrementOperation to CrementOperation to fix false negatives reported by Geoffrey 2020-02-12 13:26:10 +01:00
Taus
de45b1a08e Merge pull request #2767 from RasmusWL/python-six-tests
Python: Update expected six results
2020-02-12 12:53:36 +01:00
Erik Krogh Kristensen
d913654604 Merge remote-tracking branch 'upstream/master' into FalsySanitizer 2020-02-12 10:28:48 +01:00