title: pstack in a shared library (c/c++). Corrupted shared library
body: <p>How can I corrupt a shared library?</p>
  
  <p>I have a process that attaches to several shared libraries. One action, eg createObject1 works 99% but 1% creates a pstack. The problem is not easy to reproduce, it happens sometimes in real time. </p>
  
  <p>The shared library has an array of various Object1. Before writing the new Object1, we are doing a get operation in order to see if the object already exists. The array is defined static at global scope and every object in the array is a pointer to an Object1. </p>
  
  <p>As I have already wrote 99% the code works fine. How can I debug the issue? Is it possible a memory leak to overwrite the static data of the shared library? </p>
  
  <p>Code in Linux</p>