[LSan] Add dynamic loading support for LSan library 50/192250/6
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 31 Oct 2018 14:52:22 +0000 (17:52 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 11 Jan 2019 14:04:38 +0000 (17:04 +0300)
commiteeee3b9cb9bc61aa4628bc2f4231098bcb053cf0
treec2aa4997309bd24e3d11ae78b49f3ab856d75410
parent446908d74aabb0048636a8b97476ed95918fd7be
[LSan] Add dynamic loading support for LSan library

The LSan library has very big static TLS section

Problem:
  - LSan library could not be loaded dynamically because it had a very
    big static TLS section.
        AllocatorCache: ~15KB for 32bit
                        ~53KB for 64bit
Solution:
  - Store in the TLS section only a pointer to the AllocatorCache and
    dynamically allocate memory for it.

Change-Id: I6e90e6682e277c90825938f5732867b6564d62b4
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
libsanitizer/lsan/lsan_allocator.cc