Re: segmentation fault

Federico Montesino Pouzols <[email protected]>
Newsgroups gmane.comp.gnu.ccrtp.devel
Message-ID <20051201170347.GA7827@paraguas>
Oooops. I've just fixed it in CVS as well as some other pending
issues. I also added some code to use getUser.

On Sun, Nov 27, 2005 at 05:23:06AM -0400, David Sugar wrote:
> I am away in Venezuela until Tuesday, so I think Federico will get a 
> chance to look at this first, but it is very streightforward.  In any 
> case, I think it should make the next release.  Incidently, there is a 
> Common C++ function to get user login id, Process::getUser(), it is 
> portable, and maybe that is what should be used here.  On posix it does 
> the user lookup by matching the uid of the process to the passwd file 
> rather than using the environment.  On w32, it uses "GetUserName".
> 
> Michel de Boer wrote:
> >Hi David, Federico,
> >
> >I have been debugging a segmentation fault that only happened on
> >one machine. After a lot of debugging I found the cause. The
> >backtrace I get is:
> >
> >#7  0x41161903 in strlen () from /lib/tls/libc.so.6
> >#8  0x401b59eb in ost::RTPApplication::findCNAME (this=0x0)
> >    at char_traits.h:143
> >#9  0x401b5c49 in RTPApplication (this=0x401c9d80, cname=@0xbfffe2a0)
> >    at source.cpp:161
> >#10 0x401b5d16 in ost::defaultApplication () at stl_alloc.h:652
> >#11 0x081ad0dc in t_twinkle_rtp_session (this=0x84bb668, host=@0x0,
> >    port=5004) at twinkle_rtp_session.cpp:6
> >#12 0x081a0b1f in t_audio_session (this=0x83acd10, _session=0x84ae35c,
> >    _recv_host=@0x82290e8, _recv_port=5004, _dst_host=@0x845d018,
> >    _dst_port=12668, _codec=139125596, _ptime=20) at basic_string.h:716
> >
> >I found that this crash can happen for 2 reasons:
> >
> >1) LOGNAME is not set
> >2) The hostname is not in /etc/hosts
> >
> >In both cases ccrtp tries to use a NULL pointer.
> >
> >Attached you find a patch that fixes the problem. I hope you will fix
> >this in the next release.
> >
> >Best regards,
> >Michel
> >
> >
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.