[Helix-client-dev] CR-Client: fix for bug 5696
Massimo Perga massimo.perga at gmail.comHello Greg, unfortunately I haven't rights enough to check-in my patch: could somebody do it for me ? Thanks, Regards, Max 2007/1/8, Greg Wright <gwright at real.com>: > > Massimo Perga wrote: > > Modified by: massimo.perga at gmail.com > > Date: 01/05/07 > > Project: Helix Client > > Bug Number: 5696 > > > > Bug URL: N/A > > > > Synopsis: fix to allow successfull Linux/AMD64-native build > > > > > > Overview: the patch is the same of a patch previously submitted, but > > it's included just in AMD64 builds. > > I just tried your original fix (cross platform one) and I > get HX_ASSERT(actualSize < estimatedSize) firing each time > I run in the below code: > > void CHXString::FormatV(const char* pFmt, va_list args) > { > va_list argList; > va_copy(argList, args); > int estimatedSize = GuessSize(pFmt, args); > if (m_pRep) > m_pRep->Resize(estimatedSize + FormatFudgeFactor); > else > m_pRep = new CHXStringRep(estimatedSize + FormatFudgeFactor); > > int actualSize = vsnprintf(m_pRep->GetBuffer(), > m_pRep->GetBufferSize(), > pFmt, argList); > HX_ASSERT(actualSize < estimatedSize); > m_pRep->SetStringSize(actualSize); > FreeExtra(); > va_end(argList); > } > > > So, I think you should check in this change that is not > cross platform for now so that we leave the original > code unchanged. > > > --greg. > > > > > > > > > > > Files Added: > > None > > > > Files Modified: > > common/container/hxstrfmt.cpp > > > > Image Size and Heap Use impact (Client -Only): > > > > None > > > > Platforms and Profiles Affected: > > Linux for AMD64 > > > > > > Distribution Libraries Affected: > > None > > > > Distribution library impact and planned action: > > None > > > > Platforms and Profiles Build Verified: > > > > platform: linux-2.6-glibc23-amd64 (Debian 4.1.1-20) > > profile: helix-client-all-defines-nodist > > > > > > Platforms and Profiles Functionality verified: > > platform: linux-2.6-glibc23-amd64 (Debian 4.1.1-20) > > profile: helix-client-all-defines-nodist > > > > > > Branch: hxclient_1_5_0_cayenne > > > > Copyright assignment: > > > > > > In consideration for RealNetworks' hosting and maintenance > > of my modification, I agree to assign to RealNetworks full > > copyright ownership of the code included in the attached > > > > > > patch, and agree that RealNetworks has no duty of accounting > > to me for it. I warrant that this code is entirely original > > to and owned by me, that I can legally grant the copyright > > > > > > assignment, and that my contribution does not violate any > other > > person's rights, and laws or breach any contract. I understand > > that RealNetworks may license this code under RPSL, RCSL, > > > > > > and/or any other license at RealNetworks' discretion, and use > > the code in any way. > > > > QA Instructions: > > It fixes the build process on Linux/AMD64-native platform. > > > > > > Index: hxstrfmt.cpp > > =================================================================== > > RCS file: /cvsroot/common/container/hxstrfmt.cpp,v > > retrieving revision 1.9.6.2 > > diff -u -w -r1.9.6.2 hxstrfmt.cpp > > --- hxstrfmt.cpp 6 Dec 2005 18:36:39 -0000 1.9.6.2 > > +++ hxstrfmt.cpp 4 Jan 2007 22:09:09 -0000 > > @@ -294,7 +294,11 @@ > > CONVERT_FUNC_DEF(ConvertWChar, wchar_t) > > CONVERT_FUNC_DEF(ConvertPtr, void*) > > > > +#ifdef __amd64__ > > +static bool ParseFormat(const char*& pCur, int& charCount, va_list > args) > > +#else > > static bool ParseFormat(const char*& pCur, int& charCount, va_list& > args) > > +#endif > > { > > bool ret = true; > > > > @@ -479,7 +483,11 @@ > > return ret; > > } > > > > +#ifdef __amd64__ > > +static int GuessSize(const char* pFormat, va_list args) > > +#else > > static int GuessSize(const char* pFormat, va_list& args) > > +#endif > > { > > int ret = 1; > > > > @@ -519,7 +527,13 @@ > > > > void CHXString::FormatV(const char* pFmt, va_list args) > > { > > +#ifdef __amd64__ > > + va_list argList; > > + > > + va_copy(argList, args); > > +#else > > va_list argList = args; > > +#endif > > > > //Guess the size > > int estimatedSize = GuessSize(pFmt, args); > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Helix-client-dev mailing list > > Helix-client-dev at helixcommunity.org > > http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev > > -- Massimo Perga ______________________________________ Computer Engineer Via Valentino Carrera 61 10146 Torino Italy Tel: +393479806753 ______________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.helixcommunity.org/pipermail/helix-client-dev/attachments/20070108/40e89ca2/attachment.html