[PATCH] D15871: [sanitizer coverage] coverage pc buffer
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 4 15:53:45 PST 2016
kcc added inline comments.
================
Comment at: include/sanitizer/coverage_interface.h:45
@@ +44,3 @@
+ // Set *data to the growing buffer with covered PCs and return the size
+ // if the buffer. The entries are never zero.
+ uintptr_t __sanitizer_get_coverage_pc_buffer(uintptr_t **data);
----------------
.. of the ...
Isn't the return value the same as __sanitizer_get_total_unique_coverage() ?
If so, it should be reflected in the comment or in the interface
================
Comment at: lib/sanitizer_common/sanitizer_coverage_libcdep.cc:215
@@ -211,1 +214,3 @@
+ pc_buffer = reinterpret_cast<uptr *>(
+ MmapNoReserveOrDie(sizeof(uptr) * kPcArrayMaxSize, "CovInit::pc_buffer"));
----------------
just in case, hide it under a flag (coverage_pc_buffer?).
We can make the flag on by default.
================
Comment at: test/asan/TestCases/coverage-pcbuffer.cc:4
@@ +3,3 @@
+// RUN: %clangxx_asan -fsanitize-coverage=edge %s -o %t
+// RUN: %env_asan_opts=coverage=1 %run %t
+
----------------
do you need coverage=1 here?
http://reviews.llvm.org/D15871
More information about the llvm-commits
mailing list