Opened 7 years ago

#12051 new Bugs

offset_ptr<void , boost::int32_t, boost::uint64_t> is saved incorrectly on win32

Reported by: anonymous Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc: 111coyote111@…

Description

I'm using offset_ptr<void , boost::int32_t, boost::uint64_t> to work with one mapped file from x32 and x64 process. Binary representation of offset_ptr is supposed to be same for 32 and 64 bit process.

In attached example I simply create mapped file and it has different content on win32 depending on boost library version. It is offset_ptr stored differently:

on x64:
f8ff ffff ffff ffff - for any version

on win32:
f8ff ffff ffff ffff - boost version < 1.52
f8ff ffff 0000 0000 - boost version >= 1.52 - this is bug

This behavior causes crash if I save data from x32 process and then open it from x64 process. Luckily offset_ptr.hpp header from boost 1.51 works in 1.60, but it's hardly a solution...

Can you guys make offset_ptr 32/64 compatible again?

Thanks,
Eugene

Attachments (1)

testBoost.zip (2.9 KB ) - added by 111coyote111@… 7 years ago.
will output different files on win32/x64

Download all attachments as: .zip

Change History (1)

by 111coyote111@…, 7 years ago

Attachment: testBoost.zip added

will output different files on win32/x64

Note: See TracTickets for help on using tickets.