title: dlopen errors in glibc
body: <p>I am trying to debug an issue with dlopen that happens at random times.</p>
  
  <p>I don't have a reproducer for this issue. basically when i run an executable under <strong>valgrind</strong> I get this error occasionally.</p>
  
  <p>my_file.cxx</p>
  
  <p><code>line 342: void* h = dlopen( "libstream.so", RTLD_GLOBAL | RTLD_NOW);</code></p>
  
  <pre><code>Invalid write of size 2
     at 0x3F4B0184CE: mempcpy (memcpy.S:79)
     by 0x3F4B0059F9: open_path (dl-load.c:1866)
     by 0x3F4B00871B: _dl_map_object (dl-load.c:2086)
     by 0x3F4B00C381: openaux (dl-deps.c:65)
     by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
     by 0x3F4B00CA64: _dl_map_object_deps (dl-deps.c:247)
     by 0x3F4B012B61: dl_open_worker (dl-open.c:268)
     by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
     by 0x3F4B0125A9: _dl_open (dl-open.c:587)
     by 0x3F4C000F65: dlopen_doit (dlopen.c:67)
     by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
     by 0x3F4C00129B: _dlerror_run (dlerror.c:164)
   Address 0x7fefccf50 is on thread 1's stack
  
  Syscall param open(filename) points to unaddressable byte(s)
     at 0x3F4B016EB7: open (syscall-template.S:82)
     by 0x3F4B00542F: open_verify (dl-load.c:1638)
     by 0x3F4B005ADA: open_path (dl-load.c:1883)
     by 0x3F4B00871B: _dl_map_object (dl-load.c:2086)
     by 0x3F4B00C381: openaux (dl-deps.c:65)
     by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
     by 0x3F4B00CA64: _dl_map_object_deps (dl-deps.c:247)
     by 0x3F4B012B61: dl_open_worker (dl-open.c:268)
     by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
     by 0x3F4B0125A9: _dl_open (dl-open.c:587)
     by 0x3F4C000F65: dlopen_doit (dlopen.c:67)
     by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
   Address 0x7fefccf50 is on thread 1's stack
  
  Invalid write of size 1
     at 0x3F4B0184BE: mempcpy (memcpy.S:67)
     by 0x3F4B0059F9: open_path (dl-load.c:1866)
     by 0x3F4B00871B: _dl_map_object (dl-load.c:2086)
     by 0x3F4B00C381: openaux (dl-deps.c:65)
     by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
     by 0x3F4B00CA64: _dl_map_object_deps (dl-deps.c:247)
     by 0x3F4B012B61: dl_open_worker (dl-open.c:268)
     by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
     by 0x3F4B0125A9: _dl_open (dl-open.c:587)
     by 0x3F4C000F65: dlopen_doit (dlopen.c:67)
     by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
     by 0x3F4C00129B: _dlerror_run (dlerror.c:164)
   Address 0x7fefccf50 is on thread 1's stack
  </code></pre>
  
  <p>I am thinking this is a possible cause 
  <a href="https://sourceware.org/bugzilla/show_bug.cgi?id=13618" rel="nofollow">https://sourceware.org/bugzilla/show_bug.cgi?id=13618</a></p>
  
  <p>Thanks</p>