title: Sanitizers in Python native module
body: <p>I would like to use GCC's sanitizers for a native module.</p>
  
  <p>I use the link options:</p>
  
  <pre><code>-static-libasan -static-libtsan -static-liblsan -static-libubsan -fsanitize=address -lasan -lubsan
  </code></pre>
  
  <p>When I load the native module it prints the error message:</p>
  
  <pre><code>ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
  </code></pre>
  
  <p>Now this seems like the static flags not working.
  Is it possible to use sanitizers for a shared object only or is it necessary to have sanitizers linked into python3 directly?</p>