[HWASan] Apply TagMaskByte to every global tag.
authorMatt Morehouse <mascasa@google.com>
Mon, 1 Nov 2021 13:29:34 +0000 (06:29 -0700)
committerMatt Morehouse <mascasa@google.com>
Mon, 1 Nov 2021 13:31:44 +0000 (06:31 -0700)
commit4d8b0aa5c0c3ca386c130ab153ae3720100bcd81
tree99ce9df822b6775eb94dcd3a0d22a20660eaff0e
parentb298d6d16203586771ded6ac88c692c8d1dcabfd
[HWASan] Apply TagMaskByte to every global tag.

Previously we only applied it to the first one, which could allow
subsequent global tags to exceed the valid number of bits.

Reviewed By: hctim

Differential Revision: https://reviews.llvm.org/D112853
compiler-rt/test/hwasan/TestCases/globals-wrap-tag.c [new file with mode: 0644]
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp