HomePhabricator

[AddressSanitizer] Copy type metadata to prevent miscompilation

Authored by ddcc on Sep 26 2020, 3:04 PM.

Description

[AddressSanitizer] Copy type metadata to prevent miscompilation

When ASan and e.g. Dead Virtual Function Elimination are enabled, the
latter will rely on type metadata to determine if certain virtual calls can be
removed. However, ASan currently does not copy type metadata, which can cause
virtual function calls to be incorrectly removed.

Differential Revision: https://reviews.llvm.org/D88368