Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Break at binary_expr constructor
- (gdb) br assertion.hpp:334
- Breakpoint 3 at 0x44e4c6: file boost/test/tools/assertion.hpp, line 334.
- (gdb) run
- // Breakpoint hit
- Breakpoint 3, boost::test_tools::assertion::binary_expr<boost::test_tools::assertion::value_expr<unsigned int>, unsigned int const&, boost::test_tools::assertion::op::EQ<unsigned int, unsigned int const, void> >::binary_expr(boost::test_to
- ols::assertion::value_expr<unsigned int>&&, unsigned int const&) (this=0x7fffffffc5a0, lhs=<unknown type in /var/tmp/double_ended/build/test/sandbox.test/gcc-4.8/debug/sandbox, CU 0x0, DIE 0xc6d0d>, rhs=@0x7fffffffc5f0: 3)
- at boost/test/tools/assertion.hpp:336
- 336 , m_rhs( std::forward<Rhs>(rhs) )
- (gdb) s
- // Parent constructor omitted here for brevity
- boost::test_tools::assertion::binary_expr<boost::test_tools::assertion::value_expr<unsigned int>, unsigned int const&, boost::test_tools::assertion::op::EQ<unsigned int, unsigned int const, void> >::binary_expr(boost::test_tools::assertion
- ::value_expr<unsigned int>&&, unsigned int const&) (this=0x7fffffffc5a0, lhs=<unknown type in /var/tmp/double_ended/build/test/sandbox.test/gcc-4.8/debug/sandbox, CU 0x0, DIE 0xc6d0d>, rhs=@0x7fffffffc5f0: 3)
- at boost/test/tools/assertion.hpp:337
- 337 {}
- // binary_expr consturctor done, print it in the empty body
- (gdb) print *this
- $22 = {<boost::test_tools::assertion::expression_base<boost::test_tools::assertion::binary_expr<boost::test_tools::assertion::value_expr<unsigned int>, unsigned int const&, boost::test_tools::assertion::op::EQ<unsigned int, unsigned int co
- nst, void> >, bool>> = {<No data fields>}, m_lhs = {<boost::test_tools::assertion::expression_base<boost::test_tools::assertion::value_expr<unsigned int>, unsigned int>> = {<No data fields>}, m_value = 3}, m_rhs = @0x7fffffffc5f0}
- // Let's see if someone touches m_rhs, it's value is OK now
- (gdb) watch *(unsigned*)0x7fffffffc5f0
- Hardware watchpoint 4: *(unsigned*)0x7fffffffc5f0
- // Strange thing occures, the address of lazy_ostream matches the watched address. What's happening?
- (gdb) c
- Continuing.
- Hardware watchpoint 4: *(unsigned*)0x7fffffffc5f0
- Old value = 3
- New value = 7176336
- 0x000000000042caf1 in boost::unit_test::lazy_ostream::lazy_ostream (this=0x7fffffffc5f0, p_empty=false) at boost/test/utils/lazy_ostream.hpp:45
- 45 explicit lazy_ostream( bool p_empty = true ) : m_empty( p_empty ) {}
- // Same memory is touched again
- // The new value is the final one, also printed by the failed test diagnostics
- (gdb) c
- Continuing.
- Hardware watchpoint 4: *(unsigned*)0x7fffffffc5f0
- Old value = 7176336
- New value = 7170128
- 0x000000000044e5db in boost::unit_test::lazy_ostream_impl<boost::unit_test::lazy_ostream, boost::unit_test::basic_cstring<char const>, boost::unit_test::basic_cstring<char const> const&>::lazy_ostream_impl (this=0x7fffffffc5f0, prev=...,
- value=...) at boost/test/utils/lazy_ostream.hpp:60
- 60 , m_value( value )
- // Message gets printed, the m_rhs was corrupted.
- (gdb) c
- Continuing.
- sandbox.cpp(8): error: in "sandbox": check 3u == ((std::max)(0u, 3u)) has failed [3 != 7170128]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement