Opened 9 years ago
Closed 9 years ago
#8903 closed Bugs (fixed)
libs/regex/src/static_mutex.cpp: Ignores nearly all failures from pthread_* functions
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | regex |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | regex thread mutex pthread API failure | Cc: |
Description
libs/regex/src/static_mutex.cpp ignores nearly all failures from pthread_* functions. Functions include pthread_mutex_lock and pthread_mutex_unlock.
BOOST_VERIFY is used for debugging and diagnostic builds, but no actions are taken for failures in release or production builds.
Perhaps it would be a good idea to use boost/thread/pthread/mutex.hpp. It appears to have more stability and throws lock exceptions where appropriate.
Note:
See TracTickets
for help on using tickets.
Actually boost/thread/pthread/mutex.hpp uses BOOST_VERIFY for those operations, in particular since destructors should never throw exceptions it's hard to do much else for pthread_mutex_unlock. In any case those types aren't useable in static initialization which is a requirement for Regex.
I'll tighten up lock acquisition, and use BOOST_VERIFY in the lock free case.