[PATCH] D42022: Reland "Make TracePcGuardController linker-initialized"

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 12:40:01 PST 2018


vitalybuka added a comment.

In https://reviews.llvm.org/D42022#975484, @phosek wrote:

> @kcc @vitalybuka lib/sanitizer_common/scripts/cpplint.py and clang-format seem to disagree on formatting of static initializers which is breaking the build. It's likely that the version that's in tree doesn't even support static initializers. I tried to replace lib/sanitizer_common/scripts/cpplint.py with the latest version from https://github.com/cpplint/cpplint which resolves this issue but starts throwing errors for other files in compiler-rt. Do you have any suggestion/opinion on what to do about this?


Yeah, it's know and a little bit annoying issue. I've filed https://github.com/google/sanitizers/issues/906 We need to do something about that.
For now you can just follow whatever it's asking for, even if it's conflicts for clang-format. If it gets very ugly or impossible just put // NOLINT



================
Comment at: lib/sanitizer_common/sanitizer_coverage_fuchsia.cc:116
 
-  BlockingMutex setup_lock_;
-  uptr *array_;
-  u32 next_index_;
-  zx_handle_t vmo_;
-  char vmo_name_[ZX_MAX_NAME_LEN];
+  BlockingMutex setup_lock_ {LINKER_INITIALIZED};
+  uptr *array_ {};
----------------
  BlockingMutex setup_lock_ = {LINKER_INITIALIZED};
  uptr *array_ = nullptr;
  u32 next_index_ = 0;
  zx_handle_t vmo _ = {};
  char vmo_name_[ZX_MAX_NAME_LEN] = {};


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D42022





More information about the llvm-commits mailing list