semmle-qlci
87c5872bc5
Merge pull request #903 from hvitved/csharp/successor-type-qldoc
...
Approved by calumgrant
2019-02-07 19:38:58 +00:00
Tom Hvitved
0a39e8c34f
Merge pull request #905 from calumgrant/cs/trivial-cil-properties
...
C#: Use CIL analysis when determining trivial properties
2019-02-07 20:38:06 +01:00
Dave Bartolomeo
f460d2c1c3
C++: Fix another test expectation
2019-02-07 09:56:56 -08:00
Dave Bartolomeo
f2a0a86c6d
C++: Update captures test for closure fields extractor fix
2019-02-07 09:56:56 -08:00
Robert Marsh
3c638b5966
C++: add edge-based predicates to IRGuards
...
These predicates currently take a pair of `IRBlock`s - as it stands, at
most one edge can exist from one `IRBlock` to a given other `IRBlock`.
We may need to revisit that assumption and create an `IREdge` IPA type
at some future date
2019-02-07 09:38:54 -08:00
Robert Marsh
b85b7744ef
C++: refactor branch instruction handling
2019-02-07 09:36:34 -08:00
Robert Marsh
92ba0919cc
Merge pull request #899 from Semmle/rdmarsh/cpp/IRRename-rebased
...
C++: Rename a few problematic IR APIs
2019-02-07 09:28:59 -08:00
Asger F
9dae08bbcf
JS: fix javadoc
2019-02-07 13:53:29 +00:00
Asger F
c2321045f2
TS: fix import of q.d.ts in test case
2019-02-07 12:37:54 +00:00
calum
65b3771f85
C#: Add changenote.
2019-02-07 12:10:18 +00:00
calum
8afbd2d897
C#: Extend TrivialProperty to also include CIL::TrivialProperty
2019-02-07 12:05:42 +00:00
Asger F
6cc30fe732
JS: add stats for new relations
2019-02-07 12:00:53 +00:00
Asger F
e4b230ba60
Revert "Merge pull request #897 from Semmle/revert-817-closure-modules"
...
This reverts commit 95185345fd , reversing
changes made to b8be66ec48 .
2019-02-07 11:58:38 +00:00
Tom Hvitved
ba575db93b
C#: Add QL doc to SuccessorType.qll
2019-02-07 12:09:09 +01:00
Calum Grant
383e82a3f3
Merge pull request #886 from hvitved/csharp/cfg/restructure
...
C#: Split up `ControlFlowGraph.qll` into multiple files
2019-02-07 11:06:19 +00:00
Tom Hvitved
5f027e1761
Merge pull request #860 from calumgrant/cs/library-flow
...
C#: Refactor LibraryTypeDataFlow
2019-02-07 11:52:05 +01:00
Calum Grant
4274bb136f
Merge pull request #892 from hvitved/csharp/get-arg-for-param-bad-magic
...
C#: Prevent bad magic in `getArgumentForParameter()`
2019-02-07 10:50:21 +00:00
Calum Grant
73d56e1bdb
Merge pull request #881 from hvitved/csharp/remove-get-url
...
C#: Remove `getUrl()` predicate
2019-02-07 10:47:56 +00:00
Esben Sparre Andreasen
5ad83360be
JS: move default parameter values to the DefUse graph
2019-02-07 11:41:36 +01:00
Esben Sparre Andreasen
65530c5edf
JS: add test for js/useless-comparison-test
2019-02-07 11:41:36 +01:00
Esben Sparre Andreasen
55fd948c24
JS: add test for js/trivial-conditional
2019-02-07 11:41:36 +01:00
Esben Sparre Andreasen
f956e570cb
JS: support default destructuring values in the dataflow graph
2019-02-07 11:41:36 +01:00
Esben Sparre Andreasen
687b7f0a7f
JS: exclude direct flow from the RHS in a destructuring assignment
2019-02-07 11:41:36 +01:00
Esben Sparre Andreasen
f333419bb4
JS: add defuse+dataflow tests for destructuring and default values
2019-02-07 11:24:46 +01:00
Jonas Jensen
ce31b14f21
C++: Add a queries.xml to the test dir
...
This makes compilation caching work with `*.ql` files in the test dir
when using `odasa qltest --optimize`.
2019-02-07 11:04:20 +01:00
Max Schaefer
447a1db616
JavaScript: Assign FileAccessToHttp and HttpToFileAccess a precision.
...
They will now be run on LGTM, but their results won't be displayed by default.
2019-02-07 09:48:05 +00:00
Tom Hvitved
23e63e983c
C#: Improve join order in conditionalAssign()
...
Fixes a bad join-order in `Guards::Internal::conditionalAssign#ffff#antijoin_rhs#1`:
```
[2019-01-25 14:12:03] (377s) Starting to evaluate predicate Guards::Internal::conditionalAssign#ffff#antijoin_rhs#1
[2019-01-25 14:20:41] (895s) Tuple counts:
9302551 ~1% {7} r1 = JOIN ControlFlowGraph::ControlFlow::Internal::PreSsa::Definition::getAPhiInput_dispred#ff WITH Guards::Internal::conditionalAssign#ffff#shared#1 ON ControlFlowGraph::ControlFlow::Internal::PreSsa::Definition::getAPhiInput_dispred#ff.<0>=Guards::Internal::conditionalAssign#ffff#shared#1.<0> OUTPUT FIELDS {ControlFlowGraph::ControlFlow::Internal::PreSsa::Definition::getAPhiInput_dispred#ff.<1>,Guards::Internal::conditionalAssign#ffff#shared#1.<1>,Guards::Internal::conditionalAssign#ffff#shared#1.<2>,Guards::Internal::conditionalAssign#ffff#shared#1.<0>,Guards::Internal::conditionalAssign#ffff#shared#1.<3>,Guards::Internal::conditionalAssign#ffff#shared#1.<4>,Guards::Internal::conditionalAssign#ffff#shared#1.<5>}
9302551 ~7% {8} r2 = JOIN r1 WITH ControlFlowGraph::ControlFlow::Internal::PreSsa::Definition::getBasicBlock_dispred#ff ON r1.<0>=ControlFlowGraph::ControlFlow::Internal::PreSsa::Definition::getBasicBlock_dispred#ff.<0> OUTPUT FIELDS {r1.<1>,ControlFlowGraph::ControlFlow::Internal::PreSsa::Definition::getBasicBlock_dispred#ff.<1>,r1.<2>,r1.<3>,r1.<4>,r1.<5>,r1.<6>,r1.<0>}
1223774650 ~0% {8} r3 = JOIN r2 WITH Guards::Internal::Guard::preControlsDirect_dispred#fff ON r2.<0>=Guards::Internal::Guard::preControlsDirect_dispred#fff.<0> AND r2.<1>=Guards::Internal::Guard::preControlsDirect_dispred#fff.<1> OUTPUT FIELDS {r2.<6>,Guards::Internal::Guard::preControlsDirect_dispred#fff.<2>,r2.<0>,r2.<2>,r2.<3>,r2.<4>,r2.<5>,r2.<7>}
80626 ~0% {7} r4 = JOIN r3 WITH Guards::AbstractValue::getDualValue_dispred#ff ON r3.<0>=Guards::AbstractValue::getDualValue_dispred#ff.<0> AND r3.<1>=Guards::AbstractValue::getDualValue_dispred#ff.<1> OUTPUT FIELDS {r3.<2>,r3.<3>,r3.<4>,r3.<5>,r3.<6>,r3.<0>,r3.<7>}
9293564 ~0% {7} r5 = Guards::Internal::conditionalAssign#ffff#shared#2 AND NOT Guards::Internal::conditionalAssign#ffff#antijoin_rhs(Guards::Internal::conditionalAssign#ffff#shared#2.<0>,Guards::Internal::conditionalAssign#ffff#shared#2.<1>,Guards::Internal::conditionalAssign#ffff#shared#2.<2>,Guards::Internal::conditionalAssign#ffff#shared#2.<3>,Guards::Internal::conditionalAssign#ffff#shared#2.<4>,Guards::Internal::conditionalAssign#ffff#shared#2.<5>,Guards::Internal::conditionalAssign#ffff#shared#2.<6>)
9293564 ~1% {7} r6 = SCAN r5 OUTPUT FIELDS {r5.<6>,r5.<0>,r5.<1>,r5.<2>,r5.<3>,r5.<4>,r5.<5>}
9293564 ~2% {8} r7 = JOIN r6 WITH ControlFlowGraph::ControlFlow::Internal::PreSsa::Definition::getBasicBlock_dispred#ff ON r6.<0>=ControlFlowGraph::ControlFlow::Internal::PreSsa::Definition::getBasicBlock_dispred#ff.<0> OUTPUT FIELDS {ControlFlowGraph::ControlFlow::Internal::PreSsa::Definition::getBasicBlock_dispred#ff.<1>,r6.<2>,r6.<1>,r6.<3>,r6.<4>,r6.<5>,r6.<6>,r6.<0>}
1940 ~2% {7} r8 = JOIN r7 WITH ControlFlowGraph::ControlFlow::Internal::PreBasicBlocks::PreBasicBlock::dominates_dispred#ff ON r7.<0>=ControlFlowGraph::ControlFlow::Internal::PreBasicBlocks::PreBasicBlock::dominates_dispred#ff.<0> AND r7.<1>=ControlFlowGraph::ControlFlow::Internal::PreBasicBlocks::PreBasicBlock::dominates_dispred#ff.<1> OUTPUT FIELDS {r7.<2>,r7.<1>,r7.<3>,r7.<4>,r7.<5>,r7.<6>,r7.<7>}
82566 ~0% {7} r9 = r4 \/ r8
return r9
```
2019-02-07 10:35:31 +01:00
Jonas Jensen
47ad280e34
Merge pull request #842 from geoffw0/gets
...
CPP: Clean up PotentialBufferOverflow.ql, PotentiallyDangerousFunction.ql
2019-02-07 09:27:00 +01:00
semmle-qlci
b4b37b3a7b
Merge pull request #880 from esben-semmle/js/better-alert-message-1
...
Approved by xiemaisi
2019-02-07 08:01:21 +00:00
Max Schaefer
812cba0fe3
Merge pull request #828 from esben-semmle/js/vue-support-1
...
JS: basic Vue support
2019-02-07 08:00:17 +00:00
Dave Bartolomeo
f6d392089e
C++: Replace getAnOperand().(XXXOperand) with getXXXOperand()
2019-02-06 22:44:53 -08:00
Dave Bartolomeo
4c23ad100e
C++: Rename a few IR APIs
...
There are a few IR APIs that we've found to be confusingly named. This PR renames them to be more consistent within the IR and with the AST API:
`Instruction.getFunction` -> `Instruction.getEnclosingFunction`: This was especially confusing when you'd call `FunctionAddressInstruction.getFunction` to get the function whose address was taken, and wound up with the enclosing function instead.
`Instruction.getXXXOperand` -> `Instruction.getXXX`. Now that `Operand` is an exposed type, we want a way to get a specific `Operand` of an `Instruction`, but more often we want to get the definition instruction of that operand. Now, the pattern is that `getXXXOperand` returns the `Operand`, and `getXXX` is equivalent to `getXXXOperand().getDefinitionInstruction()`.
`Operand.getInstruction` -> `Operand.getUseInstruction`: More consistent with the existing `Operand.getDefinitionInstruction` predicate.
2019-02-06 22:43:49 -08:00
Robert Marsh
97c5b8ee44
Merge pull request #882 from jbj/ir-ConstantAnalysis-perf
...
C++: Speed up IR ConstantAnalysis
2019-02-06 22:29:09 -08:00
Dave Bartolomeo
1f873d0c9c
Merge pull request #890 from aeyerstaylor/more-field-overriding
...
C++: Use more field overriding in IR construction
2019-02-06 17:04:43 -08:00
Max Schaefer
95185345fd
Merge pull request #897 from Semmle/revert-817-closure-modules
...
Revert "JS: Add support for Closure modules"
2019-02-06 18:14:50 +00:00
Asger F
e46e2b2515
Revert "JS: Add support for Closure modules"
2019-02-06 17:30:45 +00:00
calum
ce7e9901cc
C#: Address review comments.
2019-02-06 17:15:43 +00:00
semmle-qlci
b8be66ec48
Merge pull request #887 from asger-semmle/jsdoc-accessors
...
Approved by xiemaisi
2019-02-06 16:30:48 +00:00
semmle-qlci
b13c11017c
Merge pull request #885 from asger-semmle/async-waterfall
...
Approved by xiemaisi
2019-02-06 16:30:17 +00:00
Esben Sparre Andreasen
235625d03a
Merge branch 'master' into js/vue-support-1
2019-02-06 16:57:16 +01:00
semmle-qlci
09825f28ed
Merge pull request #817 from asger-semmle/closure-modules
...
Approved by esben-semmle, xiemaisi
2019-02-06 15:51:53 +00:00
Tom Hvitved
8812f26517
C#: Address review comments
2019-02-06 13:17:47 +01:00
Tom Hvitved
c3378c44a1
C#: Prevent bad magic in getArgumentForParameter()
2019-02-06 13:09:56 +01:00
Calum Grant
dd75e5bce3
Merge pull request #877 from hvitved/csharp/matches-handle
...
C#: Use `matchesHandle()` instead of `getLabel()`
2019-02-06 11:02:09 +00:00
semmle-qlci
a2691b32b5
Merge pull request #851 from xiemaisi/js/post-message-star
...
Approved by esben-semmle
2019-02-06 09:57:04 +00:00
Asger F
abb7e63697
JS: update GlobalVariableRef.expected
2019-02-06 09:16:30 +00:00
Asger F
44939263e4
JS: update TRAP files
2019-02-06 09:12:16 +00:00
Asger F
c52ed9152f
JS: handle .mjs files correctly
2019-02-06 09:12:10 +00:00
Esben Sparre Andreasen
fb19032038
JS: change notes for Vue support
2019-02-06 09:38:00 +01:00
Esben Sparre Andreasen
f15af70c02
JS: use HTML::ScriptElement::getScript in Vue
2019-02-06 09:38:00 +01:00