动态内存缺陷
与动态内存编码错误相关的缺陷,如悬空指针、内存泄漏、无保护内存等
这些缺陷是在动态分配内存的情况下与内存使用相关的错误。这些缺陷包括:
释放动态分配的内存
无保护内存分配
Polyspace 结果
内存重新分配后对齐发生改变 | Memory reallocation changes the originally stricter alignment of an object |
释放之前已释放的指针 | Memory freed more than once without allocation |
无效的指针释放 | Pointer deallocation without a corresponding dynamic allocation |
无效的指针删除 | Pointer deallocation using delete without
corresponding allocation using new |
内存泄漏 | Memory allocated dynamically not freed |
Windows 上的分配/释放函数不匹配 | 不正确的释放函数会导致内存损坏问题 |
无保护动态内存分配 | Pointer returned from dynamic allocation not checked for NULL or
nullptr value |
使用之前已释放的指针 | Memory accessed after deallocation |
主题
- Bug Finder 缺陷组
Bug Finder 的缺陷检查项分为数据流、并发、数值等分组。