[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sipwitch-devel] Segmentation fault
From: |
David Sugar |
Subject: |
Re: [Sipwitch-devel] Segmentation fault |
Date: |
Sun, 04 Jul 2010 22:08:40 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Lightning/1.0b1 Thunderbird/3.0.4 |
If I were to make a guess, your backtrace is likely from thread.cpp +734
stack::getInterface((struct sockaddr *)&iface,
request_address.getAddr());
Where presumably request_address.getAddr() is NULL because at 733:
request_address.set(uri_host, local_port);
failed to resolve to a valid address. This I determined because only at
stack.cpp +642 is Socket::getinterface called with a pointer that is
passed, and this is wrapped in stack::getInterface(). Other locations
call with an address for a local object.
I think ultimately, this should be changed:
request_address.set(uri_host, local_port);
stack::getInterface((struct sockaddr *)&iface,
request_address.getAddr());
if(request_address.getAddr() == NULL) {
error = SIP_ADDRESS_INCOMPLETE;
goto invalid;
}
Clearly the NULL request_address.getAddr() check should be moved up to
occur before stack::getInterface() is called. The real question though
is then what was originally passed in uri_host?? If you have the core
file still, you may be able to find out...
On 07/04/2010 08:40 PM, John wrote:
> Hi,
>
> I'm getting a segmentation fault in ucommon-3.1.2 on registration of a
> twinkle client to sipwitch.
>
> Running
> sipw -gdb -trace -x9 -foreground
>
> Gives the output below on my sipwitch server
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb620fb70 (LWP 17852)]
> ucc::Socket::getinterface (iface=0xb620f2ac, dest=0x0) at socket.cpp:2824
> 2824 switch(dest->sa_family) {
> (gdb) quit
>
> Any ideas?
>
> Thanks.
>
> Regards,
> John Cahill
dyfet.vcf
Description: Vcard