[PATCH] D65770: hwasan: Instrument globals.

2019-08-06 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368102: hwasan: Instrument globals. (authored by pcc, committed by ). Herald added a subscriber: delcypher. Changed prior to commit: https://reviews.llvm.org/D65770?vs=213477&id=213732#toc Repository:

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. The AOSP side of this is https://android-review.googlesource.com/c/platform/bionic/+/1096613 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65770/new/ https://reviews.llvm.org/D65770 _

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 213477. pcc added a comment. - Increment num_descriptions_printed in the right place Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65770/new/ https://reviews.llvm.org/D65770 Files: clang/lib/Driver/SanitizerArgs

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 213472. pcc added a comment. - Switch to an enum Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65770/new/ https://reviews.llvm.org/D65770 Files: clang/lib/Driver/SanitizerArgs.cpp clang/test/Driver/fsanitize.c

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc marked 3 inline comments as done. pcc added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan.cpp:221 + s32 gv_relptr; + u32 info; +}; vitalybuka wrote: > Can this be just following? > u32 size:24; > u8 tag; It could, but since these structs ar

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1203 + Constant *Initializer = GV->getInitializer(); + uint64_t SizeInBytes = + M.getDataLayout().getTypeAllocSize(Initializer->getType()); what is goi

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan.cpp:221 + s32 gv_relptr; + u32 info; +}; Can this be just following? u32 size:24; u8 tag; Comment at: compiler-rt/lib/hwasan/hwasan.cpp:236 -using namespace __h

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: hctim, vitalybuka. Herald added subscribers: Sanitizers, cfe-commits, hiraditya, kubamracek, srhines. Herald added projects: clang, Sanitizers, LLVM. Globals are instrumented by adding a pointer tag to their symbol values and emitting metadata into