Community
cancel
Showing results for 
Search instead for 
Did you mean: 
anonymous210
Novice
69 Views

BUG! UMC::FileReader does not work correctly with files larger than 2GB in 32bit applications.

Hi,

In the umc_file_reacer.cpp there are expression like:

m_iOff + m_pDataPointer - m_pBuffer

but that is not correct. The correct expression is

m_iOff + (m_pDataPointer - m_pBuffer)


For example consider the following code from FileReader::OpenView(Ipp64s iSize) :

Ipp64s iPos = m_iOff + m_pDataPointer - m_pBuffer;

if
m_iOff = 0x800000FF;
m_pDataPointer = NULL;
m_pBuffer = NULL;
and the code is compiled in 32bit mode

then
Ipp64s iPos = m_iOff + m_pDataPointer - m_pBuffer;
return a value iPos = 0xffffffff800000ff. This is not correct!

but
Ipp64s iPos = m_iOff + (m_pDataPointer - m_pBuffer);
return a value iPos = 0x800000ff. This is correct!

Thank you.

0 Kudos
2 Replies
PaulF_IntelCorp
Employee
69 Views

Hello,
Thank you for identifying that bug and posting the solution. I will make sure our engineering group is notified so that this fix can be incorporated in future releases of the UMC sample code.
Regards,
Paul
PaulF_IntelCorp
Employee
69 Views

Hello,

This bug has been marked as implemented in the 7.0 library release.

Paul
Reply