HomePhabricator

[ASAN] Properly deal with musttail calls in ASAN

Authored by lxfind on Sep 18 2020, 11:10 PM.

Description

[ASAN] Properly deal with musttail calls in ASAN

When address sanitizing a function, stack unpinsoning code is inserted before each ret instruction. However if the ret instruciton is preceded by a musttail call, such transformation broke the musttail call contract and generates invalid IR.
This patch fixes the issue by moving the insertion point prior to the musttail call if there is one.

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

Details

Committed
lxfindSep 18 2020, 11:10 PM
Differential Revision
D87777: [ASAN] Properly deal with musttail calls in ASAN
Parents
rG132aaec4f27e: [IRSim] Adding ilist for IRInstructionData.
Branches
Unknown
Tags
Unknown