This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Safe allocator tests
ClosedPublic

Authored by AdvenamTacet on Mar 8 2023, 9:58 AM.

Details

Reviewers
philnik
Group Reviewers
Restricted Project
Commits
rGe3dd9f7e66fe: [libc++] Safe allocator tests
Summary

This revision adds:

  • New test allocator, which cleans memory during allocation and deallocation,
  • tests using that allocator to vector.

This patch is part of our efforts to add support for ASan annotations with every
allocator.

This commit adds a new allocator for testing purposes only. The safe allocator
ensures that memory is cleand (zeroed) during allocation and deallocation, and
is intendted to test ASan annotations for every allocator in std::vector.
Check: D136765

Those tests should work correctly, even if support for every allocator in std::vector
is not yet available.

Support in ASan API was added here: rGdd1b7b797a116eed588fd752fbe61d34deeb24e4

Diff Detail

Event Timeline

AdvenamTacet created this revision.Mar 8 2023, 9:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2023, 9:58 AM
AdvenamTacet requested review of this revision.Mar 8 2023, 9:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2023, 9:58 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik accepted this revision.Mar 8 2023, 10:08 AM

Thanks! LGTM with green CI.

This revision is now accepted and ready to land.Mar 8 2023, 10:08 AM

By mistake I used old version of files from D136765, this update fixes it, using newest files.

AdvenamTacet retitled this revision from Safe allocator tests to [libc++] Safe allocator tests.Mar 9 2023, 1:19 AM

This only updates a commit on which patch is applied. No real changes.
That's a try to get green CI, I strongly believe that failing tests are not related to the change.

This revision was automatically updated to reflect the committed changes.