Boost logo

Boost Users :

Subject: Re: [Boost-users] Incorrect assertion in Boost.Exception?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2012-12-01 22:05:43


On Fri, Nov 30, 2012 at 7:26 AM, Thorsten Dahlheimer <tdahlheim_at_[hidden]> wrote:
> Now at runtime, when the error info is accessed, the following assertion in boost::exception_detail::error_info_container_impl::get() fails:
> BOOST_ASSERT( BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==ti.type_ );
> As far as we can see, this happens because MSVC++ uses seperate type_info objects in each dll/exe, and the above assertion compares pointers to type_infos instead of the objects themselves.
> We believe this is a bug on the Boost side, since type_info objects for the same type are generally not guaranteed to be unique. Are we correct with that?

Reading the sources from the latest release and trunk branch, the
assertion looks like this:

BOOST_ASSERT( *BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==*ti.type_ );

Which seems correct, so it seems this was a bug that is already fixed.
Can you use a newer Boost release?

Thanks,
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net