现在的位置: 首页 > 综合 > 正文

Purify检测的代码错误类型

2014年09月05日 ⁄ 综合 ⁄ 共 2262字 ⁄ 字号 评论关闭

一、        红色叹号提示

1、  ABR: Array Bounds Read

数组越界读(只检测动态内存分配的数组,对Global、Local、Static的数组无法检测)。

2、  ABW: Array Bounds Write

数组越界写(只检测动态内存分配的数组,对Global、Local、Static的数组无法检

3、  ABWL: Late Detect Array Bounds Write
(An ABWL message indicates that the program wrote a value before the beginning or after the end of an allocated block of memory

4、  BSR: Beyond Stack Read

函数可能读了一个当前堆栈之外的指针。例如在写变量值的时候程序出现了异常,那么读此变量时,就会发生BSR错误。(不适用于堆栈内的本地数组)

5、  BSW: Beyond Stack Write

函数可能写了一个当前堆栈之外的指针。(不适用于堆栈内的本地数组)

6、  EXU: Unhandled Exception

未经处理的异常

7、  FFM: Freeing Freed Memory

正在释放已经释放过的内存。

8、  FIM: Freeing Invalid Memory

试图释放未分配的、无效的内存。

9、  FMM: Freeing Mismatched Memory

释放不匹配的内存,用不正确的API函数释放某类内存。

10、            FMR: Free Memory Read

读取已经释放或者未经分配的内存内容。

11、            FMW: Free Memory Write

对已经释放或者未经分配的内存做写入操作。

 

12、            FMWL: Late Detect Free Memory Write

13、            IPR: Invalid Pointer Read

程序正在读取一个无效的,不可以设定地址的内存区域。

14、            IPW: Invalid Pointer Write

程序正在对一个无效的,不可以设定地址的内存区域进行写操作。

red zone

For error detection runs, the bytes that are placed at the beginning and end of each allocated block of memory in a program at run time. The red zone is used to detect Array Bounds Read (ABR), Array Bounds Write (ABW), and Late Detect Array Bounds Write
(ABWL) errors.

15、            NPR: Null Pointer Read

空指针读。

16、            NPW: Null Pointer Write

空指针写。

二、        黄色警告信息

1、  COM: COM API/Interface Failure

COM操作失败。在每一个COM API或COM接口调用后,Purify都会检查HRESULT,如果它的值不是标明操作成功的S_OK,就会显示此错误。

2、  HAN: Invalid Handle

无效句柄。在期望出现句柄的地方出现了一个非句柄的值或者是一个错误类型的句柄。

3、  ILK: COM Interface Leak

COM接口漏洞。当一个COM接口的引用总数大于1时,会出现此提示。

4、  MLK: Memory Leak

堆内存泄露。指内存块中没有任何内容或者内存块没有被任何指针引用。以下两种情况都会出现此错误提示。

A、在函数中分配了本地内存,但在退出函数的时候没有Free。

B、内存块的指针被清除或改变或不在其作用域内。

If the section of the program where the memory is allocated and leaked is executed repeatedly, you might eventually run out of swap space, causing slow downs and crashes. This is a serious problem for long-running, interactive programs.

5、  PAR: Bad Parameter

程序在调用Win32API或者C运行时常规函数时传递了一个错误的参数。

6、  UMC: Uninitialized Memory Copy

将一个未初始化的值从一个内存区拷贝到另外一个。

7、  UMR: Uninitialized Memory Read

读取未初始化的内存块的值。

三、        兰色提示信息

1、  BOX: MessageBox

如果程序中用到了MessageBox()或者MessageBoxEx()两个函数,Purify运行结束后就会出现此项提示信息。

2、  EXC: Continued Exception

3、  EXH: Handled Exception

4、  EXI: Ignored Exception

5、  HIU: Handle In Use

句柄被分配后,没有释放。

6、  MAF: Memory Allocation Failure

内存分配失败。

7、  MIU: Memory In Use

正要分配的堆内存上已经有指针了。

8、  MPK: Potential Memory Leak

堆内存可能泄露。在内存块的开始没有指针,但在块的内部看起来有指针指向。

9、  ODS: OutputDebugString

程序中调用了OutputDebugString函数。

抱歉!评论已关闭.