<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>segmentation-fault</author_name>
  <author_url>https://blog.hatena.ne.jp/segmentation-fault/</author_url>
  <blog_title>コアダンプの数だけ強くなれるよ</blog_title>
  <blog_url>https://segmentation-fault.hatenablog.com/</blog_url>
  <categories>
    <anon>Linux</anon>
    <anon>C/C+</anon>
  </categories>
  <description>C/C++のプログラマーなら一度は悩ませられるであろうメモリ関連のバグ。その内の１つであるメモリ破壊は作りこむのは簡単ですが、後々見つける事が難しくなる場合も多くやっかいな奴です。 今回はそんなメモリ破壊検出の助けとなるツールをいくつか試してみます。 メモリ破壊を起こすソースコード Electric Fenceによる検出 Valgrindによる検出 Mudflapによる検出 まとめ メモリ破壊を起こすソースコード まず、メモリ破壊を起こすサンプルとしてバッファオーバーフローを起こすoverflow.cを準備します。 overflow.c #include &lt;stdio.h&gt; #include …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsegmentation-fault.hatenablog.com%2Fentry%2F2017%2F10%2F22%2F140500&quot; title=&quot;C/C++のメモリ破壊を３種の方法で検出してみる - コアダンプの数だけ強くなれるよ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-10-22 14:05:00</published>
  <title>C/C++のメモリ破壊を３種の方法で検出してみる</title>
  <type>rich</type>
  <url>https://segmentation-fault.hatenablog.com/entry/2017/10/22/140500</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
