This is an archive of the discontinued LLVM Phabricator instance.

[DFSan] Avoid replacing uses of functions in comparisions.
ClosedPublic

Authored by browneee on Apr 13 2022, 11:50 AM.

Details

Summary

This can cause crashes by accidentally optimizing out checks for
extern_weak_func != nullptr, when replaced with a known-not-null wrapper.

This solution isn't perfect (only avoids replacement on specific patterns)
but should address common cases.

Internal reference: b/185245029

Diff Detail

Event Timeline

browneee created this revision.Apr 13 2022, 11:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 11:50 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
browneee requested review of this revision.Apr 13 2022, 11:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 11:50 AM
vitalybuka accepted this revision.Apr 14 2022, 12:33 PM
This revision is now accepted and ready to land.Apr 14 2022, 12:33 PM
This revision was landed with ongoing or failed builds.Apr 14 2022, 2:15 PM
This revision was automatically updated to reflect the committed changes.