Opened 9 years ago
Last modified 9 years ago
#8885 new Bugs
boost asio epoll reactor method "set_ready_events" not protected by lock
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | To Be Determined | Component: | asio |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | boost asio multi-thread | Cc: |
Description
Suggested patch: Index: boost/asio/detail/epoll_reactor.hpp =================================================================== --- boost/asio/detail/epoll_reactor.hpp (Revision 85130) +++ boost/asio/detail/epoll_reactor.hpp (Arbeitskopie) @@ -64,7 +64,12 @@
bool shutdown_;
BOOST_ASIO_DECL descriptor_state();
- void set_ready_events(uint32_t events) { task_result_ = events; }
+ + void set_ready_events(uint32_t events) { + mutex::scoped_lock lock(mutex_); + task_result_ = events; + } +
BOOST_ASIO_DECL operation* perform_io(uint32_t events); BOOST_ASIO_DECL static void do_complete(
io_service_impl* owner, operation* base,
possible patch for ticket #8885