<div dir="ltr"><div class="gmail_default" style="color:rgb(0,0,0)">Hi <span style="font-size:12.8000001907349px;color:rgb(34,34,34)"> </span><span style="font-size:12.8000001907349px;color:rgb(34,34,34)">Jean-Marc,</span></div><div class="gmail_default" style="color:rgb(0,0,0)"><span style="font-size:12.8000001907349px;color:rgb(34,34,34)"><br></span></div><div class="gmail_default" style="color:rgb(0,0,0)"><span style="font-size:12.8000001907349px;color:rgb(34,34,34)">Could you please update if you got a chance to look into. As I mentioned, I don&#39;t see the same issue in 1.1.1, but I don&#39;t see any difference in 1.1.1 other than optimization based on the architecture. This optimization could have fixed some stack overflow issue in some specific cases?</span></div><div class="gmail_default" style="color:rgb(0,0,0)"><span style="font-size:12.8000001907349px;color:rgb(34,34,34)"><br></span></div><div class="gmail_default" style="color:rgb(0,0,0)"><span style="font-size:12.8000001907349px;color:rgb(34,34,34)"><br></span></div><div class="gmail_default" style="color:rgb(0,0,0)"><span style="font-size:12.8000001907349px;color:rgb(34,34,34)">Thanks</span></div><div class="gmail_default" style="color:rgb(0,0,0)"><span style="font-size:12.8000001907349px;color:rgb(34,34,34)">Suresh</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 April 2015 at 12:39, Suresh Thiriveedi <span dir="ltr">&lt;<a href="mailto:sthiriveedi@gmail.com" target="_blank">sthiriveedi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="color:rgb(0,0,0)">Hi Jean-Marc,</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">Thanks for your response. Please find the details as below.</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><b><u>Backtrace we got for this crash:</u></b></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><p class="MsoNormal">#0  0x0000000000800c54 in opus_decode_frame
(st=0x38906b8f99d09c5,</p>

<p class="MsoNormal">    data=0xf0aa10b4ef1008ae &lt;Address
0xf0aa10b4ef1008ae out of bounds&gt;, len=-188613428, pcm=0x6e80016085efd57,</p>

<p class="MsoNormal">    frame_size=44037315, decode_fec=58716895)
at src/opus_decoder.c:384</p><p class="MsoNormal"><br></p>

