diff --git a/compiler-rt/lib/gwp_asan/crash_handler.h b/compiler-rt/lib/gwp_asan/crash_handler.h --- a/compiler-rt/lib/gwp_asan/crash_handler.h +++ b/compiler-rt/lib/gwp_asan/crash_handler.h @@ -1,4 +1,4 @@ -//===-- crash_handler_interface.h -------------------------------*- C++ -*-===// +//===-- crash_handler.h -----------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/gwp_asan/crash_handler.cpp b/compiler-rt/lib/gwp_asan/crash_handler.cpp --- a/compiler-rt/lib/gwp_asan/crash_handler.cpp +++ b/compiler-rt/lib/gwp_asan/crash_handler.cpp @@ -1,4 +1,4 @@ -//===-- crash_handler_interface.cpp -----------------------------*- C++ -*-===// +//===-- crash_handler.cpp ---------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/gwp_asan/definitions.h b/compiler-rt/lib/gwp_asan/definitions.h --- a/compiler-rt/lib/gwp_asan/definitions.h +++ b/compiler-rt/lib/gwp_asan/definitions.h @@ -1,4 +1,4 @@ -//===-- gwp_asan_definitions.h ----------------------------------*- C++ -*-===// +//===-- definitions.h -------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/gwp_asan/guarded_pool_allocator.h b/compiler-rt/lib/gwp_asan/guarded_pool_allocator.h --- a/compiler-rt/lib/gwp_asan/guarded_pool_allocator.h +++ b/compiler-rt/lib/gwp_asan/guarded_pool_allocator.h @@ -37,7 +37,7 @@ // GWP-ASan. The constructor value-initialises the class such that if no // further initialisation takes place, calls to shouldSample() and // pointerIsMine() will return false. - constexpr GuardedPoolAllocator(){}; + constexpr GuardedPoolAllocator() {} GuardedPoolAllocator(const GuardedPoolAllocator &) = delete; GuardedPoolAllocator &operator=(const GuardedPoolAllocator &) = delete; diff --git a/compiler-rt/lib/gwp_asan/optional/segv_handler.h b/compiler-rt/lib/gwp_asan/optional/segv_handler.h --- a/compiler-rt/lib/gwp_asan/optional/segv_handler.h +++ b/compiler-rt/lib/gwp_asan/optional/segv_handler.h @@ -1,4 +1,4 @@ -//===-- crash_handler.h -----------------------------------------*- C++ -*-===// +//===-- segv_handler.h ------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef GWP_ASAN_OPTIONAL_CRASH_HANDLER_H_ -#define GWP_ASAN_OPTIONAL_CRASH_HANDLER_H_ +#ifndef GWP_ASAN_OPTIONAL_SEGV_HANDLER_H_ +#define GWP_ASAN_OPTIONAL_SEGV_HANDLER_H_ #include "gwp_asan/guarded_pool_allocator.h" #include "gwp_asan/options.h" @@ -87,4 +87,4 @@ } // namespace crash_handler } // namespace gwp_asan -#endif // GWP_ASAN_OPTIONAL_CRASH_HANDLER_H_ +#endif // GWP_ASAN_OPTIONAL_SEGV_HANDLER_H_ diff --git a/compiler-rt/lib/gwp_asan/optional/segv_handler_posix.cpp b/compiler-rt/lib/gwp_asan/optional/segv_handler_posix.cpp --- a/compiler-rt/lib/gwp_asan/optional/segv_handler_posix.cpp +++ b/compiler-rt/lib/gwp_asan/optional/segv_handler_posix.cpp @@ -1,4 +1,4 @@ -//===-- crash_handler_posix.cpp ---------------------------------*- C++ -*-===// +//===-- segv_handler_posix.cpp ----------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/gwp_asan/platform_specific/common_posix.cpp b/compiler-rt/lib/gwp_asan/platform_specific/common_posix.cpp --- a/compiler-rt/lib/gwp_asan/platform_specific/common_posix.cpp +++ b/compiler-rt/lib/gwp_asan/platform_specific/common_posix.cpp @@ -1,4 +1,4 @@ -//===-- common_posix.cpp ---------------------------------*- C++ -*-===// +//===-- common_posix.cpp ----------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp b/compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp --- a/compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp +++ b/compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp @@ -28,7 +28,7 @@ android_set_abort_message(Message); abort(); } -#else // __BIONIC__ +#else // __BIONIC__ void Check(bool Condition, const char *Message) { if (Condition) return; @@ -63,7 +63,7 @@ #ifdef __BIONIC__ static constexpr AlignmentStrategy PlatformDefaultAlignment = AlignmentStrategy::BIONIC; -#else // __BIONIC__ +#else // __BIONIC__ static constexpr AlignmentStrategy PlatformDefaultAlignment = AlignmentStrategy::POWER_OF_TWO; #endif // __BIONIC__ diff --git a/compiler-rt/lib/gwp_asan/random.cpp b/compiler-rt/lib/gwp_asan/random.cpp --- a/compiler-rt/lib/gwp_asan/random.cpp +++ b/compiler-rt/lib/gwp_asan/random.cpp @@ -18,9 +18,7 @@ GWP_ASAN_TLS_INITIAL_EXEC uint32_t RandomState = 0xff82eb50; namespace gwp_asan { -void initPRNG() { - RandomState = time(nullptr) + getThreadID(); -} +void initPRNG() { RandomState = time(nullptr) + getThreadID(); } uint32_t getRandomUnsigned32() { RandomState ^= RandomState << 13; diff --git a/compiler-rt/lib/gwp_asan/utilities.h b/compiler-rt/lib/gwp_asan/utilities.h --- a/compiler-rt/lib/gwp_asan/utilities.h +++ b/compiler-rt/lib/gwp_asan/utilities.h @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// +#ifndef GWP_ASAN_UTILITIES_H_ +#define GWP_ASAN_UTILITIES_H_ + #include "gwp_asan/definitions.h" #include @@ -29,3 +32,5 @@ size_t RealAllocationSize, AlignmentStrategy Align = AlignmentStrategy::DEFAULT); } // namespace gwp_asan + +#endif // GWP_ASAN_UTILITIES_H_