|
Boost : |
From: SourceForge.net (noreply_at_[hidden])
Date: 2006-03-17 15:08:36
Patches item #1452698, was opened at 2006-03-17 12:08
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=307586&aid=1452698&group_id=7586
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: iostreams // file_descriptor::seek BUG on files > 4 GB
Initial Comment:
Boost 1.33.1
iostreams library
file_descriptor::seek() method
file_descriptor.cpp, line 198
Win32, Visual C++ 2005
The method seek() can return a wrong value of a newly
set offset when the offset is further than 4 GB.
//---------------
return offset_to_position((lDistanceToMoveHigh << 32)
+ dwResultLow);
//---------------
The code above has a bug. On 32-bit systems the
expression (lDistanceToMoveHigh << 32) equals to
lDistanceToMoveHigh.
The correct code should first cast the
lDistanceToMoveHigh variable to 64-bit and then shift
it.
//---------------
return (static_cast<boost::intmax_t>
lDistanceToMoveHigh) << 32) + dwResultLow;
//---------------
Sergey Kolodkin
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=307586&aid=1452698&group_id=7586
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk