Page MenuHomePhabricator

Reland "Make TracePcGuardController linker-initialized"
ClosedPublic

Authored by phosek on Jan 12 2018, 5:03 PM.

Details

Summary

This broke check-tsan because of linter issues.

Diff Detail

Event Timeline

phosek created this revision.Jan 12 2018, 5:03 PM
Herald added subscribers: Restricted Project, llvm-commits, kubamracek. · View Herald TranscriptJan 12 2018, 5:03 PM

clang-format and lib/sanitizer_common/scripts/cpplint.py disagree about whitespace before braces.

mcgrathr added a project: Restricted Project.Jan 12 2018, 5:07 PM

I wonder if cpplint.py is worthwhile any more. Perhaps it should be replaced by a check that clang-format doesn't decide to change anything.

@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?

@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

lib/sanitizer_common/sanitizer_coverage_fuchsia.cc
116–120
BlockingMutex setup_lock_ = {LINKER_INITIALIZED};
uptr *array_ = nullptr;
u32 next_index_ = 0;
zx_handle_t vmo _ = {};
char vmo_name_[ZX_MAX_NAME_LEN] = {};
phosek updated this revision to Diff 130679.Jan 19 2018, 1:15 PM
phosek marked an inline comment as done.
vitalybuka accepted this revision.Feb 14 2018, 5:55 PM
This revision is now accepted and ready to land.Feb 14 2018, 5:55 PM
phosek closed this revision.Mar 7 2018, 10:18 AM