[PATCH] Thread registry for standalone LSan.
Sergey Matveev
earthdok at google.com
Wed May 8 03:36:09 PDT 2013
> Do I understand correctly that lsan_thread.h will be used both by standalone lsan and by lsan bundled with asan/etc?
Since ASan already has a thread registry, we should just modify it so it can implement GetThreadRangesLocked. I don't think there would be a lot of common code to factor out here.
We could reuse this module for MSan, which doesn't have a thread registry of its own. But it's too early for that now.
================
Comment at: lib/lsan/lsan_thread.h:31
@@ +30,3 @@
+ uptr tls_end() { return tls_end_; }
+ uptr cache_begin() { return cache_begin_; }
+ uptr cache_end() { return cache_end_; }
----------------
Kostya Serebryany wrote:
> You are exposing the guts of allocator in the interface, which is ungood.
> Does the user need to know about allocator caches, or all it cares is that this range should be ignored?
> How about something like this?
> uptr num_ignored_ranges();
> uptr ignored_begin(uptr idx)
> uptr ignored_end(uptr idx)
>
> If there is going to be just one ignored range, then rename cache_begin to ignored_begin (same for cache_end)
Following our offline discussion: let's regard this interface as WIP, until we know what exactly needs to be filtered out in ASan/MSan.
http://llvm-reviews.chandlerc.com/D761
More information about the llvm-commits
mailing list