<p class="MsoNormal">#1  0x00000000008009c0 in opus_decode_frame
(st=0x712357d0,</p>

<p class="MsoNormal">    data=0x7effff9ab72d &quot;~<span style="font-family:Arial,sans-serif">▒</span>`\\<span style="font-family:Arial,sans-serif">▒</span>K\005<span style="font-family:Arial,sans-serif">▒▒</span>y<span style="font-family:Arial,sans-serif">▒</span>w+g~<span style="font-family:Arial,sans-serif">▒</span>S2\025<span style="font-family:Arial,sans-serif">▒</span>\036T<span style="font-family:Arial,sans-serif">▒</span>\002x<span style="font-family:Arial,sans-serif">▒▒</span>h!<span style="font-family:Arial,sans-serif">▒▒▒</span>\220\233\066s<span style="font-family:Arial,sans-serif">▒</span>\030#gb\rn<span style="font-family:Arial,sans-serif">▒</span>rF\005Q<span style="font-family:Arial,sans-serif">▒</span>\213;<span style="font-family:Arial,sans-serif">▒</span>`\207$O<span style="font-family:Arial,sans-serif">▒</span>(m\222=9<span style="font-family:Arial,sans-serif">▒▒</span>/h<span style="font-family:Arial,sans-serif">▒▒</span>t<span style="font-family:Arial,sans-serif">▒▒</span>E<span lang="KO" style="font-family:Gulim,sans-serif">묳</span>w<span style="font-family:Arial,sans-serif">▒</span>\237\&quot;\206z\005\213»u@e&quot;,
len=88, pcm=0x7effff9a6a80, frame_size=640, decode_fec=0) at
src/opus_decoder.c:319</p><p class="MsoNormal"><br></p>

<p class="MsoNormal">#2  0x0000000000801be1 in opus_decode_native
(st=0x712357d0,</p>

<p class="MsoNormal">    data=0x7effff9ab72d &quot;~<span style="font-family:Arial,sans-serif">▒</span>`\\<span style="font-family:Arial,sans-serif">▒</span>K\005<span style="font-family:Arial,sans-serif">▒▒</span>y<span style="font-family:Arial,sans-serif">▒</span>w+g~<span style="font-family:Arial,sans-serif">▒</span>S2\025<span style="font-family:Arial,sans-serif">▒</span>\036T<span style="font-family:Arial,sans-serif">▒</span>\002x<span style="font-family:Arial,sans-serif">▒▒</span>h!<span style="font-family:Arial,sans-serif">▒▒▒</span>\220\233\066s<span style="font-family:Arial,sans-serif">▒</span>\030#gb\rn<span style="font-family:Arial,sans-serif">▒</span>rF\005Q<span style="font-family:Arial,sans-serif">▒</span>\213;<span style="font-family:Arial,sans-serif">▒</span>`\207$O<span style="font-family:Arial,sans-serif">▒</span>(m\222=9<span style="font-family:Arial,sans-serif">▒▒</span>/h<span style="font-family:Arial,sans-serif">▒▒</span>t<span style="font-family:Arial,sans-serif">▒▒</span>E<span lang="KO" style="font-family:Gulim,sans-serif">묳</span>w<span style="font-family:Arial,sans-serif">▒</span>\237\&quot;\206z\005\213»u@e&quot;,
len=89, pcm=0x7effff9a6a80, frame_size=640, decode_fec=0, self_delimited=0,</p>

<p class="MsoNormal">    packet_offset=0x0, soft_clip=1) at
src/opus_decoder.c:681</p><p class="MsoNormal"><br></p>

<p class="MsoNormal">#3  0x000000000080226c in opus_decode (st=0x712357d0,</p>

<p class="MsoNormal">    data=0x7effff9ab72c &quot;<span style="font-family:Arial,sans-serif">▒</span>~<span style="font-family:Arial,sans-serif">▒</span>`\\<span style="font-family:Arial,sans-serif">▒</span>K\005<span style="font-family:Arial,sans-serif">▒▒</span>y<span style="font-family:Arial,sans-serif">▒</span>w+g~<span style="font-family:Arial,sans-serif">▒</span>S2\025<span style="font-family:Arial,sans-serif">▒</span>\036T<span style="font-family:Arial,sans-serif">▒</span>\002x<span style="font-family:Arial,sans-serif">▒▒</span>h!<span style="font-family:Arial,sans-serif">▒▒▒</span>\220\233\066s<span style="font-family:Arial,sans-serif">▒</span>\030#gb\rn<span style="font-family:Arial,sans-serif">▒</span>rF\005Q<span style="font-family:Arial,sans-serif">▒</span>\213;<span style="font-family:Arial,sans-serif">▒</span>`\207$O<span style="font-family:Arial,sans-serif">▒</span>(m\222=9<span style="font-family:Arial,sans-serif">▒▒</span>/h<span style="font-family:Arial,sans-serif">▒▒</span>t<span style="font-family:Arial,sans-serif">▒▒</span>E<span lang="KO" style="font-family:Gulim,sans-serif">묳</span>w<span style="font-family:Arial,sans-serif">▒</span>\237\&quot;\206z\005\213»u@e&quot;,
len=89, pcm=0x71245a60, frame_size=640, decode_fec=0) at src/opus_decoder.c:867</p><p class="MsoNormal"><br></p>

<p class="MsoNormal">#4  0x00000000004fd6b5 in kn_opus_decode
(decHandle=0x712357d0, decProp=0x1675698, src=0x16756d0, dest=0x71245a60,</p>

<p class="MsoNormal">    dstLen=0x1673210) at
MSTranscodeOPUS.c:100</p></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><b><u>And the code flow what we have observed for this specific incident:</u></b></div><div class="gmail_default" style="color:rgb(0,0,0)"><b><u><br></u></b></div><div class="gmail_default" style="color:rgb(0,0,0)"><b><u>Called this as mode is CELT_ONLY,</u></b></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default"><div class="gmail_default" style="color:rgb(0,0,0)">   if (data!=NULL &amp;&amp; st-&gt;prev_mode &gt; 0 &amp;&amp; (</div><div class="gmail_default" style="color:rgb(0,0,0)">       (mode == MODE_CELT_ONLY &amp;&amp; st-&gt;prev_mode != MODE_CELT_ONLY &amp;&amp; !st-&gt;prev_redundancy)</div><div class="gmail_default" style="color:rgb(0,0,0)">    || (mode != MODE_CELT_ONLY &amp;&amp; st-&gt;prev_mode == MODE_CELT_ONLY) )</div><div class="gmail_default" style="color:rgb(0,0,0)">      )</div><div class="gmail_default" style="color:rgb(0,0,0)">   {</div><div class="gmail_default" style="color:rgb(0,0,0)">      <u>transition = 1</u>;</div><div class="gmail_default" style="color:rgb(0,0,0)">      /* Decide where to allocate the stack memory for pcm_transition */</div><div class="gmail_default" style="color:rgb(0,0,0)">      if (mode == MODE_CELT_ONLY)</div><div class="gmail_default" style="color:rgb(0,0,0)">         pcm_transition_celt_size = F5*st-&gt;channels;</div><div class="gmail_default" style="color:rgb(0,0,0)">      else</div><div class="gmail_default" style="color:rgb(0,0,0)">         pcm_transition_silk_size = F5*st-&gt;channels;</div><div class="gmail_default" style="color:rgb(0,0,0)">   }</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><b><u>So transition is made as 1 called this,</u></b></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default"><div class="gmail_default" style="color:rgb(0,0,0)">   if (transition &amp;&amp; mode == MODE_CELT_ONLY)</div><div class="gmail_default" style="color:rgb(0,0,0)">   {</div><div class="gmail_default" style="color:rgb(0,0,0)">      pcm_transition = pcm_transition_celt;</div><div class="gmail_default" style="color:rgb(0,0,0)">      opus_decode_frame(st, NULL, 0, pcm_transition, IMIN(F5, audiosize), 0);</div><div class="gmail_default" style="color:rgb(0,0,0)">   }</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><b><u>In &quot;opus_decode_frame&quot; again, as data is passed as NULL, goes to else part</u></b></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default"><div class="gmail_default" style="color:rgb(0,0,0)">   if (data != NULL)</div><div class="gmail_default" style="color:rgb(0,0,0)">   {</div><div class="gmail_default" style="color:rgb(0,0,0)">      audiosize = st-&gt;frame_size;</div><div class="gmail_default" style="color:rgb(0,0,0)">      mode = st-&gt;mode;</div><div class="gmail_default" style="color:rgb(0,0,0)">      ec_dec_init(&amp;dec,(unsigned char*)data,len);</div><div class="gmail_default"><font color="#000000"> </font><font color="#b45f06">  } else {</font></div><div class="gmail_default" style="color:rgb(0,0,0)">      audiosize = frame_size;</div><div class="gmail_default" style="color:rgb(0,0,0)">      mode = st-&gt;prev_mode;</div><div style="color:rgb(0,0,0)"><br></div></div><div style="color:rgb(0,0,0)"><b><u>As the mode is made as prev mode now, which was a silk, this goes inside,</u></b></div><div style="color:rgb(0,0,0)"><br></div><div><div style="color:rgb(0,0,0)">  /* SILK processing */</div><div style="color:rgb(0,0,0)">   if (mode != MODE_CELT_ONLY)</div><div style="color:rgb(0,0,0)">   {</div><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)"><b><u>Then in this function called this</u></b>,</div><div style="color:rgb(0,0,0)"><br></div><div><div><font color="#000000">        silk_ret = silk_Decode( silk_dec, &amp;st-&gt;DecControl,</font></div><div><font color="#000000">                                lost_flag, first_frame, &amp;dec, pcm_ptr, &amp;silk_frame_size );</font></div></div><div style="color:rgb(0,0,0)"><br></div></div><div style="color:rgb(0,0,0)"><br></div><div><b><u><font color="#cc0000">And finally, somehow, the &quot;silk_frame_size&quot; is a negative value ( say </font><span style="font-family:Calibri,sans-serif;font-size:11pt"><font color="#cc0000">-1376272 in our case), then in the same function called the below and this crashes here</font><font color="#660000">.</font></span></u></b></div><div style="color:rgb(0,0,0)"><span style="font-family:Calibri,sans-serif;font-size:11pt;color:rgb(34,34,34)"><br></span></div><div><font face="Calibri, sans-serif"><span style="font-size:14.6666669845581px"> pcm_ptr += silk_frame_size * st-&gt;channels;</span></font><br></div><div><font face="Calibri, sans-serif"><span style="font-size:14.6666669845581px"><br></span></font></div><div><font face="Calibri, sans-serif"><span style="font-size:14.6666669845581px"><br></span></font></div><div><font face="Calibri, sans-serif"><span style="font-size:14.6666669845581px">Please help.</span></font></div><div><br></div><div><font face="Calibri, sans-serif"><span style="font-size:14.6666669845581px">Thanks</span></font></div><span class="HOEnZb"><font color="#888888"><div><font face="Calibri, sans-serif"><span style="font-size:14.6666669845581px">Suresh</span></font></div><div><font face="Calibri, sans-serif"><span style="font-size:14.6666669845581px"><br></span></font></div></font></span></div><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)"><br></div></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 12 April 2015 at 21:23, Jean-Marc Valin <span dir="ltr">&lt;<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Do you have any file that demonstrates the problem with either opus_demo<br>
or opusdec?<br>
<br>
        Jean-Marc<br>
<div><div><br>
On 09/04/15 04:01 AM, Suresh Thiriveedi wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m curious to know when would be the 1.1.1 stable version available.<br>
&gt;<br>
&gt; In 1.1, we are facing crash when opus library is trying to decode the<br>
&gt; CELT-only, full band and 20 ms. So we tried with 1.1.1 beta and it looks<br>
&gt; to be fine. Is there any open issue regarding this in 1.1 version?<br>
&gt;<br>
&gt; Thanks<br>
&gt; Suresh<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; opus mailing list<br>
&gt; <a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a><br>
&gt; <a href="http://lists.xiph.org/mailman/listinfo/opus" target="_blank">http://lists.xiph.org/mailman/listinfo/opus</a><br>
&gt;<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>