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

Frank Tarczynski ftarz at mindspring.com
Sat Jun 9 23:10:26 CDT 2007


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


More information about the asterisk-users mailing list