Commit Graph

2829 Commits

Author SHA1 Message Date
Chuan-kai Lin
4df1c12876 Minor CHANGELOG updates 2025-08-04 09:09:25 -07:00
github-actions[bot]
fd82aeb1f8 Release preparation for version 2.22.3 2025-08-04 15:47:57 +00:00
Tom Hvitved
65bf76e3ed Merge pull request #20161 from hvitved/rust/fix-bad-joins
Rust: Fix two bad joins introduced by magic
2025-08-04 17:32:54 +02:00
Geoffrey White
8b5603cf71 Merge pull request #20160 from geoffw0/exec
Rust: Add type inference test cases resembling missing call targets in SQLx.
2025-08-04 16:03:12 +01:00
Tom Hvitved
125a4b9b10 Rust: Fix two bad joins introduced by magic
```
Evaluated relational algebra for predicate TypeInference::closureParameterPath/2#9d0bf423#bbf@ba08cc1s with tuple counts:
           565067    ~172652%    {2} r1 = JOIN `Callable::Callable.getParam/1#dispred#ce0254b3_01#count_range` WITH `Callable::Generated::Callable.getNumberOfParams/0#dispred#abb45996` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
            24684     ~11784%    {3}    | JOIN WITH Type::TTupleTypeParameter#5ca17706 ON FIRST 2 OUTPUT Rhs.2, Lhs.1, Lhs.0
             2970      ~1391%    {3}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Rhs.1
              664       ~242%    {4}    | JOIN WITH `Stdlib::FnOnceTrait.getTypeParam/0#dispred#93f20bbc` CARTESIAN PRODUCT OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2
              303        ~49%    {4}    | JOIN WITH Type::TDynTraitTypeParameter#e16268df ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3
              198         ~0%    {8}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, _, _, Rhs.1, Lhs.3, _, _
                                 {4}    | REWRITE WITH Out.2 := (In.4 ++ In.5), Tmp.3 := (In.4 ++ In.5), Tmp.6 := "[0-9]+", Tmp.7 := "", Out.3 := regexpReplaceAll(Tmp.3,Tmp.6,Tmp.7) KEEPING 4
              198         ~0%    {6}    | SCAN OUTPUT In.0, In.1, In.2, _, In.3, _
                                 {4}    | REWRITE WITH Out.3 := length(In.4), Tmp.5 := 10, TEST Out.3 <= Tmp.5 KEEPING 4
              198         ~0%    {3}    | SCAN OUTPUT In.1, In.0, In.2

           877984   ~1444714%    {1} r2 = SCAN `CallExprBase::CallExprBase.getArg/1#dispred#d775f13d` OUTPUT In.1
           299888     ~83707%    {3}    | JOIN WITH Type::TTupleTypeParameter#5ca17706_102#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Rhs.2
        515462762     ~59140%    {4}    | JOIN WITH `CallExprBase::Generated::CallExprBase.getNumberOfArgs/0#dispred#0975fe12_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0, Lhs.2
          9429188  ~25728933%    {3}    | JOIN WITH TypeInference::InvokedClosureExpr#24e5dacb_1#join_rhs ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.2
            53669    ~142315%    {3}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Rhs.1
             4003     ~10522%    {4}    | JOIN WITH `Stdlib::FnOnceTrait.getTypeParam/0#dispred#93f20bbc` CARTESIAN PRODUCT OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2
              370       ~910%    {4}    | JOIN WITH Type::TDynTraitTypeParameter#e16268df ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3
              148       ~293%    {8}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, _, _, Rhs.1, Lhs.3, _, _
                                 {4}    | REWRITE WITH Out.2 := (In.4 ++ In.5), Tmp.3 := (In.4 ++ In.5), Tmp.6 := "[0-9]+", Tmp.7 := "", Out.3 := regexpReplaceAll(Tmp.3,Tmp.6,Tmp.7) KEEPING 4
              148       ~316%    {6}    | SCAN OUTPUT In.0, In.1, In.2, _, In.3, _
                                 {4}    | REWRITE WITH Out.3 := length(In.4), Tmp.5 := 10, TEST Out.3 <= Tmp.5 KEEPING 4
              148       ~293%    {3}    | SCAN OUTPUT In.1, In.0, In.2

              346        ~75%    {3} r3 = r1 UNION r2
                                 return r3
