[PATCH] D58686: [scudo][standalone] Adding vector, bytemap & stats

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 10:40:01 PST 2019


cryptoad abandoned this revision.
cryptoad marked 3 inline comments as done.
cryptoad added a comment.

Redoing as 3 separate patches as per Vitaly's request. With some replies to comments.



================
Comment at: lib/scudo/standalone/CMakeLists.txt:44
+  bytemap.h
+  internal_defs.h
+  linux.h
----------------
vitalybuka wrote:
> This patch should be 3 patches.
I will redo that in 3 patches.


================
Comment at: lib/scudo/standalone/bytemap.h:58
+    memset(Level1Map, 0, sizeof(atomic_uptr) * Level1Size);
+  }
+
----------------
vitalybuka wrote:
> I assume this is mostly fork from sanitizer_common.
> I do not insists, but it would be nice to do that it two steps:
> 1. Patch with unmodified copy (maybe single large patch for all files used in standalone version) so that fabricator shows this as a copy
> 2. Patch with changes
So this is tricky.
There are enough form changes to have a diff be significantly unreadable:
- g3 code style becomes llvm code style (changing casing, function names, variable names)
- g3 clang-format becomes llvm code format (spacing, line cuts)
Added on top of that are content changes (not as many platforms supported, less backward compat "hacks").


================
Comment at: lib/scudo/standalone/vector.h:20
+// small vectors. The current implementation supports only POD types.
+template <typename T> class VectorNoCtor {
+public:
----------------
vitalybuka wrote:
> have you considered to use std::vector with custom allocator?
We are compiling with -nostdinc++ and no standard c++ library as well (to be included in a libc).
So we are reimplementing basic c++ classes like that.


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58686/new/

https://reviews.llvm.org/D58686





More information about the llvm-commits mailing list