Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit40af474

Browse files
authored
Merge branch 'main' into automation/version-bump-2.15.0-dev
2 parents1dd9c04 +89858ef commit40af474

File tree

85 files changed

+1491
-178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1491
-178
lines changed

‎.github/workflows/code-scanning-pack-gen.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name:Code Scanning Query Pack Generation
22

33
on:
4+
merge_group:
45
pull_request:
56
branches:
67
-main

‎.github/workflows/codeql_unit_tests.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name:CodeQL Unit Testing
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
-main

‎.github/workflows/extra-rule-validation.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name:⚙️ Extra Rule Validation
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
-main

‎.github/workflows/generate-html-docs.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name:Generate HTML documentation
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
-main

‎.github/workflows/tooling-unit-tests.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name:🧰 Tooling unit tests
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
-main

‎.github/workflows/validate-coding-standards.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name:Validating Coding Standards
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
-main

‎.github/workflows/verify-standard-library-dependencies.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Verify Standard Library Dependencies
22

33
# Run this workflow every time the "supported_codeql_configs.json" file or a "qlpack.yml" file is changed
44
on:
5+
merge_group:
56
pull_request:
67
branches:
78
-main

‎c/cert/src/rules/CON40-C/AtomicVariableTwiceInExpression.ql‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import cpp
1616
import codingstandards.c.cert
17+
import codingstandards.cpp.Concurrency
1718

1819
fromMacroInvocationmi,Variablev,LocatablewhereFound
1920
where
@@ -22,13 +23,13 @@ where
2223
// There isn't a way to safely use this construct in a way that is also
2324
// possible the reliably detect so advise against using it.
2425
(
25-
mi.getMacroName()=["atomic_store","atomic_store_explicit"]
26+
miinstanceofAtomicStore
2627
or
2728
// This construct is generally safe, but must be used in a loop. To lower
2829
// the false positive rate we don't look at the conditions of the loop and
2930
// instead assume if it is found in a looping construct that it is likely
3031
// related to the safety property.
31-
mi.getMacroName()=["atomic_compare_exchange_weak","atomic_compare_exchange_weak_explicit"]and
32+
miinstanceofAtomicCompareExchangeand
3233
notexists(Loopl|mi.getAGeneratedElement().(Expr).getParent*()=l)
3334
)and
3435
whereFound=mi

‎c/cert/src/rules/CON41-C/WrapFunctionsThatCanFailSpuriouslyInLoop.ql‎

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,18 @@
1212
* external/cert/obligation/rule
1313
*/
1414

15-
import cpp
16-
import codingstandards.c.cert
15+
import cpp
16+
import codingstandards.c.cert
17+
import codingstandards.cpp.Concurrency
18+
1719

18-
/**
19-
* Models calls to routines in the `stdatomic` library. Note that these
20-
* are typically implemented as macros within Clang and GCC's standard
21-
* libraries.
22-
*/
23-
classSpuriouslyFailingFunctionCallTypeextendsMacroInvocation{
24-
SpuriouslyFailingFunctionCallType(){
25-
getMacroName()=["atomic_compare_exchange_weak","atomic_compare_exchange_weak_explicit"]
26-
}
27-
}
28-
29-
fromSpuriouslyFailingFunctionCallTypefc
30-
where
31-
notisExcluded(fc, Concurrency3Package::wrapFunctionsThatCanFailSpuriouslyInLoopQuery())and
32-
(
33-
exists(StmtParentsp|sp=fc.getStmt()andnotsp.(Stmt).getParentStmt*()instanceofLoop)
34-
or
35-
exists(StmtParentsp|
36-
sp=fc.getExpr()andnotsp.(Expr).getEnclosingStmt().getParentStmt*()instanceofLoop
37-
)
38-
)
39-
selectfc,"Function that can spuriously fail not wrapped in a loop."
20+
fromAtomicCompareExchangeace
21+
where
22+
notisExcluded(ace, Concurrency3Package::wrapFunctionsThatCanFailSpuriouslyInLoopQuery())and
23+
(
24+
forex(StmtParentsp|sp=ace.getStmt()|notsp.(Stmt).getParentStmt*()instanceofLoop)or
25+
forex(Expre|e=ace.getExpr()|note.getEnclosingStmt().getParentStmt*()
26+
instanceofLoop)
27+
)
28+
selectace,"Function that can spuriously fail not wrapped in a loop."
29+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
edges
2+
| test.c:7:13:7:14 | p1 | test.c:9:9:9:10 | p1 |
3+
| test.c:16:19:16:41 | __builtin_offsetof | test.c:18:26:18:31 | offset |
4+
| test.c:16:19:16:41 | __builtin_offsetof | test.c:29:6:29:11 | offset |
5+
| test.c:17:17:17:26 | sizeof(<expr>) | test.c:23:9:23:12 | size |
6+
| test.c:29:6:29:11 | offset | test.c:7:13:7:14 | p1 |
7+
nodes
8+
| test.c:7:13:7:14 | p1 | semmle.label | p1 |
9+
| test.c:9:9:9:10 | p1 | semmle.label | p1 |
10+
| test.c:16:19:16:41 | __builtin_offsetof | semmle.label | __builtin_offsetof |
11+
| test.c:17:17:17:26 | sizeof(<expr>) | semmle.label | sizeof(<expr>) |
12+
| test.c:18:26:18:31 | offset | semmle.label | offset |
13+
| test.c:23:9:23:12 | size | semmle.label | size |
14+
| test.c:25:9:25:18 | sizeof(<expr>) | semmle.label | sizeof(<expr>) |
15+
| test.c:27:17:27:26 | sizeof(<expr>) | semmle.label | sizeof(<expr>) |
16+
| test.c:29:6:29:11 | offset | semmle.label | offset |
17+
subpaths
18+
#select
19+
| test.c:9:9:9:10 | p1 | test.c:16:19:16:41 | __builtin_offsetof | test.c:9:9:9:10 | p1 | Scaled integer used in pointer arithmetic. |
20+
| test.c:18:26:18:31 | offset | test.c:16:19:16:41 | __builtin_offsetof | test.c:18:26:18:31 | offset | Scaled integer used in pointer arithmetic. |
21+
| test.c:23:9:23:12 | size | test.c:17:17:17:26 | sizeof(<expr>) | test.c:23:9:23:12 | size | Scaled integer used in pointer arithmetic. |
22+
| test.c:25:9:25:18 | sizeof(<expr>) | test.c:25:9:25:18 | sizeof(<expr>) | test.c:25:9:25:18 | sizeof(<expr>) | Scaled integer used in pointer arithmetic. |
23+
| test.c:27:17:27:26 | sizeof(<expr>) | test.c:27:17:27:26 | sizeof(<expr>) | test.c:27:17:27:26 | sizeof(<expr>) | Scaled integer used in pointer arithmetic. |

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp