<p>This is using opensips 2.1 at commit <a href="https://github.com/OpenSIPS/opensips/commit/ee99ac71d8718c93c29e28e6a5266287491f17a5" class="commit-link"><tt>ee99ac7</tt></a> in a production environment. OpenSIPS is configured to generate coredump, <a href="https://github.com/OpenSIPS/opensips/files/56763/core.txt">core.txt</a> has <code>bt full</code> + <code>print</code> of variables in last 3 stack entries.</p>

<p>The issue in the code is relatively simple to understand,</p>

<pre><code>pf = n-&gt;prev;
</code></pre>

<p>is followed by</p>

<pre><code>*pf = n-&gt;u.nxt_free;
</code></pre>

<p>(lines 167 and 171 of mem/f_malloc.c) without checking whether <code>n-&gt;prev</code> actually exists. However this is fairly old code so there must be some assumptions that made the test unnecessary at the time — but maybe not anymore, or maybe there's some environment dependency I need to check.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/721">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciXELeWTJEvp4krb6xL_6tcJA71Zzks5pOBhTgaJpZM4Gx0aq.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/721"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>