-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathUndefined.json
More file actions
130 lines (130 loc) · 5.29 KB
/
Undefined.json
File metadata and controls
130 lines (130 loc) · 5.29 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
{
"MISRA-C++-2023": {
"RULE-4-1-3": {
"properties": {
"enforcement": "undecidable",
"obligation": "required"
},
"queries": [
{
"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.",
"kind": "problem",
"name": "There shall be no occurrence of undefined behaviour",
"precision": "high",
"severity": "error",
"short_name": "UndefinedBehavior",
"tags": [
"correctness",
"scope/system"
]
},
{
"description": "Critical unspecified behaviour impacts the observable behaviour of the abstract machine and means a program is not guaranteed to behave predictably.",
"kind": "problem",
"name": "There shall be no occurrence of critical unspecified behaviour",
"precision": "high",
"severity": "error",
"short_name": "CriticalUnspecifiedBehavior",
"tags": [
"correctness",
"scope/system"
]
},
{
"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.",
"kind": "problem",
"name": "Audit: there shall be no occurrence of undefined behaviour",
"precision": "low",
"severity": "error",
"short_name": "UndefinedBehaviorAudit",
"tags": [
"correctness",
"scope/system",
"external/misra/audit"
]
},
{
"description": "Critical unspecified behaviour impacts the observable behaviour of the abstract machine and means a program is not guaranteed to behave predictably.",
"kind": "problem",
"name": "Audit: there shall be no occurrence of critical unspecified behaviour",
"precision": "low",
"severity": "error",
"short_name": "CriticalUnspecifiedBehaviorAudit",
"tags": [
"correctness",
"scope/system",
"external/misra/audit"
]
},
{
"description": "Threads accessing the same memory location concurrently without utilization of thread synchronization objects results in undefined behavior.",
"kind": "problem",
"name": "Data races between threads lead to undefined behavior",
"precision": "medium",
"severity": "error",
"shared_implementation_short_name": "PossibleDataRaceBetweenThreadsShared",
"short_name": "PossibleDataRaceBetweenThreads",
"tags": [
"correctness",
"concurrency",
"scope/system"
]
},
{
"description": "Division or remainder by zero results in undefined behavior.",
"kind": "problem",
"name": "Division or modulo by zero leads to undefined behavior",
"precision": "high",
"severity": "error",
"shared_implementation_short_name": "DivisorEqualToZeroShared",
"short_name": "DivisionByZeroUndefinedBehavior",
"tags": [
"correctness",
"scope/system"
]
},
{
"description": "Using a deallocation function that does not match the allocation function results in undefined behavior.",
"kind": "problem",
"name": "Deallocation type mismatch leads to undefined behavior",
"precision": "medium",
"severity": "error",
"shared_implementation_short_name": "ProperlyDeallocateDynamicallyAllocatedResourcesShared",
"short_name": "DeallocationTypeMismatch",
"tags": [
"correctness",
"scope/system"
]
},
{
"description": "Assigning a string literal to a non-const pointer may lead to undefined behaviour if the string is modified through that pointer.",
"kind": "problem",
"name": "Audit: string literal possibly modified through non-const pointer",
"precision": "low",
"severity": "error",
"shared_implementation_short_name": "StringLiteralsAssignedToNonConstantPointersShared",
"short_name": "StringLiteralPossiblyModifiedAudit",
"tags": [
"correctness",
"scope/system",
"external/misra/audit"
]
},
{
"description": "Casting to an enumeration value outside the range of the enumeration's values results in critical unspecified behavior.",
"kind": "problem",
"name": "Out-of-range enumeration cast leads to critical unspecified behavior",
"precision": "high",
"severity": "error",
"shared_implementation_short_name": "DoNotCastToAnOutOfRangeEnumerationValueShared",
"short_name": "OutOfRangeEnumCastCriticalUnspecifiedBehavior",
"tags": [
"correctness",
"scope/system"
]
}
],
"title": "There shall be no occurrence of undefined or critical unspecified behaviour"
}
}
}