Purify檢測的代碼錯誤類型

來源:互聯網
上載者:User

一、紅色歎號提示

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

null 指標讀。

16、NPW: Null Pointer Write

null 指標寫。

二、黃色警告資訊

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函數。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.