Re: [Opalvoip-user] [Opalvoip-devel] crash in Lacaille
Brought to you by:
csoutheren,
rjongbloed
|
From: Robert J. <ro...@vo...> - 2014-10-17 15:49:31
|
I can guarantee you the casting is not the problem. There is no difference
in this case between reinterpret cast and an "old style" cast.
Unfortunately, it looks like a "heap corruption" style error, in which case
it could be *anywhere*. PTLib, OPAL, you application, some 3rd party
library, anywhere. These are notoriously difficult to find, and I am unable
to spend that amount of time on helping you. All I can say is I know other
people are using that code and putting millions of calls through it.
Robert Jongbloed
*OPAL/OpenH323/PTLib Architect and Co-founder*.
On 17 October 2014 22:52, Pradeep Kumar <itp...@gm...> wrote:
> Hi Opal team,
>
> I've observed a crash on the OPAL . I am not sure about the exact steps to
> reproduce the crash.Following is the bt of the core file.
>
> (gdb) bt
> #0 0x0000000000000000 in ?? ()
> #1 0x00007fafa344e615 in PBaseArray<unsigned char>::GetAt
> (this=0x7faf6c4d2660, index=1)
> at ptlib-2.14/include/ptlib/array.h:335
> #2 0x00007fafa3466464 in PBaseArray<unsigned char>::operator[]
> (this=0x7faf6c4d2660, index=1)
> at/ptlib-2.14/include/ptlib/array.h:387
> #3 0x00007fafa26920e0 in PASN_BitString::operator[] (this=0x7faf6c4d2638,
> bit=9)
> at ptlib-2.14/src/ptclib/asner.cxx:934
> #4 0x00007fafa26981ad in PASN_Sequence::HasOptionalField
> (this=0x7faf6c4d2600, opt=9)
> at ptlib-2.14/src/ptclib/asner.cxx:2038
> #5 0x00007fafa37a3f9d in H323EndPoint::InternalNewIncomingConnection
> (this=0x7faf8803b8c0, transport=..., reused=false)
> at opal-3.14/src/h323/h323ep.cxx:754
> #6 0x00007fafa37a36d1 in H323EndPoint::NewIncomingConnection
> (this=0x7faf8803b8c0, transport=...)
> at opal-3.14/src/h323/h323ep.cxx:680
> #7 0x00007fafa343b087 in
> OpalEndPoint::NewIncomingConnection_PNotifier::Call (this=0x7faf88044780,
> note=..., extra=...)
> at/opal-3.14/include/opal/endpoint.h:226
> #8 0x00007fafa343e3f3 in PNotifierTemplate<PSafePtr<OpalTransport,
> PSafePtrBase> const&>::operator() (this=0x7faf88044fc0,
> notifier=..., extra=...)
> at/ptlib-2.14/include/ptlib/notifier.h:136
> #9 0x00007fafa3492755 in OpalListener::TransportThreadMain
> (this=0x7faf88044fa0, transport=...)
> at/opal-3.14/src/opal/transports.cxx:648
> #10 0x00007fafa34a16a9 in PThreadObj1Arg<OpalListener,
> PSafePtr<OpalTransport, PSafePtrBase> >::Main (this=0x3393330)
> at ptlib-2.14/include/ptlib/thread.h:716
> #11 0x00007fafa2795d70 in PThread::PX_ThreadMain (arg=0x3393330)
> at ptlib-2.14/src/ptlib/unix/tlibthrd.cxx:408
> #12 0x00007fafa6e279ca in start_thread () from /lib/libpthread.so.0
> #13 0x00007faf9d7b870d in clone () from /lib/libc.so.6
> #14 0x0000000000000000 in ?? ()
> (gdb) quit
>
> The issue is intermittently observed.
>
> Doub:
>
> in ptlib-2.14/include/ptlib/array.h:
>
> PBoolean SetAt(
>
> PINDEX index, ///< Position in the array to set the new
> value.
> T val ///< Value to set in the
> array.
> )
> {
>
> return SetMinSize(index+1) && val==(((T *)theArray)[index] =
> val);
> ^
> Simple Typecasting
>
> }
>
>
>
> /**Get a value from the array. If the \p index is beyond the
> end
> of the allocated array then a zero value is
> returned.
>
>
>
> @return
>
> Value at the array
> position.
>
>
> */
>
> T
> GetAt(
>
> PINDEX index ///< Position on the array to get value
> from.
> ) const
> {
>
>
> PASSERTINDEX(index);
>
> return index < GetSize() ? (reinterpret_cast<T *>(theArray))[index]
> : T();
> } ^
>
>
> reinterpret_cast
> My thought is we should use reinterpret_cast at both the places. Not sure,
> If it has been reported , please advice me what can be the reason.
>
> *-----------------------------------*
> Regards
> *Pradeep Kumar *
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> Opalvoip-devel mailing list
> Opa...@li...
> https://lists.sourceforge.net/lists/listinfo/opalvoip-devel
>
>
|