This is an archive of the discontinued LLVM Phabricator instance.

[HWASan] do not replace lifetime intrinsics with tagged address.
ClosedPublic

Authored by fmayer on Mar 16 2022, 11:40 AM.

Details

Summary

Quote from the LLVM Language Reference

If ptr is a stack-allocated object and it points to the first byte of the
object, the object is initially marked as dead. ptr is conservatively
considered as a non-stack-allocated object if the stack coloring algorithm
that is used in the optimization pipeline cannot conclude that ptr is a
stack-allocated object.

By replacing the alloca pointer with the tagged address before this change,
we confused the stack coloring algorithm.

Diff Detail

Unit TestsFailed

Event Timeline

fmayer created this revision.Mar 16 2022, 11:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2022, 11:40 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
fmayer requested review of this revision.Mar 16 2022, 11:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2022, 11:40 AM
fmayer edited the summary of this revision. (Show Details)Mar 16 2022, 11:47 AM
fmayer added a reviewer: eugenis.
eugenis accepted this revision.Mar 17 2022, 2:20 PM

LGTM, nice!

This revision is now accepted and ready to land.Mar 17 2022, 2:20 PM
This revision was landed with ongoing or failed builds.Mar 18 2022, 9:45 AM
This revision was automatically updated to reflect the committed changes.
fmayer reopened this revision.Mar 18 2022, 10:05 AM
This revision is now accepted and ready to land.Mar 18 2022, 10:05 AM
fmayer updated this revision to Diff 416559.Mar 18 2022, 10:35 AM

skip if aarch64 target is not registered

This revision was landed with ongoing or failed builds.Mar 18 2022, 10:40 AM
This revision was automatically updated to reflect the committed changes.