[vls-devel] Re: CVS Commit (tooney)

Tristan Leteurtre tristan.leteurtre at videolan.org
Thu Feb 27 21:04:55 CET 2003


On Thu, Feb 27, 2003, Damien LUCAS wrote:
> Jean-Paul Saman wrote:
> >Hopefully you'll get to see the ASSERT(), because it is likely that you 
> >run out of your buffer.
> 
> But, it doesn't look that easy. 

For example, in the first loop of

memcpy(m_ByteBuff + HeaderOffset + TS_PACKET_LEN * iIndex,  m_cTsBuff[iIndex],
               TS_PACKET_LEN);

m_ByteBuff is at         : 0x00504418 

and 

m_cTsBuff.m_apBuff is at : 0x00504458

although m_ByteBuff is supposed to be initialised at 1330 bytes !!!!
(in netoutput.h : byte m_ByteBuff[RTP_HEADER_LEN + 
                                      TS_PACKET_LEN * TS_IN_ETHER];)

There is only room for 0x30 bytes ! That's why everthing goes wrong on
the other loops. 

You can correct that, using m_ByteBuff = new byte[1330], but...

> ...Adding your code just make the segfault occur later... in a C_String
> constructor on the 'new' call. The assertion is always true.

Exactly : once you correct something, or add a line, a new bug appear...
in a 'new' constructor in C_String, an CrtAssert  error in TsStreamer, in
Threads, in single affectation, in a loop (...)

There is a deep problem, something makes an heap corruption.

And under linux with valgrind, I remind that there is no problem.... I
checked all the #ifdef _WIN32 code to see if that could cause a trivial
bug, but I didn't notice anything...

We should try to organize a competition with prices for solving this
problem !

-- 
Tristan

nitrox, good luck, i'm with you.
-- 
This is the vls-devel mailing-list, see http://www.videolan.org/streaming/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vls-devel mailing list