Opened 9 years ago

Last modified 9 years ago

#8611 new Bugs

pthread functions are called without checking return values for error

Reported by: Richard <legalize@…> Owned by: Frank Mori Hess
Milestone: To Be Determined Component: signals2
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Description

This is similar to https://svn.boost.org/trac/boost/ticket/2681

The errors are detected by coverity static analysis.

58    void lock()
59    {

CID 11713: Unchecked return value
60        pthread_mutex_lock(&m_);
61    }

68    void unlock()
69    {
  
CID 11714 (#1 of 1): Unchecked return value (CHECKED_RETURN)
1. check_return: Calling function "pthread_mutex_unlock(pthread_mutex_t *)" without checking return value (as is done elsewhere 6 out of 7 times). 
2. unchecked_value: No check of the return value of "pthread_mutex_unlock(&this->m_)". 
70        pthread_mutex_unlock(&m_);
71    }

Change History (3)

comment:1 by viboes, 9 years ago

Owner: changed from Frank Mori Hess to viboes
Status: newassigned

Do you want the same outcome than #2681?

comment:2 by Richard <legalize@…>, 9 years ago

I think using BOOST_VERIFY as was done in the other changeset is entirely reasonable.

comment:3 by viboes, 9 years ago

Owner: changed from viboes to Frank Mori Hess
Status: assignednew
Note: See TracTickets for help on using tickets.