crash with gcc and -Os on iOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 17, 2010 at 3:59 PM,  <s.marek at avm.de> wrote:
> No, that doesn't fix it.


Okay, PJ_UNUSED_ARG() would probably be optimized out by the compiler
(and that's the objective of PJ_UNUSED_ARG in the first place
actually).

> What does, without being too much of a hack, is
> dynamically allocating the memory for tmp_hdr, instead of putting it on
> the stack.
>

It's still too "heavy". As you know we don't use malloc, and changing
it to use dlg->pool would add to the memory usage of the dialog.

Can we fool gcc with something like this:

   pjsip_generic_array_hdr  tmp_hdr_buf;
   pjsip_generic_array_hdr  *tmp_hdr = &tmp_hdr_buf;


> Still, seems unnecessary, because that tmp_hdr on the stack looks pretty
> ok to me, from an application programmers point of view. Maybe one should
> ask the GCC folks, what they think about it?
>

You can try, but I'unless you can simplify the problem into a simple
compilable program, I would imagine nobody will be interested in
looking into that. Besides, even if this is fixed in newer gcc
version, it will still take months before the fix gets to Apple, and
even then somebody would still face the problem until they upgrade the
compiler.

> I would still be interested, if that is related to the Apple GCC version,
> or if someone who is building PJSIP on Linux/Unix is able to reproduce
> this issue?
>

It's fine here. gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5), x86_64,
-Os, made/received call with pjsua. But I've kind of guessed that.
>From past experience, this usually is version/platform specific thing.
Here are two more weird gcc issues in the past:
 https://trac.pjsip.org/repos/ticket/766
 https://trac.pjsip.org/repos/ticket/683

Thanks
 Benny

> Sebastian.
>
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux