• <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
            • 深海羚羊
            • 似雨打芭蕉,似風吹梧桐葉,帶著一絲冰冷,也帶著一絲清新------冰柔語絲

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久综合偷偷噜噜噜色| 久久精品国产亚洲av麻豆蜜芽| 亚洲综合熟女久久久30p| 久久精品国产亚洲AV不卡| 亚洲人成伊人成综合网久久久| 国产精品久久精品| 欧美精品丝袜久久久中文字幕 | 久久精品国产一区二区电影| 亚洲精品午夜国产va久久| 久久久久亚洲精品无码蜜桃| 精品久久久久久无码中文字幕| 久久亚洲国产最新网站| 精品久久久久久综合日本| 免费精品国产日韩热久久| 日本久久久精品中文字幕| 欧美亚洲国产精品久久高清| 精品久久久久久国产免费了| 久久精品国产亚洲精品2020| 女人高潮久久久叫人喷水| 99精品久久久久久久婷婷| 久久精品国产亚洲av高清漫画| 久久综合久久性久99毛片| 国产成人久久精品二区三区| 久久人爽人人爽人人片AV| 无码八A片人妻少妇久久| 久久精品成人影院| 中文字幕亚洲综合久久2| 2022年国产精品久久久久| 久久青青草原亚洲av无码app| 一级女性全黄久久生活片免费| 久久国产免费直播| 丁香久久婷婷国产午夜视频| 99久久亚洲综合精品网站| 久久精品国产影库免费看| 久久91亚洲人成电影网站| 国产精品久久久久无码av| 久久精品国产亚洲AV无码娇色| 日韩精品久久久久久久电影蜜臀 | 国产精品伦理久久久久久| 久久综合九色综合欧美狠狠| 99麻豆久久久国产精品免费|