[Boost-bugs] [Boost C++ Libraries] #11444: BOOST_CHECK triggers debug assertion on VS C++ 2015 RC when called from within lambda

Subject: [Boost-bugs] [Boost C++ Libraries] #11444: BOOST_CHECK triggers debug assertion on VS C++ 2015 RC when called from within lambda
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-02 13:44:04


#11444: BOOST_CHECK triggers debug assertion on VS C++ 2015 RC when called from
within lambda
------------------------------+---------------------
 Reporter: xxn-boost-bugs@… | Owner: rogeeff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost 1.58.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------
 I have been trying to use boost tests on with VS C++ 2015 in conjunction
 with boost asio and a few lambdas. It seems like there is a problem with
 calling BOOST_CHECK from within a lambda that has previously been
 dispatched via boost::asio. The calls always look like this:

 {{{
 BOOST_CHECK(foo([] {BOOST_CHECK(false);});
 }}}

 where foo dispatches the lambda some time (depending on network transfers)
 after the call to foo.

 This is an example stack trace for such an assertion:
 {{{
         msvcp140d.dll!std::_Debug_message(const wchar_t * message, const
 wchar_t * file, unsigned int line) Zeile 17 C++
>
 test_modbus.exe!std::_String_const_iterator<std::_String_val<std::_Simple_types<char>
> >::operator+=(int _Off) Zeile 164 C++
 test_modbus.exe!std::_String_iterator<std::_String_val<std::_Simple_types<char>
> >::operator+=(int _Off) Zeile 369 C++
 test_modbus.exe!std::_String_iterator<std::_String_val<std::_Simple_types<char>
> >::operator+(int _Off) Zeile 375 C++
         test_modbus.exe!std::_Transform1<char
 *,std::_String_iterator<std::_String_val<std::_Simple_types<char> > >,char
 (__cdecl*)(char)>(char * _First, char * _Last,
 std::_String_iterator<std::_String_val<std::_Simple_types<char> > > _Dest,
 char (char) * _Func, std::random_access_iterator_tag __formal,
 std::random_access_iterator_tag __formal) Zeile 1049 C++
         test_modbus.exe!std::_Transform1<char
 *,std::_String_iterator<std::_String_val<std::_Simple_types<char> > >,char
 (__cdecl*)(char)>(char * _First, char * _Last,
 std::_String_iterator<std::_String_val<std::_Simple_types<char> > > _Dest,
 char (char) * _Func, std::integral_constant<bool,1> __formal) Zeile 1061
 C++
 test_modbus.exe!std::transform<std::_String_iterator<std::_String_val<std::_Simple_types<char>
> >,std::_String_iterator<std::_String_val<std::_Simple_types<char> >
>,char
 (__cdecl*)(char)>(std::_String_iterator<std::_String_val<std::_Simple_types<char>
> > _First,
 std::_String_iterator<std::_String_val<std::_Simple_types<char> > > _Last,
 std::_String_iterator<std::_String_val<std::_Simple_types<char> > > _Dest,
 char (char) * _Func) Zeile 1086 C++
 test_modbus.exe!boost::unit_test::unit_test_log_t::operator<<(const
 boost::unit_test::log::begin & b) Zeile 271 C++
         test_modbus.exe!boost::test_tools::tt_detail::check_impl(const
 boost::test_tools::predicate_result & pr, const
 boost::unit_test::lazy_ostream & check_descr,
 boost::unit_test::basic_cstring<char const > file_name, unsigned int
 line_num, boost::test_tools::tt_detail::tool_level tl,
 boost::test_tools::tt_detail::check_type ct, unsigned int num_of_args,
 ...) Zeile 162 C++
 test_modbus.exe!channel_modbus_client::parallel_write::test_method::__l10::<lambda>()
 Zeile 378 C++
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11444>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC