Commit Graph

17948 Commits

Author SHA1 Message Date
Tom Hvitved
0e0f78e448 Merge pull request #1943 from lcartey/csharp/ttransitivecapture-fix
C#: Include runtime target in TTransitiveCaptureCall
2019-09-18 16:36:19 +02:00
Anders Schack-Mulligen
327ade1f34 Merge pull request #1940 from hvitved/dataflow/pathnode-successor
Java/C++/C#: Simplify `PathNode` successor logic
2019-09-18 16:13:39 +02:00
Luke Cartey
b8387bdf23 C#: Fix whitespace issues. 2019-09-18 14:43:43 +01:00
Jonas Jensen
e0d1da3b67 C++: Test for template enum constant CFG 2019-09-18 15:17:24 +02:00
semmle-qlci
cd362d82a5 Merge pull request #1948 from hvitved/csharp/autoformat
Approved by calumgrant
2019-09-18 14:17:02 +01:00
semmle-qlci
57a6c0c20d Merge pull request #1918 from esben-semmle/js/improve-getAResponseDataNode
Approved by asger-semmle
2019-09-18 14:03:45 +01:00
Jonas Jensen
7d8396fa65 C++: Constant template pointer-to-member literals 2019-09-18 14:44:25 +02:00
Jonas Jensen
d644150ead C++: Test for template pointer-to-member CFG 2019-09-18 14:30:18 +02:00
Jonas Jensen
0f2731064d C++: Annotate tellDifferent with template status
This is helpful for turning real-world cases into test cases.
2019-09-18 14:23:52 +02:00
Luke Cartey
af41a0a927 C#: Add autobuilder unit test for multiple csproj files. 2019-09-18 13:12:46 +01:00
Jonas Jensen
c90fd32a78 C++: Pointer-to-member-function is constant 2019-09-18 13:55:56 +02:00
Pavel Avgustinov
eca31908ab HashCons: Make some functionality apparent.
The user knows that an expression functionally determines its
hashCons value, and that an expression functionally determines
its number of children, but this is not provable from the
definitions, and so not usable by the optimiser. By storing
the result of those known-functional calls in a variable,
rather than repeating the call, we enable better join orders.
2019-09-18 12:54:48 +01:00
Pavel Avgustinov
03502863cf Distribute a recursive call into a recursive disjunction.
As the linearity of the disjuncts is different, this enables us to
pick better join orders for each disjunct separately.
2019-09-18 12:54:48 +01:00
Jonas Jensen
55edfe4224 C++: Test for pointer-to-member-function CFG 2019-09-18 13:37:52 +02:00
Tom Hvitved
6318cc9a71 Java: Update expected test output 2019-09-18 13:36:15 +02:00
Tom Hvitved
09e4e7901a C#: Update expected test output 2019-09-18 13:36:15 +02:00
Tom Hvitved
d8074ddfa6 Sync files 2019-09-18 13:36:15 +02:00
Tom Hvitved
48aec33769 Java/C++/C#: Simplify PathNode successor logic 2019-09-18 13:36:14 +02:00
semmle-qlci
479fca9e30 Merge pull request #1946 from xiemaisi/js/top-level-await
Approved by asger-semmle
2019-09-18 12:32:09 +01:00
semmle-qlci
b4b7314757 Merge pull request #1941 from xiemaisi/js/fix-incorrect-suffix-check-performance
Approved by asger-semmle
2019-09-18 12:31:46 +01:00
Max Schaefer
3970ead7ab JavaScript: Add support for rate-limiter-flexible package. 2019-09-18 12:25:33 +01:00
Taus
bbc98513c0 Merge pull request #1942 from RasmusWL/python-modernise-consistent-tuple-size
Python: Modernise the `py/mixed-tuple-returns` query.
2019-09-18 13:19:36 +02:00
Geoffrey White
ae9f35be00 Merge pull request #1947 from jbj/autoformat-followup
C++: Autoformat five files
2019-09-18 12:15:47 +01:00
Luke Cartey
407f6349a3 C#: Fix potential bug in CaptureOutNode.
In theory this bug could associated CaptureOutNodes with the wrong transitively called
callable. However, in practice I could not create a test case that revealed incorrect
behaviour. I've included one such test case in the commit.

