Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2007-10-14 17:34:39

Chris Fairles wrote:
> Hi David
> I just ran into this issue and it had been driving me nuts because the
> access violation only occured when compiled w/o optimizations mode
> (-O0 gcc 4.1.1) but WITH optimizations turned on, it magically works.
> The code that triggers the seg fault is line 391 of
> boost/system/error_code.hpp (operator<<):
> os << ec.category().name() << ':' << ec.value();
> I get the same behavior using .message() as well.
> It seems that, in debug mode, m_cat in the error_code has an address
> of 0x0 (well, the virtual pointer does). In release mode it has a
> valid address.
> Does this sound like it could be the order-of-init issue you are
> facing? Do you happen to have a solution? I'm not sure how to force
> order-of-initialization (or if the std even allows it).

Chris, are you using code from the Subversion trunk? That problem is
supposed to have been fixed some time ago.


Boost list run by bdawes at, gregod at, cpdaniel at, john at