[PATCH] D28589: [asan] Refactor instrumentation of globals.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 11:52:53 PST 2017
pcc added inline comments.
================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1621-1628
+ unsigned SizeOfGlobalStruct = DL.getTypeAllocSize(Initializer->getType());
+ assert(isPowerOf2_32(SizeOfGlobalStruct) &&
+ "global metadata will not be padded appropriately");
+
+ // The MSVC linker always inserts padding when linking incrementally. We
+ // cope with that by aligning each struct to its size, which must be a power
+ // of two.
----------------
eugenis wrote:
> pcc wrote:
> > I guess we can move this part into `InstrumentGlobalsCOFF` as a separate functional change.
> Actually this is not COFF-specific. See https://reviews.llvm.org/D28573. The comment update got lost somehow.
Can you please update the comment, then?
================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1654
+ }
+}
+
----------------
eugenis wrote:
> pcc wrote:
> > .
> ?
Ignore this, phab wouldn't delete my comment
Repository:
rL LLVM
https://reviews.llvm.org/D28589
More information about the llvm-commits
mailing list