Page MenuHomePhabricator

[asan] Fixed a bug causing a crash when redzone optimization kicked in on X86 with -asan-optimize-callbacks flag on.

Authored by kstoimenov on Sep 17 2021, 4:00 PM.



This change adds the ASan intrinsic to the list whihc are setting hasCopyImplyingStackAdjustment.

Diff Detail

Event Timeline

kstoimenov created this revision.Sep 17 2021, 4:00 PM
kstoimenov requested review of this revision.Sep 17 2021, 4:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 17 2021, 4:00 PM

Added tests.

Switched to using AdjustsStack instead of HasCopyImplyingStackAdjustment.

Removed dead code.

Switched to AdjustsStack. PTAL.

eugenis added inline comments.Sep 21 2021, 11:48 AM

Does the intrinsic have to be x86-specific? AFAIK it is fine to have x86-specific handling of a generic intrinsic.


CHECK-NEXT, or CHECK-NOT: something-%rbp to make sure we are not force-enabling the frame pointer

kstoimenov marked an inline comment as done.

Moved back to generic intrinsic.

After rebase.

Added a blank line back.

kstoimenov marked an inline comment as done.Sep 21 2021, 2:59 PM
kstoimenov added inline comments.

I reverted it back to a generic intrinsic.

eugenis accepted this revision.Sep 21 2021, 3:19 PM



This comment simply repeats what the next line says, in the exact same words.
It would be better to briefly explain why this is needed instead.

This revision is now accepted and ready to land.Sep 21 2021, 3:19 PM

Fixed a comment.

kstoimenov marked an inline comment as done.

Fixed a comment.

This revision was landed with ongoing or failed builds.Sep 21 2021, 3:26 PM
This revision was automatically updated to reflect the committed changes.