lewisje / address-sanitizer

Automatically exported from code.google.com/p/address-sanitizer
0 stars 0 forks source link

Standalone LSan reports false positive in __sanitizer::InitTlsSize() #220

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Repro:

#include <dlfcn.h>                                                              

int main() {                                                                    

  void *handle = dlopen("/usr/lib/mozilla/plugins/netscapesecuritywrapper.so",                                                                                                                               
                        RTLD_NOW);                                                                                                                                                                           
  dlclose(handle);                                                                                                                                                                                           
}                                                                               

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x4023bd in calloc san/llvm/projects/compiler-rt/lib/lsan/lsan_interceptors.cc:74
    #1 0x7f6b12bff59f in _dlerror_run /build/buildd/eglibc-2.15/dlfcn/dlerror.c:142
    #2 0x7f6b12bff099 in __dlsym /build/buildd/eglibc-2.15/dlfcn/dlsym.c:71
    #3 0x40db66 in __sanitizer::InitTlsSize() san/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc:181
    #4 0x406008 in __lsan::Init() san/llvm/projects/compiler-rt/lib/lsan/lsan.cc:47
    #5 0x40237c in calloc san/llvm/projects/compiler-rt/lib/lsan/lsan_interceptors.cc:73
    #6 0x7f6b12bff59f in _dlerror_run /build/buildd/eglibc-2.15/dlfcn/dlerror.c:142
    #7 0x7f6b12bfefc0 in __dlopen /build/buildd/eglibc-2.15/dlfcn/dlopen.c:88
    #8 0x4124c9 in main (reproducers/a.out+0x4124c9)
    #9 0x7f6b11c2976c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226
    #10 0x4123f0 in _start (reproducers/a.out+0x4123f0)

Original issue reported on code.google.com by earth...@google.com on 10 Sep 2013 at 3:21

GoogleCodeExporter commented 9 years ago
r195642 fixes this

Original comment by earth...@google.com on 25 Nov 2013 at 2:30

GoogleCodeExporter commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Original comment by ramosian.glider@gmail.com on 30 Jul 2015 at 9:13