• <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 閱讀(2025) 評論(0)  編輯 收藏 引用
            <2025年6月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            293012345

            常用鏈接

            留言簿(1)

            隨筆檔案

            Friend

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

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            无码专区久久综合久中文字幕| 91精品国产91久久久久久| 国产精品久久久久久久久久影院| 久久中文字幕人妻丝袜| 久久亚洲AV成人无码电影| 国产亚州精品女人久久久久久 | 99久久做夜夜爱天天做精品| 久久综合九色综合网站| 久久久99精品成人片中文字幕| 婷婷久久香蕉五月综合加勒比| 蜜桃麻豆www久久| 综合网日日天干夜夜久久| 久久黄视频| AAA级久久久精品无码区| 久久精品国产亚洲精品2020| 伊人久久一区二区三区无码| 久久免费小视频| 2021久久国自产拍精品| 国产69精品久久久久久人妻精品| 久久久久人妻一区精品| 国内精品久久久久久99蜜桃 | 99精品久久精品一区二区| 国产 亚洲 欧美 另类 久久| 国产精品美女久久久久久2018| 影音先锋女人AV鲁色资源网久久| 久久综合久久鬼色| 婷婷久久精品国产| 亚洲日韩欧美一区久久久久我| 国内精品久久久久久久涩爱 | 久久精品国产精品亚洲精品| 青青草原综合久久大伊人| 一本色道久久综合狠狠躁篇| 青青草国产97免久久费观看| 久久青青草原精品国产软件| 久久精品国产72国产精福利| 日韩久久久久中文字幕人妻| 人人狠狠综合久久亚洲| 91麻豆国产精品91久久久| 性欧美大战久久久久久久久| 国产美女久久精品香蕉69| 99国产精品久久久久久久成人热|