Skip to content

Commit bc06831

Browse files
committed
Merge rc/1.18 into master.
2 parents cd874f7 + effabc6 commit bc06831

File tree

6 files changed

+21
-16
lines changed

6 files changed

+21
-16
lines changed

cpp/ql/src/Likely Bugs/Memory Management/SuspiciousCallToMemset.ql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ Type stripType(Type t) {
5454

5555
/**
5656
* Holds if `t` points to `base` via a specified number of levels of pointer
57-
* indirection. Intermediate typedefs and array types are allowed.
57+
* indirection. Intermediate typedefs and array types are allowed. Note that
58+
* `base` is a stripped type (via `stripType`).
5859
*/
5960
predicate pointerIndirection(Type t, int indirection, Type base) {
60-
exists(Type u |
61-
u = stripType(t) and
62-
u = stripType(base) and
63-
not u instanceof PointerType and
61+
(
62+
base = stripType(t) and
63+
not base instanceof PointerType and
6464
indirection = 0
6565
) or (
6666
pointerIndirection(stripType(t).(PointerType).getBaseType(), indirection - 1, base)

cpp/ql/src/META-INF/MANIFEST.MF

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Semmle C/C++ Default Queries
44
Bundle-SymbolicName: com.semmle.plugin.semmlecode.cpp.queries;singleton:=true
5-
Bundle-Version: 1.18.2.qualifier
5+
Bundle-Version: 1.18.3.qualifier
66
Bundle-Vendor: Semmle Ltd.
77
Bundle-ActivationPolicy: lazy
8-
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.2.qualifier,1.18.2.qualifier]"
8+
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.3.qualifier,1.18.3.qualifier]"

cpp/ql/src/semmle/code/cpp/controlflow/internal/ConstantExprs.qll

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,17 @@ library class ExprEvaluator extends int {
442442
)
443443
}
444444

445+
/** Holds if the function `f` is considered by the analysis and may return `ret`. */
446+
pragma[noinline]
447+
private predicate interestingReturnValue(Function f, Expr ret) {
448+
interestingFunction(_, f) and
449+
returnStmt(f, ret)
450+
}
451+
445452
private int getFunctionValue(Function f) {
446-
interestingFunction(_, f)
447-
and
448453
// All returns must have the same int value
449454
// And it must have at least one return
450-
forex(Expr ret | returnStmt(f, ret) | result = getValueInternalNonSubExpr(ret))
455+
forex(Expr ret | interestingReturnValue(f, ret) | result = getValueInternalNonSubExpr(ret))
451456
}
452457

453458
/**

csharp/ql/src/META-INF/MANIFEST.MF

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Semmle C# Default Queries
44
Bundle-SymbolicName: com.semmle.plugin.semmlecode.csharp.queries;singleton:=true
5-
Bundle-Version: 1.18.2.qualifier
5+
Bundle-Version: 1.18.3.qualifier
66
Bundle-Vendor: Semmle Ltd.
77
Bundle-ActivationPolicy: lazy
8-
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.2.qualifier,1.18.2.qualifier]"
8+
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.3.qualifier,1.18.3.qualifier]"

java/ql/src/META-INF/MANIFEST.MF

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Semmle Default Java Queries
44
Bundle-SymbolicName: com.semmle.plugin.semmlecode.queries;singleton:=true
5-
Bundle-Version: 1.18.2.qualifier
5+
Bundle-Version: 1.18.3.qualifier
66
Bundle-Vendor: Semmle Ltd.
77
Bundle-ActivationPolicy: lazy
8-
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.2.qualifier,1.18.2.qualifier]"
8+
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.3.qualifier,1.18.3.qualifier]"
99

javascript/ql/src/META-INF/MANIFEST.MF

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Semmle JavaScript Default Queries
44
Bundle-SymbolicName: com.semmle.plugin.semmlecode.javascript.queries;singleton:=true
5-
Bundle-Version: 1.18.2.qualifier
5+
Bundle-Version: 1.18.3.qualifier
66
Bundle-Vendor: Semmle Ltd.
77
Bundle-ActivationPolicy: lazy
8-
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.2.qualifier,1.18.2.qualifier]"
8+
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.3.qualifier,1.18.3.qualifier]"

0 commit comments

Comments
 (0)