This is an archive of the discontinued LLVM Phabricator instance.

[scudo][standalone] Add a standalone vector class
ClosedPublic

Authored by cryptoad on Feb 26 2019, 10:54 AM.

Details

Summary

This CL adds a standalone vector class that will be used by the scoped
strings when they land. We reimplement our own vector class because we
can't use the std library one.

It's mostly borrowed from the current sanitizer_common one, with LLVM
code style changes.

Additionnally a casing change in a function name that slipped through
the previous review (the function isn't used yet).

Diff Detail

Event Timeline

cryptoad created this revision.Feb 26 2019, 10:54 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 26 2019, 10:54 AM
Herald added subscribers: Restricted Project, delcypher, mgorny. · View Herald Transcript
vitalybuka accepted this revision.Feb 26 2019, 3:39 PM
vitalybuka added inline comments.
lib/scudo/standalone/vector.h
112

memcmp here does not look right (as in sanitizer common), as documented it works only for POD
if you don't need these operators, maybe it's safe just to remove them

This revision is now accepted and ready to land.Feb 26 2019, 3:39 PM
cryptoad marked 2 inline comments as done.Feb 27 2019, 8:09 AM
cryptoad added inline comments.
lib/scudo/standalone/vector.h
112

I removed both operators & swap that is for sure not used.
Some accessors (begin/end) are currently not used but are low cost so I figure I would leave them.

cryptoad updated this revision to Diff 188545.Feb 27 2019, 8:10 AM
cryptoad marked an inline comment as done.

Removing some unused functions.

cryptoad updated this revision to Diff 188550.Feb 27 2019, 8:26 AM

Rebasing.

This revision was automatically updated to reflect the committed changes.