• <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 - 34,  comments - 5,  trackbacks - 0

            I hate crashes that disappear when run under the debugger and I had one when
            porting mupdf to Windows.

            It helps to know that there’s at least one reason for a changed behavior under
            the debugger: it automatically triggers using debugging heap. While debugging
            heap usually helps find problems, sometimes it does the opposite by changing
            the details of memory allocation.

            One helpful tool when debugging memory problems on Windows is gflags which can
            enable page heap instrumentation for a given program. It works by putting each
            allocation into a separate region of memory and putting a non-readable page
            right after that. Also, upon freeing it makes the memory unreadable. That way
            an overwrite of memory block while it’s still being used or accessing the
            memory after it was freed will cause immediate crash.

            The downside is that using gflags uses much more memory. But in those days of
            cheap gigabytes it’s not a problem that can’t be solved with a couple hundred
            bucks.

            Basic usage of gflags.exe is simple:
            gflags /p /full /enable foo.exe

            From now on foo.exe will always be run with this instrumentation turned on. To
            disable, do
            gflags /p /disable foo.exe

            To see which programs have page heap enabled, do gflags /p. gflags offers many
            other option and you can learn about them via gflags /?. If you run gflags
            without any options, you’ll get a (very confusing) GUI.

            It worked like a charm. I got a crash on accessing freed memory and all I had
            to do was to backtrack to where this memory was allocated to figure out the
            problem.

            reference: http://blog.kowalczyk.info/article/gflags-a-debugging-story.html

            posted on 2009-07-14 12:47 披星戴月 閱讀(564) 評論(0)  編輯 收藏 引用 所屬分類: c/c++
            <2008年10月>
            2829301234
            567891011
            12131415161718
            19202122232425
            2627282930311
            2345678

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章檔案

            相冊

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久综合丝袜日本网| 久久久久亚洲av无码专区导航| 久久美女网站免费| 国产福利电影一区二区三区久久老子无码午夜伦不 | 久久久高清免费视频| 欧洲精品久久久av无码电影| 久久这里只精品国产99热| 少妇被又大又粗又爽毛片久久黑人| 亚洲国产精品无码久久98| 国内精品久久久久久不卡影院| 亚洲综合伊人久久大杳蕉| 国产精品久久国产精麻豆99网站| 性欧美大战久久久久久久| Xx性欧美肥妇精品久久久久久| 久久久亚洲AV波多野结衣 | 亚洲国产成人精品女人久久久 | 久久午夜夜伦鲁鲁片免费无码影视| 久久久久久亚洲AV无码专区| 色综合久久天天综线观看| 99久久精品免费看国产一区二区三区 | 91久久香蕉国产熟女线看| 久久精品国产AV一区二区三区| 国产免费久久精品丫丫| 热99re久久国超精品首页| 九九久久自然熟的香蕉图片| 精品久久亚洲中文无码| 一本一本久久a久久精品综合麻豆| 久久青草国产手机看片福利盒子| 久久99久久99精品免视看动漫| 漂亮人妻被黑人久久精品| 免费精品久久天干天干| 亚洲国产成人精品女人久久久 | 亚洲欧美久久久久9999| 国产精品欧美久久久久天天影视 | 久久久无码人妻精品无码| 综合网日日天干夜夜久久 | 中文字幕无码av激情不卡久久| 久久精品国产99久久香蕉| 精品久久人人妻人人做精品| 久久久久99精品成人片牛牛影视| 免费精品久久久久久中文字幕|