I believe that the cause of this is that OutNode::getACall() is not actually used in the
data flow libraries. Instead, DataFlowDispatch::Cached::getAnOutNode is the predicate
which is used to associated OutNode's with DataFlowCall's in practice, and that is always
used in a context that correctly binds the runtime target of the call.
2019-09-18 11:48:29 +01:00
Tom Hvitved
bb83b92c6b C#: Autoformat 2019-09-18 12:02:59 +02:00
Luke Cartey
4ecfe97e7b C#: Adjust line numbers in test case. 2019-09-18 10:55:59 +01:00
Jonas Jensen
571c96bb2f C++: Autoformat five files
These files have come out of autoformat since the big commit that
autoformatted everything.
2019-09-18 11:55:19 +02:00
Jonas Jensen
e7d8fa4251 Merge pull request #1945 from geoffw0/more-tests
CPP: Add a test of ConditionalDeclExpr.
2019-09-18 11:11:16 +02:00
Max Schaefer
9ff5c7007a JavaScript: Add support for top-level await. 2019-09-18 09:56:21 +01:00
AndreiDiaconu1
0e32639af9 Address PR comments 2019-09-18 09:53:14 +01:00
Luke Cartey
29e4fa349a C# autobuilder: Build all solutions at the highest depth
The most common reason for the C# autobuilder to fail is because it
cannot determine a single unique .sln or .proj file to build, instead
reporting multiple sln or proj files at the same shortest depth. This
commit changes this to build all such files, rather than reporting an
error.
2019-09-17 21:27:01 +01:00
Geoffrey White
07e29bb627 CPP: Add a test of ConditionalDeclExpr. 2019-09-17 17:38:54 +01:00
AndreiDiaconu1
f589033364 PR fixes 2019-09-17 16:17:39 +01:00
AndreiDiaconu1
5e0addc776 C# IR: using, checked, unchecked stmts
Added basic support for the using stmt, checked stmt, unchecked stmt
Note that the translations do not use the compiler generated element framework and hence they are just rough approximations. For accuracy, in the future their translation should use it.
2019-09-17 16:16:32 +01:00
Luke Cartey
3c07caefe4 C#: Add test for transitive capture calls. 2019-09-17 15:21:30 +01:00
Luke Cartey
70c2cc595b C#: Add capture test for nested lambdas, commented out
Add a commented out version of the test, and modify the expected files
to contain the same results at new offsets.
2019-09-17 15:13:10 +01:00
Rasmus Wriedt Larsen
631603fa92 Python: Modernise the py/mixed-tuple-returns query. 2019-09-17 16:07:56 +02:00
semmle-qlci
e314a2ce88 Merge pull request #1939 from felicitymay/1.22/fix-blog-links
Approved by jf205
2019-09-17 12:35:48 +01:00
Esben Sparre Andreasen
ac6554b7da Merge branch 'master' into js/improve-getAResponseDataNode 2019-09-17 13:18:41 +02:00
Jonas Jensen
b2df18ab78 C++: Document tests better
This addresses PR comments by @rdmarsh2.
2019-09-17 13:17:25 +02:00
Jonas Jensen
ef601cf78e C++: Annotate changes in struct_init.c test 2019-09-17 13:16:36 +02:00
Jonas Jensen
655f940085 C++: Accept changes in CWE-{119,120} tests
These new results seem better than the previous ones, but the previous
ones are still there. Perhaps the `Buffer.qll` library could use some
adjustment, but this seems like an improvement in isolation.
2019-09-17 13:16:36 +02:00
Jonas Jensen
fd6d06fe6f C++: Data flow through address-of operator (&)
The data flow library conflates pointers and their objects in some
places but not others. For example, a member function call `x.f()` will
cause flow from `x` of type `T` to `this` of type `T*` inside `f`. It
might be ideal to avoid that conflation, but that's not realistic
without using the IR.

We've had good experience in the taint tracking library with conflating
pointers and objects, and it improves results for field flow, so perhaps
it's time to try it out for all data flow.
2019-09-17 13:16:34 +02:00
Asger F
f8eff06aa1 JS: Change note 2019-09-17 11:20:39 +01:00
Luke Cartey
92b94c1a39 C#: Include runtime target in TTransitiveCaptureCall
TTransitiveCaptureCall represents a control flow node that may
transitively call many different callables which capture a variable from
the current scope. Captured variables are represented as synthetic
parameters to the callable, at negative indices. However, each of the
different targets may capture a different subset of variables from the
enclosing scope, so we must include the target along side the CFN in
order to prevent incorrect capture flow.
2019-09-17 03:05:29 -07:00
Tom Hvitved
396a72db5f Merge pull request #1898 from AndreiDiaconu1/ircsharp-collections
C# IR: Object creation refactor and collection initializers
2019-09-17 10:48:07 +02:00
Felicity Chapman
8a27af2016 Update remaining links to blog 2019-09-17 09:30:15 +01:00
Dave Bartolomeo
21f6ab787d C++: Rename predicates in FunctionInputsAndOutputs.qll and add QLDoc 2019-09-16 12:06:06 -07:00
Tom Hvitved
1f927516d8 Merge pull request #1936 from calumgrant/cs/nameof-qualified-namespace
C# extractor: Handle nameof(A.B) where A.B is a qualified namespace
2019-09-16 19:28:48 +02:00
Geoffrey White
3df31e6ccf CPP: Tiny qldoc fixes. 2019-09-16 16:52:48 +01:00