Disable Control-Flow Integrity in SkTArray when casting buffer to T*.
Disable Control-Flow Integrity in SkTArray when casting buffer to T*.

We disable Control-Flow Integrity sanitization (go/cfi) when updating
the item-array buffer. CFI flags this code as dangerous because we are
casting `buffer` to a T* while the buffer's contents might still be
uninitialized memory. When T has a vtable, this is especially risky
because we could hypothetically access a virtual method on fItemArray
and jump to an unpredictable location in memory. Of course, SkTArray
won't actually use fItemArray in this way, and we don't want to
construct a T before the user requests one. There's no real risk here,
so disable CFI when doing these casts.

Change-Id: I5708053339f4a600b12c841fcd38880f9932f7d6
Bug: skia:13339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542643
Commit-Queue: Ben Wagner <53965154ffeecc4a10886eab9259e95965f2979a@google.com>
Auto-Submit: John Stiles <f4fcf42d3bb5924557f1eeb3be66747535e585da@google.com>
Reviewed-by: Ben Wagner <53965154ffeecc4a10886eab9259e95965f2979a@google.com>

google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia