Commit Graph

4207 Commits

Author SHA1 Message Date
Chris Smowton
04c9f60d96 Make up some stats for new expressions, setting canonical constructors as common as records and new expression kinds initially rare 2023-11-30 11:24:00 +00:00
Chris Smowton
3cdb1d29f1 Add upgrade and downgrade scripts for latest dbscheme 2023-11-30 11:24:00 +00:00
Chris Smowton
330a5b8c6c autoformat ql 2023-11-30 11:24:00 +00:00
Chris Smowton
5b734fe937 Pretty-print AST: handle instanceof with record pattern 2023-11-30 11:24:00 +00:00
Chris Smowton
f037030c26 Adapt instanceof CFG and DFG to general patterns 2023-11-30 11:24:00 +00:00
Chris Smowton
20b97af02f Implement dataflow for record patterns
Strategy: there is now a regular flow step from an instance-of LHS / switch expr to the pattern, 0 or more read steps corresponding to record pattern destructors, and then finally a normal SSA def/use step connecting the binding patterns to their first uses.
2023-11-30 11:24:00 +00:00
Chris Smowton
05addde957 Adapt control-flow graph to record patterns 2023-11-30 11:24:00 +00:00
Chris Smowton
556feb31f0 Autoformat 2023-11-30 11:24:00 +00:00
Chris Smowton
936c0206ea Adapt ancillary analyses to record patterns 2023-11-30 11:23:59 +00:00
Chris Smowton
daccd04087 Basic extraction of record patterns 2023-11-30 11:23:59 +00:00
Chris Smowton
293cc67494 Fix stringifying record fields 2023-11-30 11:23:59 +00:00
Chris Smowton
144218e2f7 Implement switch CFG when there are mixed constant and pattern cases 2023-11-30 11:23:59 +00:00
Chris Smowton
54a89d6fef Handle 'case null, default:' 2023-11-30 11:23:59 +00:00
Chris Smowton
9a450b09be Account for pattern-cases in more places 2023-11-30 11:23:59 +00:00
Chris Smowton
2b16121638 CFG: Support guarded patterns 2023-11-30 11:23:59 +00:00
Chris Smowton
ba0f3cf718 Add basic support for case guards 2023-11-30 11:23:59 +00:00
Chris Smowton
6b9aed21df Nullness library: recognise switches with null checks 2023-11-30 11:23:58 +00:00
Chris Smowton
30c5885966 Fix constant cases relating to enum types 2023-11-30 11:23:58 +00:00
Chris Smowton
b21aaa75bc Type-flow: treat pattern-switch on an array index similar to instanceof 2023-11-30 11:23:58 +00:00
Chris Smowton
7dd4030f51 Pattern cases: support type-flow 2023-11-30 11:23:58 +00:00
Chris Smowton
a06ac42512 PrintAst: report pattern-cases similar to pattern-instanceof 2023-11-30 11:23:58 +00:00
Chris Smowton
b6622d2f5b usesType: support pattern cases 2023-11-30 11:23:58 +00:00
Chris Smowton
0f434e7f08 Add test for dataflow vs. pattern-switch 2023-11-30 11:23:58 +00:00
Chris Smowton
6c990c2cf6 Add pattern-case support and generally debug switch CFGs
These were reasonably broken beforehand, due to not taking switch rules into account in enough places, and confusing the expression/statement switch rule distinction with the distinction between switch statements and expressions.

(For example, `switch(x) { 1 -> System.out.println("Hello world") ... }` is a statement, but has a rule expression).
2023-11-30 11:23:58 +00:00
Chris Smowton
f4b45fa511 Support switch cases with binding patterns 2023-11-30 11:23:58 +00:00
Jami Cogswell
7e869b9cd1 Java: add change note 2023-11-29 16:48:57 -05:00
Jami Cogswell
ba3548b317 Java: switch to createRelative sink and add UrlPathHelper sources 2023-11-29 14:46:28 -05:00
Jami Cogswell
efa5ab18c1 Java: add taint steps for getResource sink 2023-11-29 14:46:27 -05:00
Eric Bickle
aab7ff919e Java: Improve Gson parse, get, and stream models 2023-11-27 12:26:28 -08:00
Tom Hvitved
1a6886cf99 SSA: Add locations to ease debugging 2023-11-22 08:37:02 +01:00
github-actions[bot]
bad499e360 Post-release preparation for codeql-cli-2.15.3 2023-11-17 14:35:41 +00:00
github-actions[bot]
6ec9b95072 Release preparation for version 2.15.3 2023-11-16 13:07:16 +00:00
Anders Schack-Mulligen
bf6cfd3bef Rangeanalysis: Simplify api. 2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
30aefabb2a Rangeanalysis: Rename predicate. 2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
66b03bfb12 Java: Remove unused import 2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
3a73faf061 Rangeanalysis: Remove unused getAlternateType predicates. 2023-11-13 10:35:43 +01:00
Anders Schack-Mulligen
657c29f409 Java/C++: Share valueFlowStep. 2023-11-09 20:24:28 +01:00
Anders Schack-Mulligen
b8e7e1d15e Java/C++: Share ssaUpdateStep. 2023-11-09 16:02:44 +01:00
Anders Schack-Mulligen
daffae020b Java/C++: Share eqFlowCond. 2023-11-09 16:00:46 +01:00
Chris Smowton
c060827a5d Merge pull request #14699 from smowton/smowton/feature/jdk21-sequenced-collections-models
Java: model JDK21 SequencedCollection, Set and Map
2023-11-09 14:15:08 +00:00
Anders Schack-Mulligen
f9132c5ff0 Java: Duplicate a bit more code to postpone Java-C# cleanup. 2023-11-08 14:04:34 +01:00
Anders Schack-Mulligen
1f4cd74a1c Java/C++: Move SsaReadPosition to shared qlpack. 2023-11-08 12:11:17 +01:00
Tony Torralba
5442cdb49c Merge pull request #14610 from atorralba/atorralba/java/jms-deserialization
Java: Add JMS sink to java/unsafe-deserialization
2023-11-08 09:10:20 +01:00
Anders Schack-Mulligen
45ae4ed362 Merge pull request #14711 from aschackmull/shared/rangeutil-share2
Java/C++/RangeAnalysis: Move a couple of utility predicates to shared qlpack
2023-11-08 08:33:12 +01:00
Geoffrey White
b63294764b Merge pull request #14705 from geoffw0/qhelplink
Fix a dead ReDoS link in docs
2023-11-07 17:40:19 +00:00
Anders Schack-Mulligen
12cba7909b Java/C++: Move range util guard-controls predicates to shared pack. 2023-11-07 15:14:34 +01:00
Anders Schack-Mulligen
f2ca52d951 Java/C++: Move range util backEdge predicate to shared pack. 2023-11-07 15:14:34 +01:00
Tom Hvitved
af7b295c59 Address review comments 2023-11-07 13:01:19 +01:00
Geoffrey White
e8a466a02c Update dead link. 2023-11-07 09:26:07 +00:00
Chris Smowton
24b4b05be8 Add models for new Collections methods 2023-11-06 16:44:40 +00:00