Boost logo

Boost :

From: Wilbur Lang (wilburlang_at_[hidden])
Date: 2007-07-16 05:52:39


Hi,

Oh.....my dirty solution is wrong too....
 
> You are right. If the mapping address is not the desired one, the
> cleanup is wrong. Your solution, moving the following lines
>
> > ==============================================
> > //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);
> > }
> > ==============================================
>
> to the end of the function should fix it (since the object would be
> in an stable state)

If moving above code snip to the end of function will cause another
problem....evaluation of (m_base != (void* )address) is false always.

my suggest is m_base is the return value of mmap(...) not the user
want. but get_address() return m_base + m_extra_offset not m_base.

it's more clear than use modified m_base everywhere.

sorry for the wrong information last email.

Wilbur Lang


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk