Segmentation fault when passing std::vector by reference
<p>I prepared some code to show the problem:</p>

<pre><code>void fun1 ()
{
        std::vector&lt;int&gt; h;
        fun2 (h);
}

void fun2 (std::vector&lt;int&gt; &amp;h)
{
        int n = 100;
        h.clear();
        for (int i = 0; i &lt; n; i++)
                h.push_back (0);
}
</code></pre>

<p>I get seg fault for line 12, <code>h.push_back (0);</code></p>

<p>Without that line I don't get seg fault.</p>

<p>Basically what I need is to create <code>std::vector</code> in one function and pass it by reference to another function that will modify it.</p>
