Skip to content

Commit d7215f5

Browse files
Draft PR for Rule 4-1-3, no undefined/unspecified behavior
1 parent 69e9477 commit d7215f5

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

rule_packages/cpp/Undefined.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"MISRA-C++-2023": {
3+
"RULE-4-1-3": {
4+
"properties": {
5+
"enforcement": "undecidable",
6+
"obligation": "required"
7+
},
8+
"queries": [
9+
{
10+
"description": "It is not possible to reason about the behaviour of any program that contains instances of undefined behaviour, which can cause unpredictable results that are particularly difficult to detect during testing.",
11+
"kind": "problem",
12+
"name": "There shall be no occurrence of undefined behaviour",
13+
"precision": "high",
14+
"severity": "error",
15+
"short_name": "UndefinedBehavior",
16+
"tags": [
17+
"correctness",
18+
"scope/system"
19+
]
20+
},
21+
{
22+
"description": "Critical unspecified behaviour impacts the observable behaviour of the abstract machine and means a program is not guaranteed to behave predictably.",
23+
"kind": "problem",
24+
"name": "There shall be no occurrence of critical unspecified behaviour",
25+
"precision": "high",
26+
"severity": "error",
27+
"short_name": "CriticalUnspecifiedBehavior",
28+
"tags": [
29+
"correctness",
30+
"scope/system"
31+
]
32+
},
33+
{
34+
"description": "It is not possible to reason about the behaviour of any program that contains instances of undefined behaviour, which can cause unpredictable results that are particularly difficult to detect during testing.",
35+
"kind": "problem",
36+
"name": "Audit: there shall be no occurrence of undefined behaviour",
37+
"precision": "low",
38+
"severity": "error",
39+
"short_name": "UndefinedBehaviorAudit",
40+
"tags": [
41+
"correctness",
42+
"scope/system",
43+
"external/misra/audit"
44+
]
45+
},
46+
{
47+
"description": "Critical unspecified behaviour impacts the observable behaviour of the abstract machine and means a program is not guaranteed to behave predictably.",
48+
"kind": "problem",
49+
"name": "Audit: there shall be no occurrence of critical unspecified behaviour",
50+
"precision": "low",
51+
"severity": "error",
52+
"short_name": "CriticalUnspecifiedBehaviorAudit",
53+
"tags": [
54+
"correctness",
55+
"scope/system",
56+
"external/misra/audit"
57+
]
58+
}
59+
],
60+
"title": "There shall be no occurrence of undefined or critical unspecified behaviour"
61+
}
62+
}
63+
}

0 commit comments

Comments
 (0)