• <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)論排行榜

            国产成人久久激情91| 欧美综合天天夜夜久久| 久久无码AV中文出轨人妻| 久久久久无码中| 精品国产乱码久久久久久呢 | 色婷婷综合久久久中文字幕| 模特私拍国产精品久久| 精品综合久久久久久888蜜芽| 精品久久综合1区2区3区激情| 久久精品国产99国产精品亚洲 | 亚洲伊人久久综合中文成人网| 综合网日日天干夜夜久久| 久久夜色精品国产亚洲| 无码伊人66久久大杳蕉网站谷歌 | 久久人人爽人人爽人人AV| 久久婷婷国产麻豆91天堂| 国产成人综合久久精品红| 精品久久人人爽天天玩人人妻| 久久大香香蕉国产| 中文字幕日本人妻久久久免费| 国产综合免费精品久久久| 国产精品久久自在自线观看| 久久伊人五月丁香狠狠色| 久久亚洲欧洲国产综合| 97久久精品人人澡人人爽| 97久久久精品综合88久久| 久久久久高潮毛片免费全部播放| 日本WV一本一道久久香蕉| 久久亚洲中文字幕精品一区| 国产成人香蕉久久久久| 精品久久久久久国产三级 | 国产精品久久久香蕉| 久久无码人妻精品一区二区三区| 99久久无码一区人妻| 99久久精品费精品国产| 99久久无码一区人妻| 99久久国产免费福利| 国产亚洲美女精品久久久 | 人妻精品久久无码专区精东影业 | 青青草原综合久久| 国产精品美女久久久久AV福利|