Skip to content

Commit b4dd1a2

Browse files
committed
work
1 parent 7349926 commit b4dd1a2

File tree

2 files changed

+142
-0
lines changed

2 files changed

+142
-0
lines changed

rule_packages/c/Concurrency3.json

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
{
2+
"CERT-C": {
3+
"CON30-C": {
4+
"properties": {
5+
"obligation": "rule"
6+
},
7+
"queries": [
8+
{
9+
"description": "",
10+
"kind": "problem",
11+
"name": "Clean up thread-specific storage",
12+
"precision": "medium",
13+
"severity": "error",
14+
"short_name": "CleanUpThreadSpecificStorage",
15+
"tags": []
16+
}
17+
],
18+
"title": "Clean up thread-specific storage"
19+
},
20+
"CON31-C": {
21+
"properties": {
22+
"obligation": "rule"
23+
},
24+
"queries": [
25+
{
26+
"description": "Allowing a mutex to go out of scope while it is locked removes protections around shared resources.",
27+
"kind": "problem",
28+
"name": "Do not destroy a mutex while it is locked",
29+
"precision": "high",
30+
"severity": "error",
31+
"short_name": "DoNotAllowAMutexToGoOutOfScopeWhileLocked",
32+
"shared_implementation_short_name": "DoNotAllowAMutexToGoOutOfScopeWhileLocked",
33+
"tags": [
34+
"correctness",
35+
"concurrency"
36+
]
37+
},
38+
{
39+
"description": "Calling delete on a locked mutex removes protections around shared resources.",
40+
"kind": "problem",
41+
"name": "Do not destroy a mutex while it is locked",
42+
"precision": "high",
43+
"severity": "error",
44+
"short_name": "DoNotDestroyAMutexWhileItIsLocked",
45+
"shared_implementation_short_name": "DoNotDestroyAMutexWhileItIsLocked",
46+
"tags": [
47+
"correctness",
48+
"concurrency"
49+
]
50+
}
51+
],
52+
"title": "Do not destroy a mutex while it is locked"
53+
},
54+
"CON34-C": {
55+
"properties": {
56+
"obligation": "rule"
57+
},
58+
"queries": [
59+
{
60+
"description": "",
61+
"kind": "problem",
62+
"name": "Declare objects shared between threads with appropriate storage durations",
63+
"precision": "high",
64+
"severity": "error",
65+
"short_name": "DeclareThreadsWithAppropriateStorageDurations",
66+
"tags": []
67+
}
68+
],
69+
"title": "Declare objects shared between threads with appropriate storage durations"
70+
},
71+
"CON38-C": {
72+
"properties": {
73+
"obligation": "rule"
74+
},
75+
"queries": [
76+
{
77+
"description": "",
78+
"kind": "problem",
79+
"name": "Preserve thread safety and liveness when using condition variables",
80+
"precision": "very-high",
81+
"severity": "error",
82+
"short_name": "PreserveSafetyWhenUsingConditionVariables",
83+
"tags": []
84+
}
85+
],
86+
"title": "Preserve thread safety and liveness when using condition variables"
87+
},
88+
"CON39-C": {
89+
"properties": {
90+
"obligation": "rule"
91+
},
92+
"queries": [
93+
{
94+
"description": "",
95+
"kind": "problem",
96+
"name": "Do not join or detach a thread that was previously joined or detached",
97+
"precision": "high",
98+
"severity": "error",
99+
"short_name": "ThreadPreviouslyJoinedOrDetached",
100+
"tags": []
101+
}
102+
],
103+
"title": "Do not join or detach a thread that was previously joined or detached"
104+
},
105+
"CON40-C": {
106+
"properties": {
107+
"obligation": "rule"
108+
},
109+
"queries": [
110+
{
111+
"description": "",
112+
"kind": "problem",
113+
"name": "Do not refer to an atomic variable twice in an expression",
114+
"precision": "very-high",
115+
"severity": "error",
116+
"short_name": "DoNotReferToAnAtomicVariableTwiceInExpression",
117+
"tags": []
118+
}
119+
],
120+
"title": "Do not refer to an atomic variable twice in an expression"
121+
},
122+
"CON41-C": {
123+
"properties": {
124+
"obligation": "rule"
125+
},
126+
"queries": [
127+
{
128+
"description": "",
129+
"kind": "problem",
130+
"name": "Wrap functions that can fail spuriously in a loop",
131+
"precision": "very-high",
132+
"severity": "error",
133+
"short_name": "WrapFunctionsThatCanFailSpuriouslyInLoop",
134+
"tags": []
135+
}
136+
],
137+
"title": "Wrap functions that can fail spuriously in a loop"
138+
}
139+
}
140+
}

rule_packages/cpp/Concurrency.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"precision": "high",
1313
"severity": "error",
1414
"short_name": "DoNotAllowAMutexToGoOutOfScopeWhileLocked",
15+
"shared_implementation_short_name": "DoNotAllowAMutexToGoOutOfScopeWhileLocked",
1516
"tags": [
1617
"correctness",
1718
"concurrency"
@@ -24,6 +25,7 @@
2425
"precision": "high",
2526
"severity": "error",
2627
"short_name": "DoNotDestroyAMutexWhileItIsLocked",
28+
"shared_implementation_short_name": "DoNotDestroyAMutexWhileItIsLocked",
2729
"tags": [
2830
"correctness",
2931
"concurrency"

0 commit comments

Comments
 (0)