• <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 披星戴月 閱讀(577) 評(píng)論(0)  編輯 收藏 引用 所屬分類: c/c++
            <2008年9月>
            31123456
            78910111213
            14151617181920
            21222324252627
            2829301234
            567891011

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章檔案

            相冊(cè)

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            青青国产成人久久91网| 精品久久久久久国产三级| 人妻丰满AV无码久久不卡| 色8久久人人97超碰香蕉987| 狠狠久久亚洲欧美专区| 久久夜色精品国产亚洲| 久久这里只有精品首页| 日韩十八禁一区二区久久| 国产亚洲综合久久系列| 精品久久久久久无码国产| 亚洲国产精品无码成人片久久| 国产成人久久精品一区二区三区| 久久久久综合中文字幕| 久久亚洲欧美日本精品| 亚洲人成无码网站久久99热国产 | 久久国产欧美日韩精品| 久久人人爽人人澡人人高潮AV | 久久亚洲国产精品123区| 久久久久亚洲AV成人片| 人妻精品久久久久中文字幕| 久久成人国产精品二三区| 色欲久久久天天天综合网| 人妻系列无码专区久久五月天| 国产日产久久高清欧美一区| 久久久一本精品99久久精品88| 久久播电影网| 精品99久久aaa一级毛片| 色综合久久最新中文字幕| 久久A级毛片免费观看| 久久综合综合久久综合| 久久久久高潮综合影院| 欧美伊人久久大香线蕉综合| 久久93精品国产91久久综合| 一本大道久久a久久精品综合| 久久精品水蜜桃av综合天堂| 久久久久亚洲av无码专区| 无码人妻精品一区二区三区久久久| 2021国产精品久久精品| 亚洲日韩中文无码久久| 欧美va久久久噜噜噜久久| 精品国际久久久久999波多野|