HomePhabricator

[sanitizer] Implement MapDynamicShadowAndAliases.

Authored by morehouse on Mar 23 2021, 11:21 AM.

Description

[sanitizer] Implement MapDynamicShadowAndAliases.

The function works like MapDynamicShadow, except that it creates aliased
memory to the right of the shadow. The main use case is for HWASan
aliasing mode, which gets fast IsAlias() checks by exploiting the fact
that the upper bits of the shadow base and aliased memory match.

Reviewed By: vitalybuka, eugenis

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