• <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 披星戴月 閱讀(567) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): c/c++
            <2009年7月>
            2829301234
            567891011
            12131415161718
            19202122232425
            2627282930311
            2345678

            常用鏈接

            留言簿(2)

            隨筆分類(lèi)

            隨筆檔案

            文章檔案

            相冊(cè)

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            一本色道久久综合亚洲精品| 久久久久四虎国产精品| 久久综合伊人77777| 久久久久av无码免费网| 热re99久久精品国99热| 国产高潮国产高潮久久久91 | 日本免费久久久久久久网站| 国产—久久香蕉国产线看观看| 久久无码AV中文出轨人妻| 国内精品久久久人妻中文字幕| 99久久免费国产精品| 亚洲午夜久久久久久久久久| 国产精品欧美亚洲韩国日本久久| 思思久久99热只有频精品66| 青青青伊人色综合久久| 亚洲中文久久精品无码| 欧美久久亚洲精品| 91秦先生久久久久久久| 久久精品一本到99热免费| 久久精品国产亚洲AV不卡| 久久香蕉国产线看观看精品yw| 青青久久精品国产免费看| 九九久久99综合一区二区| 久久精品国产色蜜蜜麻豆| 老司机午夜网站国内精品久久久久久久久| 久久精品国产亚洲AV大全| 久久人人爽人人爽人人片av麻烦| 精品久久久久久国产牛牛app| 久久精品国产清高在天天线| 亚洲va中文字幕无码久久不卡| 久久久久久毛片免费看| 精品久久久久久无码国产| 热久久国产精品| 国产精品久久久久久久午夜片| 欧美久久精品一级c片片| 情人伊人久久综合亚洲| 国产国产成人久久精品| 99久久国产热无码精品免费久久久久| 国内精品伊人久久久久AV影院| 久久狠狠高潮亚洲精品| 99久久99这里只有免费的精品|