[PATCH] D53975: Start adding the supporting code to perform out-of-process allocator enumeration.
George Karpenkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 11:25:17 PST 2018
george.karpenkov added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_allocator_secondary.h:284
+ // Copy header pointer into this process
+ auto t = ObjectView::MakeView(header_ptr_addr);
+
----------------
I think writing
`auto t = ObjectView::MakeView(&chunks_[i])`
is considerably more clear.
@kcc Would that be better with you?
We can also do an implicit constructor and write
`ObjectView t = &chunks_[i]`
================
Comment at: lib/sanitizer_common/sanitizer_allocator_secondary.h:290
+ auto t2 = ObjectView::MakeView(&chunks_[i]);
+ CHECK_EQ(static_cast<Header *>(t), static_cast<Header *>(t2));
+ if (ObjectView::IsLocal()) {
----------------
Cast seems to be the wrong operator here, why not `*` ?
Then we could write
`CHECK_EQ(*t, *ObjectView::MakeView(&chunks_[i]))`
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D53975
More information about the llvm-commits
mailing list