$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David Deakins (ddeakins_at_[hidden])
Date: 2007-09-15 00:39:40
I am getting failures of the error.cpp regression test for asio that
seem to be related to an order of initialization problem with the new
boost::asio::error::system_category. It appears that
asio::error::system_category is a const reference initialized by
error::detail::get_system_category(), which simply returns
boost::system::system_category. The problem seems to be that
boost::system::system_category is itself a const reference to the actual
system_category_const object created in Boost.System's error_code.cpp
file. If it happens that the boost::asio::error::system_category
reference is initialized before the boost::system::system_category
reference, then boost::asio::error::system_category is a copy of the
uninitialized boost::system::system_category reference rather than a
reference to the system_category_const object. Attempting to use the
category-related functions of an error_code created from the asio
system_category enums then triggers an access violation. Of course, if
boost::system::system_category is initialized first, then everything is
fine. Hopefully that all made sense.
Thanks,
-Dave