Skip to content

Commit e966b3b

Browse files
committed
Update descriptions to better reflect rationale
1 parent 7af7e8c commit e966b3b

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

cpp/misra/src/rules/RULE-21-6-2/DynamicMemoryManagedManually.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/**
22
* @id cpp/misra/dynamic-memory-managed-manually
33
* @name RULE-21-6-2: Dynamic memory shall be managed automatically
4-
* @description Dynamically allocated memory must not be managed manually.
4+
* @description Manually allocating and deallocating is error prone and may cause memory safety bugs
5+
* such as memory leaks, use-after-frees, or double frees.
56
* @kind problem
67
* @precision very-high
78
* @problem.severity error

cpp/misra/src/rules/RULE-21-6-3/AdvancedMemoryManagementUsed.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
/**
22
* @id cpp/misra/advanced-memory-management-used
33
* @name RULE-21-6-3: Advanced memory management shall not be used
4-
* @description Using advanced memory management that either alters allocation and deallocation or
5-
* constructs object construction on uninitalized memory may result in undefined
6-
* behavior.
4+
* @description Advanced memory management may introduce subtle bugs related to lifetime and
5+
* alignment, which may cause undefined behavior.
76
* @kind problem
87
* @precision very-high
98
* @problem.severity error

rule_packages/cpp/Memory5.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"queries": [
99
{
10-
"description": "Dynamically allocated memory must not be managed manually.",
10+
"description": "Manually allocating and deallocating is error prone and may cause memory safety bugs such as memory leaks, use-after-frees, or double frees.",
1111
"kind": "problem",
1212
"name": "Dynamic memory shall be managed automatically",
1313
"precision": "very-high",

rule_packages/cpp/Memory6.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"queries": [
99
{
10-
"description": "Using advanced memory management that either alters allocation and deallocation or constructs object construction on uninitalized memory may result in undefined behavior.",
10+
"description": "Advanced memory management may introduce subtle bugs related to lifetime and alignment, which may cause undefined behavior.",
1111
"kind": "problem",
1212
"name": "Advanced memory management shall not be used",
1313
"precision": "very-high",
@@ -18,7 +18,7 @@
1818
]
1919
}
2020
],
21-
"title": "Using advanced memory management that either alters allocation and deallocation or constructs object construction on uninitalized memory may result in undefined behavior."
21+
"title": "Advanced memory management may introduce subtle bugs related to lifetime and alignment, which may cause undefined behavior."
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)