[PATCH] D56207: Update allocator unit tests to test the `RemoteAddressSpaceView` template instantiation.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 2 10:42:52 PST 2019


delcypher created this revision.
delcypher added reviewers: kcc, vitalybuka, dvyukov, cryptoad, eugenis, george.karpenkov, yln.
Herald added subscribers: Sanitizers, kubamracek.

These tests use a `VMContext` object that is set to read the local
address space. As a consequence these tests don't actually
really test the remote read functionality but they do:

- Check that the allocators can be instantiated with

`RemoteAddressSpaceView` as the `AddressSpaceView` type on all
platforms.

- Check that in-process enumeration still works correctly when the allocator is instatiated with `RemoteAddressSpaceView`.
- Check that the size of the allocators doesn't change when instantiated with `LocalAddressSpaceView` or `RemoteAddressSpaceView`.

Ideally we'd check that the entire data layout of the classes hasn't
changed when changing the `AddressSpaceView` template parameter.
Unfortunately doing that manually would be a significant amount of work
that would hinder maintainability, so for now we just don't check the
data layout.

rdar://problem/45284065


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D56207

Files:
  lib/sanitizer_common/tests/sanitizer_allocator_test.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56207.179890.patch
Type: text/x-patch
Size: 10144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190102/ba971ecb/attachment.bin>


More information about the llvm-commits mailing list