![]() |
Boost : |
From: Wilbur Lang (wilburlang_at_[hidden])
Date: 2007-07-13 03:58:37
Hi,
Because of network problem, what I had is a snapshot
of CVS-HEAD-07-06-29-0909. If this bug is corrected/reported before,
please ignore.
in the file /boost/interprocess/mapped_region.hpp line 467, followed is
a snip
==============================================
//Check for fixed mapping error
if(address && (m_base != (void*)address)){
error_info err = system_error_code();
this->priv_close(); // bug here
throw interprocess_exception(err);
}
==============================================
because adjusting mapping address to page size granularity, which may
cause m_extra_offset != 0. in mapped_region::priv_close::munmap will
restore address with m_base and m_extra_offset. But at line 467, m_base
did not be adjusted (it's adjusted at line 472), when priv_close()
invoked, we got a wrong address to munmap.
I think it affect windows version too (same file at line 309).
one possible correction:
move line 472~474 to 463 (*nix version).
move line 314 to 305 (windows version).
Best Regards,
Wilbur Lang
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk