Internal change
PiperOrigin-RevId: 519379125
diff --git a/fuzztest/internal/coverage.cc b/fuzztest/internal/coverage.cc
index 3a56b8c..23aa11e 100644
--- a/fuzztest/internal/coverage.cc
+++ b/fuzztest/internal/coverage.cc
@@ -78,7 +78,7 @@
}
void ExecutionCoverage::UpdateMaxStack(uintptr_t PC) {
- auto &stack = test_thread_stack;
+ auto& stack = test_thread_stack;
if (!stack ||
stack->stack_frame_before_calling_property_function == nullptr ||
stack->allocated_stack_region.empty()) {
@@ -102,7 +102,7 @@
// Reset back to !updating on any exit path.
Reset reset;
- const char *this_frame = GetCurrentStackFrame();
+ const char* this_frame = GetCurrentStackFrame();
if (this_frame < stack->allocated_stack_region.data() ||
stack->allocated_stack_region.data() +
stack->allocated_stack_region.size() <=
@@ -142,7 +142,7 @@
size_t ExecutionCoverage::MaxAllowedStackUsage() {
static const size_t cached = [] {
- const char *env = getenv("FUZZTEST_STACK_LIMIT");
+ const char* env = getenv("FUZZTEST_STACK_LIMIT");
size_t res;
if (env == nullptr || !absl::SimpleAtoi(env, &res)) {
static constexpr size_t kDefault = 128 * 1024;
@@ -369,7 +369,7 @@
// Use NO_SANITIZE_MEMORY and ADDRESS to skip possible errors on reading buffer.
GOOGLEFUZZTEST_NOSANITIZE
-static size_t InternalStrnlen(const char *s, size_t n) {
+static size_t InternalStrnlen(const char* s, size_t n) {
size_t len = 0;
while (len < n && s[len]) {
len++;
@@ -378,7 +378,7 @@
}
GOOGLEFUZZTEST_NOSANITIZE
-static size_t InternalStrlen(const char *s1, const char *s2) {
+static size_t InternalStrlen(const char* s1, const char* s2) {
size_t len = 0;
while (s1[len] && s2[len]) {
len++;
@@ -387,7 +387,7 @@
}
GOOGLEFUZZTEST_NOSANITIZE
-static void TraceMemCmp(const uint8_t *s1, const uint8_t *s2, size_t n,
+static void TraceMemCmp(const uint8_t* s1, const uint8_t* s2, size_t n,
int result) {
// Non-interesting cases.
if (n <= 1 || result == 0) return;
@@ -426,7 +426,7 @@
}
GOOGLEFUZZTEST_NOSANITIZE
-void __sanitizer_cov_trace_switch(uint64_t Val, uint64_t *Cases) {
+void __sanitizer_cov_trace_switch(uint64_t Val, uint64_t* Cases) {
uintptr_t PC = reinterpret_cast<uintptr_t>(__builtin_return_address(0));
switch (Cases[0]) {
case 8:
@@ -455,45 +455,45 @@
}
GOOGLEFUZZTEST_NOSANITIZE
-void __sanitizer_weak_hook_strcasecmp(void *, const char *s1, const char *s2,
+void __sanitizer_weak_hook_strcasecmp(void*, const char* s1, const char* s2,
int result) {
if (s1 == nullptr || s2 == nullptr) return;
size_t n = InternalStrlen(s1, s2);
- TraceMemCmp(reinterpret_cast<const uint8_t *>(s1),
- reinterpret_cast<const uint8_t *>(s2), n, result);
+ TraceMemCmp(reinterpret_cast<const uint8_t*>(s1),
+ reinterpret_cast<const uint8_t*>(s2), n, result);
}
GOOGLEFUZZTEST_NOSANITIZE
-void __sanitizer_weak_hook_memcmp(void *, const void *s1, const void *s2,
+void __sanitizer_weak_hook_memcmp(void*, const void* s1, const void* s2,
size_t n, int result) {
if (s1 == nullptr || s2 == nullptr) return;
- TraceMemCmp(reinterpret_cast<const uint8_t *>(s1),
- reinterpret_cast<const uint8_t *>(s2), n, result);
+ TraceMemCmp(reinterpret_cast<const uint8_t*>(s1),
+ reinterpret_cast<const uint8_t*>(s2), n, result);
}
GOOGLEFUZZTEST_NOSANITIZE
-void __sanitizer_weak_hook_strncmp(void *, const char *s1, const char *s2,
+void __sanitizer_weak_hook_strncmp(void*, const char* s1, const char* s2,
size_t n, int result) {
if (s1 == nullptr || s2 == nullptr) return;
size_t len1 = InternalStrnlen(s1, n);
size_t len2 = InternalStrnlen(s2, n);
n = std::min(std::min(n, len1), len2);
- TraceMemCmp(reinterpret_cast<const uint8_t *>(s1),
- reinterpret_cast<const uint8_t *>(s2), n, result);
+ TraceMemCmp(reinterpret_cast<const uint8_t*>(s1),
+ reinterpret_cast<const uint8_t*>(s2), n, result);
}
GOOGLEFUZZTEST_NOSANITIZE
-void __sanitizer_weak_hook_strcmp(void *, const char *s1, const char *s2,
+void __sanitizer_weak_hook_strcmp(void*, const char* s1, const char* s2,
int result) {
if (s1 == nullptr || s2 == nullptr) return;
size_t n = InternalStrlen(s1, s2);
- TraceMemCmp(reinterpret_cast<const uint8_t *>(s1),
- reinterpret_cast<const uint8_t *>(s2), n, result);
+ TraceMemCmp(reinterpret_cast<const uint8_t*>(s1),
+ reinterpret_cast<const uint8_t*>(s2), n, result);
}
GOOGLEFUZZTEST_NOSANITIZE
-void __sanitizer_weak_hook_strncasecmp(void *caller_pc, const char *s1,
- const char *s2, size_t n, int result) {
+void __sanitizer_weak_hook_strncasecmp(void* caller_pc, const char* s1,
+ const char* s2, size_t n, int result) {
if (s1 == nullptr || s2 == nullptr) return;
return __sanitizer_weak_hook_strncmp(caller_pc, s1, s2, n, result);
}