• <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 閱讀(2028) 評論(0)  編輯 收藏 引用
            <2025年7月>
            293012345
            6789101112
            13141516171819
            20212223242526
            272829303112
            3456789

            常用鏈接

            留言簿(1)

            隨筆檔案

            Friend

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

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            人妻无码精品久久亚瑟影视| 国产精久久一区二区三区| 久久精品无码一区二区app| 青春久久| 精品无码久久久久久午夜| 超级碰久久免费公开视频| 国产日韩欧美久久| 久久综合视频网| 久久精品国产亚洲沈樵| 一本色道久久综合狠狠躁篇 | 久久一区二区免费播放| 久久亚洲精品成人AV| 久久精品国产亚洲5555| 久久久久久国产精品无码超碰| 99久久夜色精品国产网站| 亚洲国产精品18久久久久久| 91精品日韩人妻无码久久不卡| 久久精品综合网| 久久91综合国产91久久精品| 久久久久久国产精品美女| 国产成人精品久久亚洲| 久久久久国产精品熟女影院 | 午夜精品久久久久久影视777| 国产精品久久久久久福利漫画| 久久久久亚洲AV成人网人人网站 | 99久久做夜夜爱天天做精品| 亚洲国产精品久久久久网站 | 久久久久久噜噜精品免费直播 | 91精品国产色综合久久| 国产精品乱码久久久久久软件 | 中文字幕无码久久人妻| 久久国产影院| 久久AAAA片一区二区| 国产精品99久久久久久人| 狠狠色婷婷久久一区二区三区| 亚洲αv久久久噜噜噜噜噜| 天天躁日日躁狠狠久久| 久久综合国产乱子伦精品免费| 久久久亚洲欧洲日产国码aⅴ | 亚洲午夜无码久久久久| 亚洲人成网亚洲欧洲无码久久|