Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da29d99

Browse files
committed
Merge branch 'master' of github.com:Semmle/ql into attribute
2 parents cc854dd + af469fd commit da29d99

18 files changed

Lines changed: 4106 additions & 153 deletions

File tree

change-notes/1.22/analysis-cpp.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@
3030
- The `semmle.code.cpp.models` library now models data flow through `std::swap`.
3131
- There is a new `Variable.isThreadLocal()` predicate. It can be used to tell whether a variable is `thread_local`.
3232
- Recursion through the `DataFlow` library is now always a compile error. Such recursion has been deprecated since release 1.16. If one `DataFlow::Configuration` needs to depend on the results of another, switch one of them to use one of the `DataFlow2` through `DataFlow4` libraries.
33+
- The possibility of specifying barrier edges using
34+
`isBarrierEdge`/`isSanitizerEdge` in data-flow and taint-tracking
35+
configurations has been replaced with the option of specifying in- and
36+
out-barriers on nodes by overriding `isBarrierIn`/`isSanitizerIn` and
37+
`isBarrierOut`/`isSanitizerOut`. This should be simpler to use effectively,
38+
as it does not require knowledge about the actual edges used internally by
39+
the library.

change-notes/1.22/analysis-csharp.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,12 @@
4242
- The new predicate `TypeParameterConstraints.getAnAnnotatedTypeConstraint()` gets a type constraint with type annotations
4343
* The new class `SuppressNullableWarningExpr` models suppress-nullable-warning expressions such as `x!`
4444
* The data-flow library (and taint-tracking library) now supports flow through fields. All existing configurations will have field-flow enabled by default, but it can be disabled by adding `override int fieldFlowBranchLimit() { result = 0 }` to the configuration class. Field assignments, `this.Foo = x`, object initializers, `new C() { Foo = x }`, and field initializers `int Foo = 0` are supported.
45+
* The possibility of specifying barrier edges using
46+
`isBarrierEdge`/`isSanitizerEdge` in data-flow and taint-tracking
47+
configurations has been replaced with the option of specifying in- and
48+
out-barriers on nodes by overriding `isBarrierIn`/`isSanitizerIn` and
49+
`isBarrierOut`/`isSanitizerOut`. This should be simpler to use effectively,
50+
as it does not require knowledge about the actual edges used internally by
51+
the library.
4552

4653
## Changes to autobuilder

change-notes/1.22/analysis-java.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,18 @@
1616
removes false positives that arose from paths through impossible `toString()`
1717
calls.
1818
* The library `VCS.qll` and all queries that imported it have been removed.
19-
* The second copy of the interprocedural `TaintTracking` library has been renamed from `TaintTracking::Configuration2` to `TaintTracking2::Configuration`, and the old name is now deprecated. Import `semmle.code.java.dataflow.TaintTracking2` to access the new name.
19+
* The second copy of the interprocedural `TaintTracking` library has been
20+
renamed from `TaintTracking::Configuration2` to
21+
`TaintTracking2::Configuration`, and the old name is now deprecated. Import
22+
`semmle.code.java.dataflow.TaintTracking2` to access the new name.
23+
* The data-flow library now makes it easier to specify barriers/sanitizers
24+
arising from guards by overriding the predicate
25+
`isBarrierGuard`/`isSanitizerGuard` on data-flow and taint-tracking
26+
configurations respectively.
27+
* The possibility of specifying barrier edges using
28+
`isBarrierEdge`/`isSanitizerEdge` in data-flow and taint-tracking
29+
configurations has been replaced with the option of specifying in- and
30+
out-barriers on nodes by overriding `isBarrierIn`/`isSanitizerIn` and
31+
`isBarrierOut`/`isSanitizerOut`. This should be simpler to use effectively,
32+
as it does not require knowledge about the actual edges used internally by
33+
the library.

change-notes/1.22/analysis-javascript.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
| Shift out of range | Fewer false positive results | This rule now correctly handles BigInt shift operands. |
3232
| Conflicting HTML element attributes | Fewer results | Results are no longer shown on LGTM by default. |
3333
| Superfluous trailing arguments | Fewer false-positive results. | This rule no longer flags calls to placeholder functions that trivially throw an exception. |
34+
| Undocumented parameter | No changes to results | This rule is now run on LGTM, although its results are still not shown by default. |
3435

3536
## Changes to QL libraries
3637

cpp/ql/src/semmle/code/cpp/exprs/Lambda.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ class Closure extends Class {
9898
/**
9999
* Information about a value captured as part of a lambda expression.
100100
*/
101-
class LambdaCapture extends @lambdacapture {
102-
string toString() {
101+
class LambdaCapture extends Locatable, @lambdacapture {
102+
override string toString() {
103103
result = getField().toString()
104104
}
105105

106-
string getCanonicalQLClass() { result = "LambdaCapture" }
106+
override string getCanonicalQLClass() { result = "LambdaCapture" }
107107

108108
/**
109109
* Holds if this capture was made implicitly.
@@ -133,7 +133,7 @@ class LambdaCapture extends @lambdacapture {
133133
* For implicit captures, this is the first location within the "{...}" part of the lambda
134134
* expression which accesses the captured variable.
135135
*/
136-
Location getLocation() {
136+
override Location getLocation() {
137137
lambda_capture(this, _, _, _, _, _, result)
138138
}
139139

cpp/ql/src/semmlecode.cpp.dbscheme

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,8 @@ frienddecls(
10261026
| @namequalifier
10271027
| @specialnamequalifyingelement
10281028
| @static_assert
1029-
| @type_mention;
1029+
| @type_mention
1030+
| @lambdacapture;
10301031

10311032
@exprparent = @element;
10321033

0 commit comments

Comments
 (0)