title: gcc std::vector _M_start bigger then _M_Finish
body: <p>when examining the information from a core-file generated by a segmentation fault I noticed that the cause of the crash is that an std::vector is trying to emplace_back an object at the adress 0x1.</p>
  
  <p>It looks like this:</p>
  
  <pre><code>print myvec
  $1 = [...] = {
      _M_impl = {&lt;std::allocator&lt;Action&gt;&gt; = [...], _M_start = 0x60, _M_finish = 0x1, _M_end_of_storage = 0x31}}, &lt;No data fields&gt;}
  </code></pre>
  
  <p>What I noticed is that _M_start is bigger then _M_finish which doesn't make sense at all, as the size of a vector is calculated as </p>
  
  <pre><code>size() const _GLIBCXX_NOEXCEPT
         { return size_type(this-&gt;_M_impl._M_finish - this-&gt;_M_impl._M_start); }
  </code></pre>
  
  <p>which would mean that the size is "negative". So no wonder it crashes, but I do have no idea why that is? What could be the cause of such behavior? I already double checked and I don't try to link corrupted or old library files together.</p>
  
  <p>The value type of the vector contains an union, but the data of it seems to be correct when I print it. Do you have any ideas how to further proceed with debugging this? </p>