Fix a CFI bad cast error on ARM32.

This bad cast error was already being suppressed on Linux because it
occurred in a reinterpret_cast_ptr (which became a reinterpret_cast
via a macro) in Vector.h, and was therefore being suppressed by a
blacklist entry for Vector.h. But on ARM32, reinterpret_cast_ptr is not
a macro but rather a function in StdLibExtras.h that wraps a
reinterpret_cast, and therefore was not covered by the blacklist entry.

Fix the bad cast error by introducing a function named
unsafe_reinterpret_cast_ptr which is meant to be used to CFI-unsafely
cast between pointer types, and start using it in Vector.h. We
should now no longer need to blacklist Vector.h (the last attempt
to remove it from the blacklist was reverted due to a test failure
in HeapTest.VectorDestructorsWithVtable, which is exactly the test
that this change fixes on ARM32).

Bug: 469376
Change-Id: I83906d8f5fbd19069f82bfc18f608d9a1532b3be
Reviewed-on: https://chromium-review.googlesource.com/768268
Reviewed-by: Yuta Kitamura <yutak@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516346}
GitOrigin-RevId: 9820798dba990bcc5f1b9ad0e262844745fb175d
1 file changed
tree: 6274ccb0f4f935368bda69618a965c6c1354188c
  1. blacklist.txt
  2. OWNERS