• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 9,  comments - 9,  trackbacks - 0

            Normally, the break instruction exception can be triggered in following conditions:

            1.       Hardcode interrupt request, like: __asm int 3 (ASM), System.Diagnostics.Debugger.Break (C#), DebugBreak() (WinAPI).

            2.       OS enable memory runtime check, like Application Verifier can trigger after heap corruption, memory overrun.

            3.       Compiler can have some configuration to decide what should be filled to the uninitialized memory block and end of function(blank area, after retun..).  For example, Microsoft VC complier can fill 0xCC if enable /GZ.  0xCC is actually a opcode of __asm int 3.  So if some error cause the application run into such block, will trigger a break point.

            A quick summary of what Microsoft's compilers use for various bits of unowned/uninitialized memory when compiled for debug mode (support may vary by compiler version):

            Value     Name           Description 

            ------   --------        -------------------------

            0xCD     Clean Memory    Allocated memory via malloc or new but never 

                                     written by the application. 


            0xDD     Dead Memory     Memory that has been released with delete or free. 

                                     Used to detect writing through dangling pointers. 


            0xFD     Fence Memory    Also known as "no mans land." This is used to wrap 

                                     the allocated memory (surrounding it with a fence) 

                                     and is used to detect indexing arrays out of 

                                     bounds or other accesses (especially writes) past

                                     the end (or start) of an allocated block.


            0xCC                     When the code is compiled with the /GZ option,

                                     uninitialized variables are automatically assigned 

                                     to this value (at byte level). 



            // the following magic values are done by the OS, not the C runtime:


            0xAB  (Allocated Block?) Memory allocated by LocalAlloc(). 


            0xBAADF00D Bad Food      Memory allocated by LocalAlloc() with LMEM_FIXED,but 

                                     not yet written to. 


            0xFEEEFEEE               OS fill heap memory, which was marked for usage, 

                                     but wasn't allocated by HeapAlloc() or LocalAlloc(). 

                                     Or that memory just has been freed by HeapFree().

            Disclaimer: the table is from some notes I have lying around - they may not be 100% correct (or coherent).


            As others have noted, one of the key properties of these values is that is a pointer variable with one of these values is dereferenced, it will result in an access violation, since on a standard 32-bit Windows configuration, user mode addresses will not go higher than 0x7fffffff.


            For the related issue, we can use Application Verifier to enable heap page, which can break after memory overrun, heap corruption.


             

             

            posted on 2010-07-23 16:22 MicroYang 閱讀(2011) 評論(0)  編輯 收藏 引用
            <2007年4月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            293012345

            常用鏈接

            留言簿(1)

            隨筆檔案

            Friend

            • Catherine
            • 深海羚羊
            • 似雨打芭蕉,似風吹梧桐葉,帶著一絲冰冷,也帶著一絲清新------冰柔語絲

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            国产高潮国产高潮久久久| 久久久久香蕉视频| 2021精品国产综合久久| 囯产精品久久久久久久久蜜桃 | 亚州日韩精品专区久久久| 一本色道久久88综合日韩精品 | 国产精品久久波多野结衣| 精品视频久久久久| 亚洲国产精品无码久久SM| 国产精品成人精品久久久 | 99久久久精品免费观看国产| 久久久久国产日韩精品网站| 狼狼综合久久久久综合网| 久久人搡人人玩人妻精品首页| 中文字幕日本人妻久久久免费| 91精品国产高清久久久久久91 | 久久97久久97精品免视看秋霞| 97精品依人久久久大香线蕉97| 久久国产乱子精品免费女| 亚洲精品美女久久777777| 亚洲国产成人久久综合碰| 国内精品久久久久久久涩爱| 久久国产精品77777| 欧美精品国产综合久久| 久久久久亚洲AV综合波多野结衣 | 亚洲∧v久久久无码精品| 久久久久99精品成人片| 久久久久综合网久久| 亚洲精品无码成人片久久| 久久人人青草97香蕉| 久久精品成人免费国产片小草| 日韩一区二区久久久久久| 成人资源影音先锋久久资源网| 成人午夜精品无码区久久| 久久久久久久波多野结衣高潮| 久久这里都是精品| 国产精品久久久久a影院| 三级三级久久三级久久| 久久综合亚洲色HEZYO社区| 久久无码专区国产精品发布| 久久这里只有精品首页|