[asterisk-users] ast_dynamic_str_thread_build_va() is defined with 6 args but only called with 5 args??

Moises Silva moises.silva at gmail.com
Sun Jun 10 18:58:26 CDT 2007


va_list is a macro used to define optional arguments, so I suppose is
correct to call it with 5 or more arguments. I suggest you to compile
asterisk without optimizations ( search in voip-info.org ) and then
open a bug ( make sure first you read the bug guidelines ) in
bugs.digium.com

Regards

On 6/9/07, Frank Tarczynski <ftarz at mindspring.com> wrote:
> I'm having a problem with asterisk-1.4.4 dumping core under Solaris 10
> with a SIGSEGV error.
>
> gdb gives this stack trace:
>
> #0  0xfebd4d0c in strlen () from /usr/lib/libc.so.1
> #1  0xfec2a386 in _ndoprnt () from /usr/lib/libc.so.1
> #2  0xfec2d4bb in vsnprintf () from /usr/lib/libc.so.1
> #3  0x080e86de in ast_dynamic_str_thread_build_va (buf=0x8172763,
> max_len=0, ts=0x81482a0, append=0, fmt=0x811dc6a "%25.25s  %s\n",
>     ap=0x8046f18 "X'\027\b") at utils.c:969
> #4  0x080890e0 in ast_cli (fd=1, fmt=0x811dc6a "%25.25s  %s\n") at cli.c:69
> #5  0x0808c946 in help1 (fd=1, match=0x0, locked=0) at cli.c:1746
> #6  0x0808ca67 in handle_help (fd=1, argc=0, argv=0x8047080) at cli.c:1773
> #7  0x0808d664 in ast_cli_command (fd=1, s=0x0) at cli.c:1979
> #8  0x08073d0f in main (argc=135695685, argv=0x80471f4) at asterisk.c:1384
>
> I've noticed that ast_dynamic_str_thread_build_va is defined in utils.c
> on line 969:
>
> int ast_dynamic_str_thread_build_va(struct ast_dynamic_str **buf, size_t
> max_len,  struct ast_threadstorage *ts, int append, const char *fmt,
> va_list ap)
>
> and it's called in cli.c on line 69:
>
> res = ast_dynamic_str_thread_set_va(&buf, 0, &ast_cli_buf, fmt, ap);
>
> Most interesting is that the function is defined with 6 arguments and
> only appears to be called with 5(?).  Is this correct?
>
> Frank
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>


-- 
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"


More information about the asterisk-users mailing list