• <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)  編輯 收藏 引用
            <2025年5月>
            27282930123
            45678910
            11121314151617
            18192021222324
            25262728293031
            1234567

            常用鏈接

            留言簿(1)

            隨筆檔案

            Friend

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

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            国产国产成人久久精品| 久久亚洲欧美国产精品| 国产91久久综合| 久久综合九色综合欧美就去吻| 亚洲国产香蕉人人爽成AV片久久| 老司机午夜网站国内精品久久久久久久久 | 伊人久久大香线蕉av不变影院| 亚洲人成网亚洲欧洲无码久久| 久久er99热精品一区二区| 久久精品国产清自在天天线| 亚洲中文字幕久久精品无码喷水| 香港aa三级久久三级| 99精品国产99久久久久久97| 国产精品99久久不卡| 久久夜色精品国产噜噜亚洲AV| 精品多毛少妇人妻AV免费久久| 蜜臀av性久久久久蜜臀aⅴ| 国产免费久久精品丫丫| 国产精品久久久久9999高清| 久久亚洲AV无码精品色午夜麻豆 | 亚洲中文精品久久久久久不卡| 久久婷婷国产麻豆91天堂| 久久婷婷五月综合97色一本一本| 亚洲国产综合久久天堂 | 亚洲精品高清国产一线久久| 久久国产成人午夜aⅴ影院| 久久久精品国产sm调教网站 | 久久久久婷婷| 亚洲狠狠久久综合一区77777| 久久亚洲私人国产精品vA| 久久SE精品一区二区| 综合久久久久久中文字幕亚洲国产国产综合一区首| 国内精品久久久久影院优 | 91麻精品国产91久久久久| 99久久超碰中文字幕伊人| 久久精品国产亚洲av麻豆小说 | 久久电影网2021| 超级碰久久免费公开视频| 国产毛片久久久久久国产毛片| 亚洲国产成人久久综合碰碰动漫3d | 日本WV一本一道久久香蕉|