利用壓力測試來保證軟體的質量 四 記憶體洩露問題

2021-09-06 01:21:48 字數 3388 閱讀 2090

這是實際產品中的乙個嚴重的記憶體洩漏的bug,這樣描述的:

wmp:

iteration                    0    1    2    3    4    5    6    7    8    9    10

free mem (mb)    133.83    133.51    133.33    133.17    132.94    132.80    132.64    132.48    132.32    132.16    132.00

calculator:

iteration                     0    1    2    3    4    5    6    7    8    9    10

free mem (mb)    133.88    133.13    132.92    132.80    132.66    132.55    132.46    132.33    132.21    132.10    131.98

洩露發生在private/shellw/gserver/shell32g/san_cmn.cpp l275:

__except(watsonreportfault(getexceptioninformation(), exception_execute_handler))

break;

} //closehandle(hprocess);

} if (hprocess)

closehandle(hprocess); //應該在此位置關閉程序的控制代碼!乙個疏忽造成了很嚴重的記憶體洩露。

return dwres; }

我查一下,這個問題在移植過程中疏忽造成的(不斷的**修改造成的,看來縱有百慮總有一疏啊)。

wmpocx!cplayerwindow::onsanmessage(hwnd__ *, unsigned int, long, bool &) line 1104 + 20 bytes

wmpocx!cplayerwindow::wndproc(hwnd__ *, unsigned int, unsigned int, long) line 143 + 44 bytes

gwes!windowproccallback(void * 0x07f60102, long (hwnd__ *, unsigned int, unsigned int, long)* 0x423637c0, cwindow * 0x700578a0, unsigned int 0x0000c003, unsigned int 0x00000003, long 0x00000000, bool * 0xd890fb53) line 3198 + 21 bytes

gwes!cwindow::callwindowprocw_i(ceptr_t, hwnd__ * 0x700578a0, unsigned int 0x0000c003, unsigned int 0x00000003, long 0x00000000, sendmsgentry_t * 0x00000000) line 3403 + 33 bytes

gwes!msgqueue::dispatchmessagew_i(const tagmsg * 0x0003fb50) line 4967 + 38 bytes

gwes!pixeldoubled_t::dispatchmessagew_i(const tagmsg * 0x0003fb50) line 2083 + 15 bytes

coredll!dispatchmessagew(const tagmsg *) line 2947 + 9 bytes

wmpocx!starttheplayer(hinstance__ *, int) line 92 + 9 bytes

wmplayer!playerentry() line 99 + 9 bytes

coredll!mainthreadbasefunc(void *, const wchar_t *, const wchar_t *, hinstance__ *, hinstance__ *, hinstance__ *) line 1072 + 60 bytes

奇怪的是啟動ie時不會呼叫到這個api,而啟動鬧鈴時會:

clockdll!wndproc(hwnd__ *, unsigned int, unsigned int, long) line 1390 + 21 bytes

gwes!windowproccallback(void * 0x011a002a, long (hwnd__ *, unsigned int, unsigned int, long)* 0x417a34a0, cwindow * 0x70053000, unsigned int 0x0000c003, unsigned int 0x00000003, long 0x00000000, bool * 0xd76ffb53) line 3198 + 21 bytes

gwes!cwindow::callwindowprocw_i(ceptr_t, hwnd__ * 0x70053000, unsigned int 0x0000c003, unsigned int 0x00000003, long 0x00000000, sendmsgentry_t * 0x00000000) line 3403 + 33 bytes

gwes!msgqueue::dispatchmessagew_i(const tagmsg * 0x0002f9dc) line 4967 + 38 bytes

gwes!pixeldoubled_t::dispatchmessagew_i(const tagmsg * 0x0002f9dc) line 2083 + 15 bytes

coredll!dispatchmessagew(const tagmsg *) line 2947 + 9 bytes

commctrl!_realpropertysheet(propdata *) line 3821 + 9 bytes

commctrl!propertysheetw(const _propsheetheaderw *) line 3992 + 9 bytes

clockdll!startclock(hinstance__ *, unsigned short *, int, hinstance__ *) line 754 + 16 bytes

clock!winmain(hinstance__ *, hinstance__ *, unsigned short *, int) line 27 + 21 bytes

coredll!mainthreadbasefunc(void *, const wchar_t *, const wchar_t *, hinstance__ *, hinstance__ *, hinstance__ *) line 1072 + 60 bytes

當然健全的測試機制是發現這些記憶體洩漏的問題的前提。

軟體質量 軟體測試和質量保證

軟體質量 軟體質量包括 內部質量 外部質量 使用質量 就是說軟體滿足規定或潛在使用者需求的能力,要從軟體在內部 外部和使用中的表現來衡量 軟體測試 軟體由文件 資料以及程式組成,那麼軟體測試就應該是對軟體形成過程中的文件 資料以及程式進行測試,而不僅僅是對程式進行的測試。軟體測試和質量保證的區別 軟...

軟體測試與軟體質量 軟體測試與質量保證的區別

質量保證 qa 重要工作是 預防 檢查與改進 來保證軟體質量。採用 全面質量管理 和 過程管理 的原理展開工作,關注點軟體質量 檢查與測量。qa的工作是 軟體生命週期的管理 以及驗證軟體是否滿足規定的質量和使用者的需求。關心的不是過程的活動 而是對過程 的產物以及開發出的軟體進行剖析。對開發文件和源...

怎樣保證測試的質量

測試的目的是保證產品的質量,怎樣做好質量控制是對測試人員的一大考驗,分享一些工作中用到的經驗,如下。1.不同的測試型別的結合,功能,效能,相容性等,增加測試覆蓋面,確保測試質量。2.熟悉測試需求,測試目標,理解需求,設計測試用例。3.用例的質量,對被測物件深入分析,功能進行細分,需求覆蓋所有測試點,...