I was running an application that uses Prof-UIS looking for any memory leaks or memory corruption and discoved that Purify was detecting a few Uninitialized Memory Reads in your code. I looked at the source code and they appear to be legit. Can you take a look at them and confirm they are legit and if so fix them in a future release of Prof-UIS.
[W] UMR: Uninitialized memory read in CExtPopupMenuWnd::TrackFlagsGet(void)const {1 occurrence}
Reading 1 byte from 0x372b4048 (1 byte at 0x372b4048 uninitialized)
Address 0x372b4048 is 632 bytes into a 4316 byte block at 0x372b3dd0
Address 0x372b4048 points to a malloc’d block in heap 0x0d400000
Thread ID: 0x20fc
Error location
CExtPopupMenuWnd::TrackFlagsGet(void)const [extpopupmenuwnd.cpp:13198]
DWORD CExtPopupMenuWnd::TrackFlagsGet() const
{
ASSERT_VALID( this );
=> if( ! m_bTopLevel )
return (m_dwTrackFlags&(~(TPMX_RIBBON_FILE_MENU)));
return m_dwTrackFlags;
}
CExtPopupMenuWnd::_IsRibbonMode(void)const [extpopupmenuwnd.cpp:20097]
bool CExtPopupMenuWnd::_IsRibbonMode() const
{
=> DWORD dwTrackFlags = TrackFlagsGet();
if( dwTrackFlags & TPMX_RIBBON_MODE )
return true;
if( m_pWndParentMenu != NULL )
CExtPopupMenuWnd::_AdjustAnimation(e_animation_type_t::CExtPopupBaseWnd&) [extpopupmenuwnd.cpp:4978]
)
{
ASSERT_VALID( this );
=> if( _IsRibbonMode() )
eAT = __AT_CONTENT_DISPLAY;
}
CExtPopupBaseWnd::_InitAnimation(void) [extpopupmenuwnd.cpp:5041]
m_nAnimPercent = m_nAnimPercentOld = 0;
=> _AdjustAnimation( m_AnimationType );
if( ( m_AnimationType < 0
|| m_AnimationType > __AT_MAX_VALID_VALUE
CExtPopupMenuWnd::_Init(void) [extpopupmenuwnd.cpp:8090]
{
ASSERT_VALID( this );
=> _InitAnimation();
m_nDyScrollOffset = 0;
m_bTopLevel
CExtPopupMenuWnd::CExtPopupMenuWnd(void) [extpopupmenuwnd.cpp:7970]
, m_bCanceling( false )
{
__VPC_INC;
=> _Init();
g_ListDetached.AddTail( this );
}
[W] UMR: Uninitialized memory read in CExtPopupMenuWnd::TrackFlagsGet(void)const {1 occurrence}
Reading 4 bytes from 0x372b4050 (4 bytes at 0x372b4050 uninitialized)
Address 0x372b4050 is 640 bytes into a 4316 byte block at 0x372b3dd0
Address 0x372b4050 points to a malloc’d block in heap 0x0d400000
Thread ID: 0x20fc
Error location
CExtPopupMenuWnd::TrackFlagsGet(void)const [extpopupmenuwnd.cpp:13200]
ASSERT_VALID( this );
if( ! m_bTopLevel )
return (m_dwTrackFlags&(~(TPMX_RIBBON_FILE_MENU)));
=> return m_dwTrackFlags;
}
void CExtPopupMenuWnd::TrackFlagsSet(
CExtPopupMenuWnd::_IsRibbonMode(void)const [extpopupmenuwnd.cpp:20097]
bool CExtPopupMenuWnd::_IsRibbonMode() const
{
=> DWORD dwTrackFlags = TrackFlagsGet();
if( dwTrackFlags & TPMX_RIBBON_MODE )
return true;
if( m_pWndParentMenu != NULL )
CExtPopupMenuWnd::_AdjustAnimation(e_animation_type_t::CExtPopupBaseWnd&) [extpopupmenuwnd.cpp:4978]
)
{
ASSERT_VALID( this );
=> if( _IsRibbonMode() )
eAT = __AT_CONTENT_DISPLAY;
}
CExtPopupBaseWnd::_InitAnimation(void) [extpopupmenuwnd.cpp:5041]
m_nAnimPercent = m_nAnimPercentOld = 0;
=> _AdjustAnimation( m_AnimationType );
if( ( m_AnimationType < 0
|| m_AnimationType > __AT_MAX_VALID_VALUE
CExtPopupMenuWnd::_Init(void) [extpopupmenuwnd.cpp:8090]
{
ASSERT_VALID( this );
=> _InitAnimation();
m_nDyScrollOffset = 0;
m_bTopLevel
CExtPopupMenuWnd::CExtPopupMenuWnd(void) [extpopupmenuwnd.cpp:7970]
, m_bCanceling( false )
{
__VPC_INC;
=> _Init();
g_ListDetached.AddTail( this );
}
[W] UMR: Uninitialized memory read in CExtPopupMenuWnd::_EndAnimation(void) {2 occurrences}
Reading 1 byte from 0x372b4e78 (1 byte at 0x372b4e78 uninitialized)
Address 0x372b4e78 is 4264 bytes into a 4316 byte block at 0x372b3dd0
Address 0x372b4e78 points to a malloc’d block in heap 0x0d400000
Thread ID: 0x20fc
Error location
CExtPopupMenuWnd::_EndAnimation(void) [extpopupmenuwnd.cpp:20049]
{
if( m_bHelperReCreateDynamicShadowAtTheEndOfNearestAnimation
&& m_ctrlShadow.GetSafeHwnd() != NULL
=> )
m_ctrlShadow.DestroyWindow();
m_bHelperReCreateDynamicShadowAtTheEndOfNearestAnimation = false;
if( m_ctrlShadow.GetSafeHwnd() == NULL )
CExtPopupBaseWnd::OnTimer(UINT) [extpopupmenuwnd.cpp:6137]
if( GetSafeHwnd() != NULL )
{
if( m_bAnimFinished )
=> _EndAnimation();
else
{
Invalidate( FALSE );
CExtPopupMenuWnd::OnTimer(UINT) [extpopupmenuwnd.cpp:16905]
return;
default:
=> CExtPopupBaseWnd::OnTimer(nIDEvent);
break; // default
} // switch( nIDEvent )
}