fdo#88006, Valgrind and ImplSVData (vcl part)
julien2412
serval2412 at yahoo.fr
Sun Jan 4 00:55:23 PST 2015
Hello,
By giving a try to fdo#88006, I retrieved a Valgrind trace (see
https://bugs.freedesktop.org/attachment.cgi?id=111712)
I noticed this (after having added "--track-origins=yes" to Valgrind line
106 of soffice script):
Uninitialised value was created by a heap allocation
...
ImplYield(bool, bool) (svapp.cxx:362)
Taking a look at svapp.cxx, I've got this:
350 ImplSVData* pSVData = ImplGetSVData();
351
352 // run timers that have timed out
353 if ( !pSVData->mbNoCallTimer )
354 while ( pSVData->mbNotAllTimerCalled )
355 Timer::ImplTimerCallbackProc();
356
357 pSVData->maAppData.mnDispatchLevel++;
... some comments
362 pSVData->mpDefInst->Yield( i_bWait &&
!pSVData->maAppData.mbAppQuit && !pSVData->maAppData.mbNoYield, i_bAllEvents
);
See http://opengrok.libreoffice.org/xref/core/vcl/source/app/svapp.cxx#362
Here's the content of ImplGetSVData():
79 ImplSVData::ImplSVData()
80 {
81 // init global instance data
82 memset( this, 0, sizeof( ImplSVData ) );
83 maHelpData.mbAutoHelpId = true;
84 maNWFData.maMenuBarHighlightTextColor = Color( COL_TRANSPARENT
);
85 }
I know it's been like this since 2007 at least but is it really ok to
initialize an object (which contains not only integral types but also
structure/classes) this way?
Julien
--
View this message in context: http://nabble.documentfoundation.org/fdo-88006-Valgrind-and-ImplSVData-vcl-part-tp4135029.html
Sent from the Dev mailing list archive at Nabble.com.
More information about the LibreOffice
mailing list