-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathSideEffects1.json
More file actions
204 lines (204 loc) · 7.81 KB
/
SideEffects1.json
File metadata and controls
204 lines (204 loc) · 7.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
{
"AUTOSAR": {
"A5-3-1": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "non-automated",
"obligation": "required"
},
"queries": [
{
"description": "The operand of the typeid may or may not be evaluated if it is a function call and reliance on side effects will result in unexpected behavior.",
"kind": "problem",
"name": "Evaluation of the operand to the typeid operator shall not contain side effects",
"precision": "very-high",
"severity": "warning",
"short_name": "EvaluationOfTheOperandToTheTypeidOperatorContainSideEffects",
"tags": [
"correctness"
]
}
],
"title": "Evaluation of the operand to the typeid operator shall not contain side effects."
},
"M5-14-1": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "automated",
"obligation": "required"
},
"queries": [
{
"description": "The evaluation of the right hand operand of the logical && and || operators depends on the left hand operand so reliance on side effects will result in unexpected behavior.",
"kind": "problem",
"name": "The right hand operand of a logical &&, || operators shall not contain side effects",
"precision": "high",
"severity": "warning",
"short_name": "RightHandOperandOfALogicalAndOperatorsContainSideEffects",
"shared_implementation_short_name": "ShortCircuitedPersistentSideEffectShared",
"tags": [
"correctness"
]
}
],
"title": "The right hand operand of a logical &&, || operators shall not contain side effects."
},
"M5-3-4": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "automated",
"obligation": "required"
},
"queries": [
{
"description": "The sizeof operator does not evaluate expressions so reliance on side effects will result in unexpected behavior.",
"kind": "problem",
"name": "Evaluation of the operand to the sizeof operator shall not contain side effects",
"precision": "high",
"severity": "warning",
"short_name": "EvaluationOfTheOperandToTheSizeofOperatorContainSideEffects",
"tags": [
"correctness"
]
}
],
"title": "Evaluation of the operand to the sizeof operator shall not contain side effects."
}
},
"CERT-C++": {
"EXP50-CPP": {
"properties": {
"obligation": "rule"
},
"queries": [
{
"description": "Depending on the order of evaluation for side effects for evaluation of scalar objects that are unsequenced results in undefined behavior.",
"kind": "problem",
"name": "Do not depend on the order of scalar object evaluation for side effects",
"precision": "high",
"severity": "warning",
"short_name": "DoNotDependOnTheOrderOfScalarObjectEvaluationForSideEffects",
"tags": [
"correctness",
"external/cert/severity/medium",
"external/cert/likelihood/probable",
"external/cert/remediation-cost/medium",
"external/cert/priority/p8",
"external/cert/level/l2"
]
},
{
"description": "Depending on the order of evaluation for side effects in function calls that are function arguments can result in unexpected program behavior.",
"kind": "problem",
"name": "Do not depend on the order of evaluation of function calls as function arguments for side effects",
"precision": "high",
"severity": "warning",
"short_name": "DoNotDependOnTheOrderOfEvaluationForSideEffectsInFunctionCallsAsFunctionArguments",
"tags": [
"correctness",
"external/cert/severity/medium",
"external/cert/likelihood/probable",
"external/cert/remediation-cost/medium",
"external/cert/priority/p8",
"external/cert/level/l2"
]
}
],
"title": "Do not depend on the order of evaluation for side effects"
},
"EXP52-CPP": {
"properties": {
"obligation": "rule"
},
"queries": [
{
"description": "The sizeof operator does not evaluate expressions so reliance on side effects will result in unexpected behavior.",
"kind": "problem",
"name": "Do not rely on side effects in the operator sizeof",
"precision": "medium",
"severity": "warning",
"short_name": "DoNotRelyOnSideEffectsInSizeOfOperand",
"tags": [
"correctness",
"external/cert/severity/low",
"external/cert/likelihood/unlikely",
"external/cert/remediation-cost/low",
"external/cert/priority/p3",
"external/cert/level/l3"
]
},
{
"description": "The typeid operator does not always evaluate expressions so reliance on side effects will result in unexpected behavior.",
"kind": "problem",
"name": "Do not rely on side effects in the operator typeid",
"precision": "very-high",
"severity": "warning",
"short_name": "DoNotRelyOnSideEffectsInTypeIdOperand",
"tags": [
"correctness",
"external/cert/severity/low",
"external/cert/likelihood/unlikely",
"external/cert/remediation-cost/low",
"external/cert/priority/p3",
"external/cert/level/l3"
]
},
{
"description": "The noexcept operator does not evaluate expressions so reliance on side effects will result in unexpected behavior.",
"kind": "problem",
"name": "Do not rely on side effects in the operator noexcept",
"precision": "medium",
"severity": "warning",
"short_name": "DoNotRelyOnSideEffectsInNoExceptOperand",
"tags": [
"correctness",
"external/cert/severity/low",
"external/cert/likelihood/unlikely",
"external/cert/remediation-cost/low",
"external/cert/priority/p3",
"external/cert/level/l3"
]
},
{
"description": "The decltype operator does not evaluate expressions so reliance on side effects will result in unexpected behavior.",
"kind": "problem",
"name": "Do not rely on side effects in the operator decltype",
"precision": "medium",
"severity": "warning",
"short_name": "DoNotRelyOnSideEffectsInDeclTypeOperand",
"tags": [
"correctness",
"external/cert/severity/low",
"external/cert/likelihood/unlikely",
"external/cert/remediation-cost/low",
"external/cert/priority/p3",
"external/cert/level/l3"
]
},
{
"description": "The declval operator does not evaluate expressions so reliance on side effects will result in unexpected behavior.",
"kind": "problem",
"name": "Do not rely on side effects in the operator declval",
"precision": "medium",
"severity": "warning",
"short_name": "DoNotRelyOnSideEffectsInDeclValExpression",
"tags": [
"correctness",
"external/cert/severity/low",
"external/cert/likelihood/unlikely",
"external/cert/remediation-cost/low",
"external/cert/priority/p3",
"external/cert/level/l3"
]
}
],
"title": "Do not rely on side effects in unevaluated operands"
}
}
}