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

Commit9c4db29

Browse files
Merge remote-tracking branch 'origin/main' into michaelrfairhurst/implement-concurrency8-package
2 parents93a773c +55362d0 commit9c4db29

File tree

369 files changed

+5057
-1331
lines changed

Some content is hidden

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

369 files changed

+5057
-1331
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ jobs:
8080
8181
-name:Checkout external help files
8282
id:checkout-external-help-files
83+
# PRs from forks and dependabot do not have access to an appropriate token for cloning the help files repos
84+
if:${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
8385
uses:actions/checkout@v4
8486
with:
8587
ssh-key:${{ secrets.CODEQL_CODING_STANDARDS_HELP_KEY }}
@@ -88,7 +90,7 @@ jobs:
8890
path:external-help-files
8991

9092
-name:Include external help files
91-
if:steps.checkout-external-help-files.outcome == 'success'
93+
if:${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]'&&steps.checkout-external-help-files.outcome == 'success' }}
9294
run:|
9395
pushd external-help-files
9496
find . -name '*.md' -exec rsync -av --relative {} "$GITHUB_WORKSPACE" \;

‎.github/workflows/upgrade_codeql_dependencies.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
find c \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
5454
5555
-name:Create Pull Request
56-
uses:peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f# v7.0.5
56+
uses:peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f# v7.0.6
5757
with:
5858
title:"Upgrade `github/codeql` dependency to ${{ github.event.inputs.codeql_cli_version }}"
5959
body:|

‎c/cert/src/codeql-pack.lock.yml‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@
22
lockVersion:1.0.0
33
dependencies:
44
codeql/cpp-all:
5-
version:0.12.9
5+
version:1.4.2
66
codeql/dataflow:
7-
version:0.2.3
7+
version:1.1.1
8+
codeql/mad:
9+
version:1.0.7
810
codeql/rangeanalysis:
9-
version:0.0.11
11+
version:1.0.7
1012
codeql/ssa:
11-
version:0.2.12
13+
version:1.0.7
1214
codeql/tutorial:
13-
version:0.2.12
15+
version:1.0.7
16+
codeql/typeflow:
17+
version:1.0.7
1418
codeql/typetracking:
15-
version:0.2.12
19+
version:1.0.7
1620
codeql/util:
17-
version:0.2.12
21+
version:1.0.7
22+
codeql/xml:
23+
version:1.0.7
1824
compiled:false

‎c/cert/src/qlpack.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name:codeql/cert-c-coding-standards
2-
version:2.39.0-dev
2+
version:2.42.0-dev
33
description:CERT C 2016
44
suites:codeql-suites
55
license:MIT
66
dependencies:
77
codeql/common-c-coding-standards:'*'
8-
codeql/cpp-all:0.12.9
8+
codeql/cpp-all:1.4.2

‎c/cert/src/rules/ARR37-C/DoNotUsePointerArithmeticOnNonArrayObjectPointers.ql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import cpp
1515
import codingstandards.c.cert
16-
importcodingstandards.cpp.dataflow.DataFlow
16+
importsemmle.code.cpp.dataflow.DataFlow
1717
import NonArrayPointerToArrayIndexingExprFlow::PathGraph
1818

1919
/**

‎c/cert/src/rules/ARR39-C/DoNotAddOrSubtractAScaledIntegerToAPointer.ql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.cpp.Pointers
17-
importcodingstandards.cpp.dataflow.TaintTracking
17+
importsemmle.code.cpp.dataflow.TaintTracking
1818
import ScaledIntegerPointerArithmeticFlow::PathGraph
1919

2020
/**

‎c/cert/src/rules/CON30-C/CleanUpThreadSpecificStorage.ql‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import cpp
1616
import codingstandards.c.cert
1717
import codingstandards.cpp.Concurrency
18-
importcodingstandards.cpp.dataflow.TaintTracking
19-
importcodingstandards.cpp.dataflow.DataFlow
18+
importsemmle.code.cpp.dataflow.TaintTracking
19+
importsemmle.code.cpp.dataflow.DataFlow
2020

2121
module TssCreateToTssDeleteConfigimplements DataFlow::ConfigSig{
2222
predicateisSource(DataFlow::Nodenode){

‎c/cert/src/rules/CON34-C/AppropriateThreadObjectStorageDurations.ql‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import cpp
1616
import codingstandards.c.cert
1717
import codingstandards.c.Objects
1818
import codingstandards.cpp.Concurrency
19-
importcodingstandards.cpp.dataflow.TaintTracking
20-
importcodingstandards.cpp.dataflow.DataFlow
19+
importsemmle.code.cpp.dataflow.TaintTracking
20+
importsemmle.code.cpp.dataflow.DataFlow
2121
import semmle.code.cpp.commons.Alloc
2222

2323
fromC11ThreadCreateCalltcc,Exprarg

‎c/cert/src/rules/CON34-C/ThreadObjectStorageDurationsNotInitialized.ql‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import cpp
1717
import codingstandards.c.cert
1818
import codingstandards.cpp.Concurrency
19-
importcodingstandards.cpp.dataflow.TaintTracking
20-
importcodingstandards.cpp.dataflow.DataFlow
19+
importsemmle.code.cpp.dataflow.TaintTracking
20+
importsemmle.code.cpp.dataflow.DataFlow
2121

2222
fromTSSGetFunctionCalltsg,ThreadedFunctiontf
2323
where

‎c/cert/src/rules/CON39-C/ThreadWasPreviouslyJoinedOrDetached.ql‎

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,10 @@
1414

1515
import cpp
1616
import codingstandards.c.cert
17-
import codingstandards.cpp.Concurrency
17+
import codingstandards.cpp.rules.joinordetachthreadonlyonce.JoinOrDetachThreadOnlyOnce
1818

19-
// OK
20-
// 1) Thread calls detach parent DOES NOT call join
21-
// 2) Parent calls join, thread does NOT call detach()
22-
// NOT OK
23-
// 1) Thread calls detach, parent calls join
24-
// 2) Thread calls detach twice, parent does not call join
25-
// 3) Parent calls join twice, thread does not call detach
26-
fromC11ThreadCreateCalltcc
27-
where
28-
notisExcluded(tcc, Concurrency5Package::threadWasPreviouslyJoinedOrDetachedQuery())and
29-
// Note: These cases can be simplified but they are presented like this for clarity
30-
// case 1 - calls to `thrd_join` and `thrd_detach` within the parent or
31-
// within the parent / child CFG.
32-
exists(C11ThreadWaittw,C11ThreadDetachdt|
33-
tw=getAThreadContextAwareSuccessor(tcc)and
34-
dt=getAThreadContextAwareSuccessor(tcc)
35-
)
36-
or
37-
// case 2 - multiple calls to `thrd_detach` within the threaded CFG.
38-
exists(C11ThreadDetachdt1,C11ThreadDetachdt2|
39-
dt1=getAThreadContextAwareSuccessor(tcc)and
40-
dt2=getAThreadContextAwareSuccessor(tcc)and
41-
notdt1=dt2
42-
)
43-
or
44-
// case 3 - multiple calls to `thrd_join` within the threaded CFG.
45-
exists(C11ThreadWaittw1,C11ThreadWaittw2|
46-
tw1=getAThreadContextAwareSuccessor(tcc)and
47-
tw2=getAThreadContextAwareSuccessor(tcc)and
48-
nottw1=tw2
49-
)
50-
selecttcc,"Thread may call join or detach after the thread is joined or detached."
19+
classThreadWasPreviouslyJoinedOrDetachedQueryextendsJoinOrDetachThreadOnlyOnceSharedQuery{
20+
ThreadWasPreviouslyJoinedOrDetachedQuery(){
21+
this= Concurrency5Package::threadWasPreviouslyJoinedOrDetachedQuery()
22+
}
23+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp