[PATCH] D45775: [sanitizer] Minor refactor of some ReservedAddressRange functions

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 18 09:10:33 PDT 2018


cryptoad created this revision.
cryptoad added reviewers: alekseyshl, flowerhack.
Herald added subscribers: Sanitizers, delcypher, kubamracek.

Some of the functions had spurious conditional statements and checks, and some
intermediary variables that I feel made the code more complicated than it needs
to be. Also, when unmapping the whole range, the range size would be 0, but
the base was set to the address of the end of the range, which sounds prone to
error. I think nulling out the base in this scenario is a better way to go.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D45775

Files:
  lib/sanitizer_common/sanitizer_fuchsia.cc
  lib/sanitizer_common/sanitizer_posix_libcdep.cc
  lib/sanitizer_common/sanitizer_win.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45775.142950.patch
Type: text/x-patch
Size: 4194 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180418/362f6913/attachment.bin>


More information about the llvm-commits mailing list