[PATCH] Change internal allocator in sanitizer tools
Kostya Serebryany
kcc at google.com
Thu Apr 18 21:58:33 PDT 2013
================
Comment at: lib/sanitizer_common/sanitizer_allocator.cc:58
@@ +57,3 @@
+static void *RawInternalAlloc(uptr size) {
+ BlockingMutexLock l(&internal_allocator_mu);
+ if (!internal_allocator_inited) {
----------------
Boooooo.
================
Comment at: lib/sanitizer_common/sanitizer_allocator.cc:59
@@ +58,3 @@
+ BlockingMutexLock l(&internal_allocator_mu);
+ if (!internal_allocator_inited) {
+ internal_allocator.Init();
----------------
can't we init in in __*san_init ?
================
Comment at: lib/sanitizer_common/sanitizer_common.h:64
@@ -63,1 +63,3 @@
void InternalFree(void *p);
+// Use this to make sure tool mappings doesn't overlap with memory reserved
+// for internal allocator.
----------------
do you really need this?
If you initialize the thing in __*san_init, mmaps will simply bark if the mapping is wrong.
http://llvm-reviews.chandlerc.com/D671
More information about the llvm-commits
mailing list