Commit Graph

2486 Commits

Author SHA1 Message Date
Geoffrey White
63003894c3 CPP: Fixes. 2019-10-22 14:51:17 +01:00
Henning Makholm
fd768a1af6 Add some new-style suite definitions 2019-10-22 15:51:00 +02:00
Geoffrey White
faf1a2acbe CPP: Fix typos. 2019-10-22 09:56:50 +01:00
Geoffrey White
31dd3cae84 CPP: Autoformat. 2019-10-22 09:55:48 +01:00
Raul Garcia (MSFT)
cb8dcf7db2 Publishing queries to the OSS Semmle repository 2019-10-22 09:55:39 +01:00
Ziemowit Laski
9bc4c2d9a5 [CPP-434] Ctrl + Shift + F. 2019-10-21 18:40:20 -07:00
Dave Bartolomeo
63038896f4 C++: Accept test output after changes 2019-10-21 17:06:32 -07:00
Ziemowit Laski
2292518933 [CPP-434] Change query so it flags overflows that were cast to unsigned. 2019-10-21 17:04:46 -07:00
Dave Bartolomeo
2cd694756b C++: Remove mistakenly-added file 2019-10-21 15:58:38 -07:00
Dave Bartolomeo
1c8e275b40 C++/C#: Autoformat all the things 2019-10-21 15:00:05 -07:00
Dave Bartolomeo
7241c1aae6 C++/C#: More sanity checks for IRType 2019-10-21 14:22:46 -07:00
Dave Bartolomeo
958754bed8 C++: Use max to handle mixed 32/64-bit extraction 2019-10-21 11:56:12 -07:00
Dave Bartolomeo
5776077bf6 C++: Add comment about enum signedness 2019-10-21 11:37:18 -07:00
Dave Bartolomeo
debb662b8c C++: Reformat comment 2019-10-21 10:55:59 -07:00
Dave Bartolomeo
71a6b5dffe C++/C#: Fix some duplicate IRType problems, and add a sanity test 2019-10-21 10:46:30 -07:00
Jonas Jensen
defe99503d Merge pull request #2113 from raulgarciamsft/users/raulga/boost
Users/raulga/boost
2019-10-20 13:14:44 +02:00
Dave Bartolomeo
f871c72660 C++: Fix PR feedback 2019-10-18 12:54:03 -07:00
Dave Bartolomeo
8ec15933f5 C++/C#: Blob -> Opaque 2019-10-18 12:51:25 -07:00
Robert Marsh
e57fef093b C++: accept syntax-zoo changes 2019-10-18 10:08:53 -07:00
Geoffrey White
446763d331 CPP: Fix typo. 2019-10-18 14:47:21 +01:00
Geoffrey White
411f74db70 CPP: Delete comment. 2019-10-18 14:44:38 +01:00
Geoffrey White
5a97a16945 CPP: Autoformat. 2019-10-18 09:46:04 +01:00
Jonas Jensen
dcc446660e Merge pull request #2149 from rdmarsh2/rdmarsh/cpp/ir-side-effect-primary
C++: Add getPrimaryInstruction to specific side effects
2019-10-18 10:31:01 +02:00
Ziemowit Laski
6772fa1352 [CPP-434] Reformat QHelp. 2019-10-17 17:21:14 -07:00
Ziemowit Laski
70441edacf [CPP-434] Additional test case; improve QHelp by including themes from the BadAdditionOverflowCheck QHelp. 2019-10-17 16:41:17 -07:00
Robert Marsh
5451c394a2 C++/C#: autoformat 2019-10-17 12:20:36 -07:00
Robert Marsh
b29f88450b C++: buffer read side effects on unmodeled funcs 2019-10-17 12:10:23 -07:00
Matthew Gretton-Dann
4e345fb921 C++: Add upgrade script 2019-10-17 15:37:34 +01:00
Matthew Gretton-Dann
bc0d73b86e C++: Remove unique diagniostic key on diagnostic_for. 2019-10-17 15:34:51 +01:00
Jonas Jensen
9bc7ce1fac Merge pull request #2141 from geoffw0/newtest
CPP: AV Rule 114 test cases
2019-10-17 09:28:10 +02:00
Robert Marsh
30d7238921 C++: fix missing getPrimaryInstruction 2019-10-16 17:05:37 -07:00
Robert Marsh
fffe3c2432 C++: add sanity test for side effect primaries 2019-10-16 16:53:55 -07:00
Dave Bartolomeo
6e61b1dcd0 C++: Fix up after merge from master
The one interesting piece that needed to be fixed up was the type of an `Indirect[Read|Write]SideEffect` operand/result. If the parameter type is a pointer or reference to an incomplete type, we need to set the type of the side effect memory access to `Unknown`, because we don't model incomplete types in the IR type system.

