<div dir="ltr">Thanks for reporting this! It is fixed now in trunk.<div><br></div><div>Cheers,</div><div><br></div><div>Ted</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 29, 2014 at 9:51 AM, Konvicka Filip <span dir="ltr">&lt;<a href="mailto:Filip.Konvicka@logis.cz" target="_blank">Filip.Konvicka@logis.cz</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="CS" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I&#39;ve accidentally called sym_set_row_type() with row index equal to the number of rows in the model.  This led to a crash later when Symphony was deallocating the related memory block (I believe this was because I had
 a specific model size so the out-of-range row index led to corruption of the next heap block).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I believe the code that checks the row index is too permissive – it rejects a negative row index and an index strictly greater than the number of rows, but allows the index to be equal to the number of rows.  Similar
 functions that alter the RHS etc. have similar checks that should probably be reviewed as well.  Also this is mentioned in the documentation to these functions.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">In other words, I would change (I think this is in SYMPHONY/src/Master/master.c):<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:black">if (!env-&gt;mip || !env-&gt;mip-&gt;m || index &gt; env-&gt;mip-&gt;m || index &lt; 0 || !env-&gt;mip-&gt;rhs){</span><u></u><u></u></p>


<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US">to<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:black">if (!env-&gt;mip || !env-&gt;mip-&gt;m || index &gt;= env-&gt;mip-&gt;m || index &lt; 0 || !env-&gt;mip-&gt;rhs){</span><span lang="EN-US"><u></u><u></u></span></p>


<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">The condition that tests whether &quot;m&quot; is zero is then not needed (so &quot;!env-&gt;mip-&gt;m&quot; can be omitted).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Filip<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
</div>

<br>_______________________________________________<br>
Symphony mailing list<br>
<a href="mailto:Symphony@list.coin-or.org">Symphony@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/symphony" target="_blank">http://list.coin-or.org/mailman/listinfo/symphony</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Dr. Ted Ralphs<br>Associate Professor, Lehigh University<br>(610) 628-1280<br>ted &#39;at&#39; lehigh &#39;dot&#39; edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>


</div>