This is an archive of the discontinued LLVM Phabricator instance.

[ASan][libc++] Turn on ASan annotations for short strings
AbandonedPublic

Authored by AdvenamTacet on Apr 5 2023, 10:39 PM.

Details

Reviewers
philnik
Group Reviewers
Restricted Project
Summary

This patch turns on ASan annotations for short strings.

Revision D132769 adds ASan annotations for strings, but annotations for short strings are turned off.
An implementation from there is correct for both string types and support for the later may be easily turned on.
This revision does it.

Reasoning behind moving it here, to a different revision:

  • Long string annotations (with the default allocator only) work with old ASan API.
  • Short string annotations requires new ASan API (added in rGdd1b7b797a116eed588fd752fbe61d34deeb24e4).
  • If someone reports a problem with string annotations, it makes it much easier to know which patch exactly caused the problem.
  • Long string is almost same as std::vector, so chance for a problem with D132769 is minimal.

Diff Detail

Event Timeline

AdvenamTacet created this revision.Apr 5 2023, 10:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2023, 10:39 PM
AdvenamTacet requested review of this revision.Apr 5 2023, 10:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2023, 10:39 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
EricWF added a subscriber: EricWF.Apr 11 2023, 11:23 AM

Can you please update the patch so that it merges?

This update tries to fix the conflict problem.