Bug in mapped_file.cpp

In the file \boost\libs\iostreams\src\mapped_file.cpp on line 126 there is a simple member function called mapped_file_source::is_open(). It was assuming that an invalid handle was 0 but that is not true for a Windows bulid. I changed the function to the following: bool mapped_file_source::is_open() const { #ifdef BOOST_IOSTREAMS_WINDOWS return !!pimpl_ && pimpl_->handle_ != INVALID_HANDLE_VALUE; #else return !!pimpl_ && pimpl_->handle_ != 0; #endif } This was from the latest revision of svn. Regards

Rory O'Connor wrote:
In the file \boost\libs\iostreams\src\mapped_file.cpp on line 126 there is a simple member function called mapped_file_source::is_open().
It was assuming that an invalid handle was 0 but that is not true for a Windows bulid.
I changed the function to the following:
bool mapped_file_source::is_open() const
{
#ifdef BOOST_IOSTREAMS_WINDOWS
return !!pimpl_ && pimpl_->handle_ != INVALID_HANDLE_VALUE;
#else
return !!pimpl_ && pimpl_->handle_ != 0;
#endif
}
I think the preferred approach is to log a bug in the bug tracker against the iostreams component at http://svn.boost.org/trac/boost/ Perhaps a little test case which demonstrates the error too.

I think the preferred approach is to log a bug in the bug tracker against the iostreams component at http://svn.boost.org/trac/boost/
Perhaps a little test case which demonstrates the error too.
After looking at the bug tracker, I realized this is a dup of ticket 1232: http://svn.boost.org/trac/boost/ticket/1232 Hopefully this gets fixed soon. I hate patching code. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Rory O'Connor wrote:
I think the preferred approach is to log a bug in the bug tracker against the iostreams component at http://svn.boost.org/trac/boost/
Perhaps a little test case which demonstrates the error too.
After looking at the bug tracker, I realized this is a dup of ticket 1232: http://svn.boost.org/trac/boost/ticket/1232
Hopefully this gets fixed soon. I hate patching code.
I will fix it as soon as I can get my local bjam working again, so I can test it before committing. -- Jonathan Turkanis CodeRage http://www.coderage.com

Rory O'Connor wrote:
After looking at the bug tracker, I realized this is a dup of ticket 1232: http://svn.boost.org/trac/boost/ticket/1232
This is disturbing ... it looks like there are still 6 iostreams bugs assigned to Doug Gregor instead of to me. -- Jonathan Turkanis CodeRage http://www.coderage.com

Jonathan Turkanis wrote:
Rory O'Connor wrote:
After looking at the bug tracker, I realized this is a dup of ticket 1232: http://svn.boost.org/trac/boost/ticket/1232
This is disturbing ... it looks like there are still 6 iostreams bugs assigned to Doug Gregor instead of to me.
I recall some problems about about this when they setup trac . See: http://lists.boost.org/Archives/boost/2007/07/125068.php

eg wrote:
Jonathan Turkanis wrote:
Rory O'Connor wrote:
After looking at the bug tracker, I realized this is a dup of ticket 1232: http://svn.boost.org/trac/boost/ticket/1232
This is disturbing ... it looks like there are still 6 iostreams bugs assigned to Doug Gregor instead of to me.
I recall some problems about about this when they setup trac .
See: http://lists.boost.org/Archives/boost/2007/07/125068.php
Thanks; I thought all those tickets had been reassigned to me, but I never verified it. I guess it's my fault (but still disturbing). -- Jonathan Turkanis CodeRage http://www.coderage.com
participants (3)
-
eg
-
Jonathan Turkanis
-
Rory O'Connor