I also added minimal support for `__assume` (generated as a `NoOp`), because lack of `__assume` support got in the way of debugging the other issue above.
2019-10-16 15:55:56 -07:00
Ziemowit Laski
fb625c12ef [CPP-434] Move SignedOverflowCheck test to BadAdditionOverflowCheck directory; add additional tests. 2019-10-16 14:31:11 -07:00
Dave Bartolomeo
167d2289c4 Merge from master 2019-10-16 10:10:10 -07:00
Pavel Avgustinov
7fa6c54731 Merge pull request #2119 from hmakholm/pr/qlpacks
Add qlpack.json files
2019-10-16 14:27:10 +01:00
Geoffrey White
6f96d1759f Merge pull request #2077 from jbj/cfg-enable-pr
C++: enable the QL-based CFG code
2019-10-16 14:06:22 +01:00
Geoffrey White
5f1fdd08a7 CPP: Post-2115. 2019-10-16 13:51:06 +01:00
Geoffrey White
096af3c3f3 CPP: Add test cases involving __builtin_complex. 2019-10-16 13:46:11 +01:00
Geoffrey White
33ae7ee802 Merge pull request #2130 from jbj/cfg-pos-int
C++: Implement Pos and Spec as int, not newtype
2019-10-16 09:56:14 +01:00
Jonas Jensen
bca1be0601 Merge pull request #2135 from zlaski-semmle/zlaski/memset-model
[zlaski/memset-model] Add side effect modeling to Memset.
2019-10-16 08:49:24 +02:00
Ziemowit Laski
fcc1938143 [zlaski/memset-model] Ctrl+Shift+F. 2019-10-15 15:03:58 -07:00
Ziemowit Laski
2ca52a4124 [zlaski/memset-model] Add side effect modeling to Memset. 2019-10-15 14:43:39 -07:00
Jonas Jensen
4c15ea581a C++: Autoformat CFG.qll 2019-10-15 19:32:55 +02:00
Jonas Jensen
a9984e9d8b C++: Implement Pos and Spec as int, not newtype
This change gives a slight performance improvement and makes the QL code
shorter. It introduces some magic numbers in the code, but those are
confined to the `Pos` and `Spec` classes.

We get a speed-up because the evaluator has built-in support for integer
literals in the `OUTPUT` of `JOIN` operations, whereas `newtype`s have
to be explicitly joined on. As a result, a predicate like
`CFG::straightLineSparse#ffff` drops from 262 pipeline nodes to 242.

I measured performance on https://github.com/jluttine/suitesparse, which
is one of the projects that had the biggest slowdown when enabling the
QL CFG on lgtm.com. I took two measurements before this change and two
after. The `CFG.qll` stage took 117s and 112s before, and it took 106s
and 107s after.
2019-10-15 16:22:37 +02:00
Matthew Gretton-Dann
692c29d095 C++: Test fun_decl for INVALID_KEYs 2019-10-15 14:47:32 +01:00
Matthew Gretton-Dann
0f6d64e27e C++: Update schema stats 2019-10-15 14:42:57 +01:00
Matthew Gretton-Dann
e4174ff610 C++: Add schema upgrade script 2019-10-15 14:42:57 +01:00
Matthew Gretton-Dann
f98d20c33a C++: Update var_decls, fun_decls keysets. 2019-10-15 14:42:57 +01:00
Tom Hvitved
cae7f9d805 Merge pull request #2099 from aschackmull/java/callcontext-bool-pruning
Java: Data-flow pruning based on call contexts.
2019-10-15 09:36:36 +02:00