Opened 11 years ago

Closed 11 years ago

#5844 closed Support Requests (invalid)

read_write_mutex.cpp: suffers race condition

Reported by: noloader@… Owned by: viboes
Milestone: Component: thread
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc: viboes

Description

It appears race conditions exist in read_write_mutex.cpp.

class adjust_count, class adjust_dual_count, read_write_mutex_impl<Mutex>::do_read_unlock(). Example from adjust_dual_count:

void adjust_now(void)
{
  BOOST_ASSERT(max_count_ >= count_);

  if (adjust_)
  {
    BOOST_ASSERT(max_count_ > 0);
    if (count_ > 0)
      --count_;
    if (max_count_ > 0)
      --max_count_;
  }
  else
  {
    BOOST_ASSERT(max_count_ >= 0);
  }
  adjust_ = false;
}

Change History (4)

comment:1 by Jeffrey Walton <noloader@…>, 11 years ago

Component: Nonethread
Owner: set to Anthony Williams

comment:2 by viboes, 11 years ago

Cc: viboes added
Owner: changed from Anthony Williams to viboes
Status: newassigned

Hi,

sorry but I don't understand. Where is the file read_write_mutex.cpp?

comment:3 by viboes, 11 years ago

Type: BugsSupport Requests

comment:4 by viboes, 11 years ago

Milestone: To Be Determined
Resolution: invalid
Status: assignedclosed

Reopen it once you have clarified the file.

Note: See TracTickets for help on using tickets.