[Boost-bugs] [Boost C++ Libraries] #5553: Access violation caused by boost::unit_test::make_test_case on Windows

Subject: [Boost-bugs] [Boost C++ Libraries] #5553: Access violation caused by boost::unit_test::make_test_case on Windows
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-05-19 14:30:45


#5553: Access violation caused by boost::unit_test::make_test_case on Windows
-------------------------------------------------+--------------------------
 Reporter: Balint SZENTE <balint@…> | Owner: rogeeff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: windows, memcpy, make_test_case |
-------------------------------------------------+--------------------------
 The unit test main application built in DEBUG mode generates access
 violation with non debug version of Boost shared libraries on Windows
 platform.

 Steps to reproduce:
  * Test file:
 {{{
 #!cpp
 #define BOOST_TEST_MODULE "Test"
 #include <boost/test/unit_test.hpp>

 using namespace boost;

 BOOST_AUTO_TEST_SUITE(Suite)
 BOOST_AUTO_TEST_CASE(Case) {
 }
 BOOST_AUTO_TEST_SUITE_END()
 }}}
  * Compile with Visual C++ 2010 in DEBUG mode having the following
 defines enabled:
 {{{
 BOOST_ALL_DYN_LINK
 BOOST_ALL_NO_LIB
 }}}
  * Link with the ''non debug'' versions of Boost DLLs taken from the
 [boostpro.com] website (version 1.46.1 or 1.44 for example)
  * Run the program

 Expected result:
 {{{
 Running 1 test cases...

 *** No errors detected
 }}}

 Actual result: the program will crash in `msvcr100.dll` in `memcpy`
 function with illegal addresses. The callstack:
 {{{
 msvcr100.dll!memcpy(unsigned char * dst, unsigned char * src, unsigned
 long count) Line 311
 boost_unit_test_framework-vc100-mt-1_44.dll!10002e29()
 [Frames below may be incorrect and/or missing, no symbols loaded for
 boost_unit_test_framework-vc100-mt-1_44.dll]
 boost_unit_test_framework-vc100-mt-1_44.dll!1003298f()
 boost_unit_test_framework-vc100-mt-1_44.dll!10032a9d()
 boost_utf.exe!boost::unit_test::make_test_case(const
 boost::unit_test::callback0<boost::unit_test::ut_detail::unused> &
 test_func, boost::unit_test::basic_cstring<char const > tc_name) Line 255
 + 0x8d bytes
 }}}

 '''Note:'''
  * The program linked with the DEBUG version of the Boost DLLs works
 properly. It seems that Boost.Test module generates different codepaths
 and the Debug and non debug versions of ''the DLLs are not functionally
 compatible''.
  * On Linux this issue does not exist. The DEBUG version of the
 application works well with the non debug version of
 boost_unit_test_framework shared object files.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5553>
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:06 UTC