[PATCH] Thread registry for standalone LSan.

Kostya Serebryany kcc at google.com
Wed May 8 01:10:17 PDT 2013


  Do I understand correctly that lsan_thread.h will be used both by standalone lsan and by lsan bundled with asan/etc?
  How about renaming lsan_thread.cc into lsan_sa_thread.cc ("sa" for standalone)?

  Also, please submit a first minimal version of clang.llvm.org/docs/LeakSanitizer.html before any other lsan commits


================
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_; }
----------------
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)


http://llvm-reviews.chandlerc.com/D761



More information about the llvm-commits mailing list