Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6709 Discussions

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

anonymous210
Novice
327 Views
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
327 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
0 Kudos
PaulF_IntelCorp
Employee
327 Views
Hello,

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

Paul
0 Kudos
Reply