Opened 7 years ago

Last modified 7 years ago

#11851 new Bugs

epoll_reactor::deregister_descriptor() release descriptor_data

Reported by: ljl <404140036@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc:

Description

epoll_reactor::deregister_descriptor() function puts descriptor_state object in its object_pool, so it can be reused by epoll_reactor::register_descriptor() immediately, but the descriptor_state object may be yet referenced somewhere, for example, epoll_reactor::run() puts it in op_queue<operation>, and be about to execute operation::complete() in task_io_service::do_run_one() function. it will make logic problems when the descriptor_state object is reused indeed in a third thread by calling epoll_reactor::allocate_descriptor_state().

Change History (1)

comment:1 by anonymous, 7 years ago

descriptor_state::do_complete() running this time seems for other associated socket, is this condition in your consideration?

Note: See TracTickets for help on using tickets.