```

and

```
Evaluated relational algebra for predicate TypeInference::fnParameterPath/2#4dea2880#bbf@d56000vi with tuple counts:
                1         ~0%    {1} r1 = SCAN `Stdlib::FnOnceTrait.getTypeParam/0#dispred#93f20bbc` OUTPUT In.1
                1         ~0%    {1}    | JOIN WITH Type::TTypeParamTypeParameter#868c69a5 ON FIRST 1 OUTPUT Rhs.1
                1         ~0%    {1}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Rhs.1
           877984   ~1350201%    {2}    | JOIN WITH `ArgList::Generated::ArgList.getArg/1#dispred#b07adc80` CARTESIAN PRODUCT OUTPUT Rhs.1, Lhs.0
           321252     ~90755%    {4}    | JOIN WITH Type::TTupleTypeParameter#5ca17706_102#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0, Rhs.2
        553043191     ~65412%    {5}    | JOIN WITH `CallExprBase::Generated::CallExprBase.getNumberOfArgs/0#dispred#0975fe12_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.0, Lhs.3
         10089088  ~26772053%    {4}    | JOIN WITH TypeInference::InvokedClosureExpr#24e5dacb_1#join_rhs ON FIRST 1 OUTPUT Lhs.4, Lhs.1, Lhs.2, Lhs.3
            57729    ~157423%    {8}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Lhs.2, Lhs.3, _, _, Lhs.1, Rhs.1, _, _
                                 {4}    | REWRITE WITH Out.2 := (In.4 ++ In.5), Tmp.3 := (In.4 ++ In.5), Tmp.6 := "[0-9]+", Tmp.7 := "", Out.3 := regexpReplaceAll(Tmp.3,Tmp.6,Tmp.7) KEEPING 4
            57729    ~157423%    {6}    | SCAN OUTPUT In.0, In.1, In.2, _, In.3, _
                                 {4}    | REWRITE WITH Out.3 := length(In.4), Tmp.5 := 10, TEST Out.3 <= Tmp.5 KEEPING 4
            57729    ~157423%    {3}    | SCAN OUTPUT In.1, In.0, In.2
                                 return r1
```
2025-08-04 14:22:50 +02:00
Geoffrey White
2ec6dafd18 Rust: Add a type inference test case resembling missing call targets in SQLx. 2025-08-04 10:21:59 +01:00
Simon Friis Vindum
abc58ac8b3 Rust: Add metric and debug predicates for type that reach the length limit 2025-07-31 14:20:32 +02:00
Simon Friis Vindum
3bc1d47738 Merge pull request #20130 from paldepind/rust/type-inference-fn
Rust: Implement type inference for closures and calls to closures
2025-07-30 13:13:57 +02:00
Anders Schack-Mulligen
5ca9c090a8 Merge pull request #20132 from aschackmull/ssa/guardvalue
SSA: Update data flow integration and BarrierGuard interface to use GuardValue.
2025-07-30 12:23:17 +02:00
Simon Friis Vindum
5b152cfdec Rust: Fix typo in change note
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2025-07-29 18:38:14 +02:00
Simon Friis Vindum
5540b9df71 Merge branch 'main' into rust/type-inference-fn 2025-07-29 16:43:17 +02:00
Anders Schack-Mulligen
3b8234ecec SSA: Update data flow integration and BarrierGuard interface to use GuardValue. 2025-07-28 11:29:12 +02:00
Simon Friis Vindum
92bce4e432 Rust: Split getFunctionReturnPos into two predicates 2025-07-28 10:45:59 +02:00
Simon Friis Vindum
9761580b7e Merge branch 'main' into rust/type-inference-assoc-type-tp 2025-07-28 10:39:00 +02:00
Simon Friis Vindum
8e474c946e Rust: Add change note for type inference for closures 2025-07-28 10:27:33 +02:00
Simon Friis Vindum
2c758a9842 Rust: Add type inference for closures and calls to first-class functions 2025-07-27 21:28:10 +02:00
Simon Friis Vindum
8c6c28d61f Rust: Add type inference tests for closures 2025-07-27 21:16:30 +02:00
Simon Friis Vindum
13d9d8ad3f Merge pull request #20122 from paldepind/rust/type-inference-dyn-assoc
Rust: Fix type inference for trait objects for traits with associated types
2025-07-26 12:40:09 +02:00
Geoffrey White
4b947db0f8 Merge pull request #19804 from geoffw0/dotdot
Rust: Update DotDotCheck to use getCanonicalPath
2025-07-25 15:50:29 +01:00
Simon Friis Vindum
b2ee625268 Rust: Expand doc and make predicate private 2025-07-25 15:22:10 +02:00
Geoffrey White
478f39a967 Rust: Accept (trivial) test changes. 2025-07-25 14:18:34 +01:00
Geoffrey White
2192ed04be Rust: Add clone MaD trait model. 2025-07-25 09:43:34 +01:00
Geoffrey White
4140579dd6 Rust: Remove QL model for clone. 2025-07-25 08:17:52 +01:00
Geoffrey White
7f659804e4 Rust: Fix the canonical path. 2025-07-24 17:24:29 +01:00
Geoffrey White
cfe25593ee Merge branch 'main' into dotdot 2025-07-24 16:32:36 +01:00
Simon Friis Vindum
466bf85a67 Rust: Fix type inference for trait objects for traits with associated types 2025-07-24 16:07:39 +02:00
Simon Friis Vindum
1b2f160b55 Rust: Add type inference tests for associated types 2025-07-24 16:07:37 +02:00
Simon Friis Vindum
39f602c032 Rust: Create injective ids for impl trait type parameters 2025-07-24 12:07:11 +02:00
Simon Friis Vindum
bb56b0d45b Rust: Add type inference test with consistency issue 2025-07-24 11:55:23 +02:00
Simon Friis Vindum
9a0c5877ea Rust: Support impl trait types in return position with function type parameters 2025-07-24 11:00:01 +02:00
Simon Friis Vindum
a20fed8ae5 Rust: Add type inference tests for impl trait types 2025-07-24 10:36:51 +02:00
Simon Friis Vindum
82387461ee Merge pull request #20084 from paldepind/rust/type-inference-trait-object
Rust: Implement type inference for trait objects/`dyn` types
2025-07-24 10:17:23 +02:00
Simon Friis Vindum
b3dc6cba78 Rust: Use getATypeParam for consistency 2025-07-23 20:56:45 +02:00
Geoffrey White
199f2473e5 Merge pull request #20024 from geoffw0/moresensitive2
Shared: Improve sensitive data heuristics
2025-07-23 15:38:24 +01:00
Nora Dimitrijević
5f8c457295 Merge pull request #20081 from d10c/d10c/diff-informed-phase-3-rust
Rust: Diff-informed queries: phase 3 (non-trivial locations)
2025-07-23 16:31:23 +02:00
Nora Dimitrijević
83fe9e0d51 [DIFF-INFORMED] Rust: AccessInvalidPointer 2025-07-23 14:52:44 +02:00
Nora Dimitrijević
31a73d466b [DIFF-INFORMED] Rust: AccessAfterLifetime 2025-07-23 14:52:32 +02:00
Nora Dimitrijević
56ae8684e1 [DIFF-INFORMED] Rust: UncontrolledAllocationSize 2025-07-23 14:52:14 +02:00
Nora Dimitrijević
fcc3800756 [DIFF-INFORMED] Rust: CleartextLogging 2025-07-23 14:52:07 +02:00
Nora Dimitrijević
091163bf8e [DIFF-INFORMED] Rust: CleartextTransmission 2025-07-23 14:52:00 +02:00
Nora Dimitrijević
78c40e209b [DIFF-INFORMED] Rust: SqlInjection 2025-07-23 14:51:52 +02:00
Nora Dimitrijević
574bb871e0 [DIFF-INFORMED] Rust: TaintedPath 2025-07-23 14:51:45 +02:00
Nora Dimitrijević
329fd803e2 [DIFF-INFORMED] Rust: RegexInjection 2025-07-23 14:51:33 +02:00
Simon Friis Vindum
f5605c94c5 Rust: Add change note for type inference of trait objects 2025-07-23 14:08:22 +02:00
Simon Friis Vindum
12942667bf Rust: Add type inference for dyn types 2025-07-23 14:08:15 +02:00
Simon Friis Vindum
605c8e201e Rust: Add type inference tests for dyn types 2025-07-23 14:03:53 +02:00
copilot-swe-agent[bot]
defd4a1d08 Add change note for removal of deprecated dataflow predicates
Co-authored-by: geoffw0 <40627776+geoffw0@users.noreply.github.com>
2025-07-23 10:41:31 +00:00
copilot-swe-agent[bot]
2cc732e235 Apply QL autoformatter to ModelsAsData.qll
Co-authored-by: geoffw0 <40627776+geoffw0@users.noreply.github.com>
2025-07-23 09:38:10 +00:00
copilot-swe-agent[bot]
0245cd872c Remove deprecated Rust dataflow predicates and associated classes
Co-authored-by: geoffw0 <40627776+geoffw0@users.noreply.github.com>
2025-07-23 08:49:24 +00:00
Geoffrey White
4f6b698ca3 Merge branch 'main' into moresensitive2 2025-07-23 08:50:25 +01:00