[opus] Stack Overflow

Fezin E T fezinet at tataelxsi.co.in
Tue May 28 02:28:27 PDT 2013


I got over the stack overflow issue it seems. I was using destroy() API to free the encoder or decoder instance memory. In that function, Only the structure opusEncoder is getting freed. When I used create() call to allocate memory, it used get_size() function in which size it returned combined sizeof(struct OpusEncoder) + silkEncSizeBytes + celtEncSizeBytes. Now in destroy() I called get_size again and freed entire memory and the issue is fixed! I can turn on any number of times in real time without any issue.

Thank You guys for your time!


Best Regards
Fezin E T

On 5/27/2013 8:50 PM, Jean-Marc Valin wrote:

Did you try replacing the create() with separate malloc() and init()
steps. If so, which of the two was causing the problems?

BTW, you need a C99 compiler for VAR_ARRAYS to work, although you may be
able to use USE_ALLOCA.

        Jean-Marc

On 05/27/2013 08:36 AM, Fezin E T wrote:


Guys,

Program stack is getting overflowed when I create and destroy encoder
instance continuously for around 30 times. How can I ensure stack is
completely freed when I destroy the encoder instance? I tried with
VAR_ARRAYS. But Its giving me errors while I try to compile.  I suppose
VAR_ARRAYS allocates local variables as arrays so that they could go on
to stack and finally when we leave the function, the stack is freed.
when I use VAR_ARRAYS, I get this error " declarations may not appear
after an executable statement in the block".  Is there any changes need
to be done in stack_alloc.h ? Have you guys faced same trouble or any
fix is already done on this issue?
My platform is TI C6424, CCS  and windows.

--

Best Regards

Fezin E T

Senior Engineer - Systems Business Unit | Design And Development
TATA ELXSI

Technopark CampusTrivandrum 695 581 India

Tel +91 471 666 1117

_www.tataelxsi.com <http://www.tataelxsi.com/><http://www.tataelxsi.com/>_

Notice: The information contained in this e-mail message and/or
attachments to it may contain confidential or privileged information. If
you are not the intended recipient, any dissemination, use, review,
distribution, printing or copying of the information contained in this
e-mail message and/or attachments to it are strictly prohibited. If you
have received this communication in error, please notify us by reply
e-mail or telephone and immediately and permanently delete the message
and any attachments. Thank you


_______________________________________________
opus mailing list
opus at xiph.org<mailto:opus at xiph.org>
http://lists.xiph.org/mailman/listinfo/opus





.



Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/opus/attachments/20130528/58afee6f/attachment.htm 


More information about the opus mailing list