This is an archive of the discontinued LLVM Phabricator instance.

[sancov] Generalize the code to get the previous instruction to multiple architectures
ClosedPublic

Authored by george.karpenkov on Oct 9 2018, 1:52 PM.

Details

Summary

sancov subtracts one from the address to get the previous instruction, which makes sense on x86_64, but not on other platforms.
This change ensures that the offset is correct for different platforms.
The logic for computing the offset is copied from sanitizer_common.

Diff Detail