Subject: [Boost-bugs] [Boost C++ Libraries] #13562: Missing null pointer check in compensating_work_started
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-05-08 08:01:20
#13562: Missing null pointer check in compensating_work_started
------------------------------+----------------------------
Reporter: michael.lindig@⦠| Owner: chris_kohlhoff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost 1.66.0 | Severity: Problem
Keywords: |
------------------------------+----------------------------
In boost/asio/detail/impl/scheduler.ipp(275):
{{{
void scheduler::compensating_work_started()
{
thread_info_base* this_thread = thread_call_stack::contains(this);
++static_cast<thread_info*>(this_thread)->private_outstanding_work;
}
}}}
there is a missing null pointer check for this_thread, other routines have
one!
I saw the error comming from
boost/asio/detail/impl/epoll_reactor.ipp(712):
{{{
688 struct epoll_reactor::perform_io_cleanup_on_block_exit
689 {
690 explicit perform_io_cleanup_on_block_exit(epoll_reactor* r)
691 : reactor_(r), first_op_(0)
692 {
693 }
694
695 ~perform_io_cleanup_on_block_exit()
696 {
697 if (first_op_)
698 {
699 // Post the remaining completed operations for invocation.
700 if (!ops_.empty())
701 reactor_->scheduler_.post_deferred_completions(ops_);
702
703 // A user-initiated operation has completed, but there's no need
to
704 // explicitly call work_finished() here. Instead, we'll take
advantage of
705 // the fact that the scheduler will call work_finished() once we
return.
706 }
707 else
708 {
709 // No user-initiated operations have completed, so we need to
compensate
710 // for the work_finished() call that the scheduler will make
once this
711 // operation returns.
712 reactor_->scheduler_.compensating_work_started();
713 }
714 }
}}}
-- Ticket URL: <https://svn.boost.org/trac10/ticket/13562> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2018-05-08 08:04:53 UTC