• <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) 評(píng)論(0)  編輯 收藏 引用

            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            <2025年6月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            293012345

            常用鏈接

            留言簿(1)

            隨筆檔案

            Friend

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

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            国产欧美久久久精品| 午夜精品久久影院蜜桃| 国内精品久久久久影院日本 | 亚洲精品乱码久久久久久蜜桃| 四虎影视久久久免费观看| 浪潮AV色综合久久天堂| 亚洲伊人久久精品影院 | 伊人久久精品线影院| 日本欧美久久久久免费播放网| 久久久久久久综合日本亚洲| 深夜久久AAAAA级毛片免费看| 亚洲国产精品无码久久一区二区| 2021国产成人精品久久| 综合久久国产九一剧情麻豆| 国产精品日韩欧美久久综合| 久久亚洲精品人成综合网| 久久久免费观成人影院 | 久久亚洲日韩看片无码| 国产精品一区二区久久精品| 性高湖久久久久久久久| 伊人久久无码精品中文字幕| 国产91久久综合| 精品少妇人妻av无码久久| 中文字幕无码久久久| 久久久久18| 久久99精品久久久久久9蜜桃| 国产精品一区二区久久精品| 天天躁日日躁狠狠久久| 久久精品久久久久观看99水蜜桃 | 国产精自产拍久久久久久蜜| 久久亚洲精品中文字幕三区| 久久精品国产亚洲网站| 久久国产乱子伦精品免费强| 国产精品久久久久久| 久久久噜噜噜久久熟女AA片| 久久精品国产久精国产| 久久九九精品99国产精品| 久久久久久久久无码精品亚洲日韩| 蜜臀av性久久久久蜜臀aⅴ| 欧美亚洲色综久久精品国产| 久久成人国产精品|