Opened 12 years ago
Closed 12 years ago
#4739 closed Bugs (invalid)
A thread safe bug about epoll_reactor
Reported by: | anonymous | Owned by: | chris_kohlhoff |
---|---|---|---|
Milestone: | To Be Determined | Component: | asio |
Version: | Boost 1.45.0 | Severity: | Problem |
Keywords: | asio epoll_reactor | Cc: |
Description
There is a bug epoll_reacor the version Release 1.45.0 In the file epoll_reactor.hpp, function epoll_reacor::run, line 369.
void* ptr = events[i].data.ptr; ... descriptor_state* descriptor_data = static_cast<descriptor_state*>(ptr); mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
And the file epoll_reactor.hpp, function epoll_reacor::close_descriptor, line 256.
registered_descriptors_.erase(descriptor);
The ptr ( void* ptr = events[i].data.ptr) may been free in the epoll_reacor::close_descriptor.
Change History (2)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I assume you mean asio 1.4.5 / boost 1.43. The line:
registered_descriptors_.erase(descriptor);
does not free the memory. The node is placed on a free-list and is not deleted until the io_service is destroyed.
There is a bug epoll_reacor the version Release 1.45.0 In the file epoll_reactor.hpp, function epoll_reacor::run, line 369.
And the file epoll_reactor.hpp, function epoll_reacor::close_descriptor, line 256.
The ptr ( void* ptr = events[i].data.ptr) may been free in the epoll_reacor::close_descriptor.