title: Segmentation fault by locking a mutex
body: <p>I'm here to ask your opinion.
  I'm new in a big project so I will try to describe the simple example as I see it.</p>
  
  <p>The top backtrace is</p>
  
  <pre><code>#0  0xb6adfc6d in pthread_mutex_lock () from /usr/lib/libpthread.so.0
  #1  0x080d8565 in boost::mutex::lock() ()
  #2  0x080d8613 in boost::unique_lock&lt;boost::mutex&gt;::lock() ()
  #3  0x080d8642 in boost::unique_lock&lt;boost::mutex&gt;::unique_lock(boost::mutex&amp;)
  #4  0x...      in ???    //just ??? in stack
  #5  0x...      in ???
  #6  0x...      in ???
  </code></pre>
  
  <p>It seems the mutex does not exist but it is created in class contructor. 
  Example:</p>
  
  <pre><code>class A
  {
    boost::mutex::scoped_lock mutex_;
  public:
    A(): mutex_() {}
  
    void Read (...)
    {
      //some checks
      boost::mutex::scoped_lock lock(mutex_); // &lt;-- Segfault
      //read
    }
  
    void Write (...)
    {
      //some checks
      boost::mutex::scoped_lock lock(mutex_);
      //write
    }
  };
  </code></pre>
  
  <p>It seems strange for me because I have no idea the reason of the segfault or possible ways to find the root cause.
  I would be glad to hear your any advises about this one.</p>