Uninitialized data (or here we go again)


Subject: Uninitialized data (or here we go again)
From: Mike Nordell (tamlin@algonet.se)
Date: Sat Nov 11 2000 - 15:17:23 CST


Taking AW through a test run using Purify, I'm sad to report that there are
again more than a few places where uninitialized class data is read.

This invokes "undefined behaviour", which in theory means it is allowed to
do anything.

Perhaps the worst example I've seen now is a call inside
EV_Win32Toolbar::synthesize where the code uses a member
"m_pWin32ToolbarIcons". This member is *never* initialized. In fact, it
pointed south.

Until I check in to this more, here are some replacement constructors for
the first five classes Purify complained about. As for the
m_pWin32ToolbarIcons I don't know what to do just yet (meaning I haven't yet
looked into it). Sorry for not supplying patches, but they are at least
simple drop-in replacements fro existing constructors.

/Mike - please don't cc








This archive was generated by hypermail 2b25 : Sat Nov 11 2000 - 15:16:09 CST