Skip to content

Instantly share code, notes, and snippets.

@jyrkive
Created March 7, 2017 17:16
Show Gist options
  • Save jyrkive/687938a737b999c590d6f1833a410c59 to your computer and use it in GitHub Desktop.
Save jyrkive/687938a737b999c590d6f1833a410c59 to your computer and use it in GitHub Desktop.
Dr. Memory detecting use-after-free
~~Dr.M~~ Error #1: UNADDRESSABLE ACCESS of freed memory: reading 0x031c1378-0x031c137c 4 byte(s) within 0x031c1378-0x031c137c
~~Dr.M~~ # 0 system call NtDeviceIoControlFile AFD_SEND_INFO.BufferArray[i].buf
~~Dr.M~~ # 1 MSWSOCK.dll!? +0x0 (0x7321769b <MSWSOCK.dll+0x769b>)
~~Dr.M~~ # 2 WS2_32.dll!WSASend +0x11d (0x7712347e <WS2_32.dll+0x1347e>)
~~Dr.M~~ # 3 boost::asio::detail::socket_ops::send [i:\battle for wesnoth\external\include\boost\asio\detail\impl\socket_ops.ipp:1154]
~~Dr.M~~ # 4 boost::asio::detail::socket_ops::non_blocking_send [i:\battle for wesnoth\external\include\boost\asio\detail\impl\socket_ops.ipp:1244]
~~Dr.M~~ # 5 boost::asio::detail::reactive_socket_send_op_base<>::do_perform [i:\battle for wesnoth\external\include\boost\asio\detail\reactive_socket_send_op.hpp:56]
~~Dr.M~~ # 6 boost::asio::detail::reactor_op::perform [i:\battle for wesnoth\external\include\boost\asio\detail\reactor_op.hpp:40]
~~Dr.M~~ # 7 boost::asio::detail::reactor_op_queue<>::perform_operations [i:\battle for wesnoth\external\include\boost\asio\detail\reactor_op_queue.hpp:125]
~~Dr.M~~ # 8 boost::asio::detail::reactor_op_queue<>::perform_operations [i:\battle for wesnoth\external\include\boost\asio\detail\reactor_op_queue.hpp:144]
~~Dr.M~~ # 9 boost::asio::detail::win_fd_set_adapter::perform [i:\battle for wesnoth\external\include\boost\asio\detail\win_fd_set_adapter.hpp:101]
~~Dr.M~~ #10 boost::asio::detail::select_reactor::run [i:\battle for wesnoth\external\include\boost\asio\detail\impl\select_reactor.ipp:238]
~~Dr.M~~ #11 boost::asio::detail::task_io_service::do_run_one [i:\battle for wesnoth\external\include\boost\asio\detail\impl\task_io_service.ipp:356]
~~Dr.M~~ #12 boost::asio::detail::task_io_service::run [i:\battle for wesnoth\external\include\boost\asio\detail\impl\task_io_service.ipp:149]
~~Dr.M~~ #13 boost::asio::io_service::run [i:\battle for wesnoth\external\include\boost\asio\impl\io_service.ipp:59]
~~Dr.M~~ #14 server_base::run [i:\battle for wesnoth\wesnoth\src\server\server_base.cpp:149]
~~Dr.M~~ #15 main [i:\battle for wesnoth\wesnoth\src\campaign_server\campaign_server.cpp:852]
~~Dr.M~~ Note: @0:00:54.773 in thread 8852
~~Dr.M~~ Note: next higher malloc: 0x031c14e0-0x031c15e1
~~Dr.M~~ Note: 0x031c1378-0x031c137c overlaps memory 0x031c1378-0x031c137c that was freed here:
~~Dr.M~~ Note: # 0 replace_operator_delete_nothrow [d:\drmemory_package\common\alloc_replace.c:2974]
~~Dr.M~~ Note: # 1 std::_Ref_count<>::_Destroy [c:\program files (x86)\microsoft visual studio 12.0\vc\include\memory:159]
~~Dr.M~~ Note: # 2 std::_Ref_count_base::_Decref [c:\program files (x86)\microsoft visual studio 12.0\vc\include\memory:118]
~~Dr.M~~ Note: # 3 std::_Ptr_base<>::_Decref [c:\program files (x86)\microsoft visual studio 12.0\vc\include\memory:343]
~~Dr.M~~ Note: # 4 std::shared_ptr<>::~shared_ptr<> [c:\program files (x86)\microsoft visual studio 12.0\vc\include\memory:610]
~~Dr.M~~ Note: # 5 handle_doc<>::~handle_doc<>
~~Dr.M~~
~~Dr.M~~ Error #2: UNINITIALIZED READ: reading 0x0078e6a0-0x0078e6a4 4 byte(s) within 0x0078e674-0x0078e6a4
~~Dr.M~~ # 0 system call NtDeviceIoControlFile AFD InputBuffer
~~Dr.M~~ # 1 MSWSOCK.dll!sethostname +0xaf81 (0x73232712 <MSWSOCK.dll+0x22712>)
~~Dr.M~~ # 2 MSWSOCK.dll!TransmitFile +0x60 (0x732344c1 <MSWSOCK.dll+0x244c1>)
~~Dr.M~~ # 3 boost::asio::detail::task_io_service_operation::complete [i:\battle for wesnoth\external\include\boost\asio\detail\task_io_service_operation.hpp:38]
~~Dr.M~~ # 4 boost::asio::detail::task_io_service::do_run_one [i:\battle for wesnoth\external\include\boost\asio\detail\impl\task_io_service.ipp:372]
~~Dr.M~~ # 5 boost::asio::detail::task_io_service::run [i:\battle for wesnoth\external\include\boost\asio\detail\impl\task_io_service.ipp:149]
~~Dr.M~~ # 6 boost::asio::io_service::run [i:\battle for wesnoth\external\include\boost\asio\impl\io_service.ipp:59]
~~Dr.M~~ # 7 server_base::run [i:\battle for wesnoth\wesnoth\src\server\server_base.cpp:149]
~~Dr.M~~ # 8 main [i:\battle for wesnoth\wesnoth\src\campaign_server\campaign_server.cpp:852]
~~Dr.M~~ Note: @0:00:54.816 in thread 8852
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment