Summary:ASTERISK-11301: [patch] prevent a segfault when loading
Reporter:Clod Patry (junky)Labels:
Date Opened:2008-01-24 20:48:52.000-0600Date Closed:2008-01-25 08:50:43.000-0600
Versions:Frequency of
Environment:Attachments:( 0) state.diff
Description:(gdb) bt
#0  add_to_interfaces (interface=0x0) at /usr/src/asterisk-trunk/include/asterisk/strings.h:180
#1  0xb6e14a30 in add_to_queue (queuename=<value optimized out>, interface=0xb6e5e92c "SIP/10", membername=0xb6e5e937 "SIP/10", penalty=0, paused=0,
   dump=0, state_interface=0x0) at app_queue.c:3711
#2  0xb6e16083 in load_module () at app_queue.c:3974
#3  0x080ce43c in load_resource (resource_name=0x81fac7c "app_queue.so", global_symbols_only=0) at loader.c:685
#4  0x080cf36c in ast_load_resource (resource_name=0x81fac7c "app_queue.so") at loader.c:717
ASTERISK-1  0x08094e6a in handle_load (e=0x818dd64, cmd=-4, a=0xb6e61e8c) at cli.c:160
ASTERISK-2  0x08093e1e in ast_cli_command (fd=20, s=0xb6e61ed8 "module load app_queue.so") at cli.c:1877
ASTERISK-3  0x080940a7 in ast_cli_command_multiple (fd=20, size=25, s=0xb6e62128 "module load app_queue.so") at cli.c:1910
ASTERISK-4  0x08073337 in netconsole (vconsole=0x81ac960) at asterisk.c:1006
ASTERISK-5  0x0812eefb in dummy_start (data=0x81f0508) at utils.c:857
ASTERISK-6 0xb7e0b46b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
ASTERISK-7 0xb7d136de in clone () from /lib/tls/i686/cmov/libc.so.6


Comments:By: Clod Patry (junky) 2008-01-24 20:49:25.000-0600

real svn rev is 100095.

By: Mark Michelson (mmichelson) 2008-01-25 08:47:54.000-0600

I see what the problem is, but I'm actually going to fix it differently. I mistakenly made it so that add_to_interfaces could be attempting to add a NULL pointer in a few places, so i'm going to replace that with a guaranteed non-NULL value instead of printing that message. Thanks for submitting the bug report!

By: Digium Subversion (svnbot) 2008-01-25 08:50:43.000-0600

Repository: asterisk
Revision: 100344

U   trunk/apps/app_queue.c

r100344 | mmichelson | 2008-01-25 08:50:43 -0600 (Fri, 25 Jan 2008) | 6 lines

Insure that we are not going to pass a NULL pointer to add_to_interfaces.

(closes issue ASTERISK-11301)
Reported by: junky