[PATCH] D49252: [cfi] Don't pass a uint16_t to memset. Make sure the 16-bit constant is appropriate for us.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 12 10:24:18 PDT 2018
eugenis added inline comments.
================
Comment at: lib/cfi/cfi.cc:138
+ static_assert(kUncheckedShadow & 0xff == ((kUncheckedShadow >> 8) & 0xff));
+ memset(shadow_begin, kUncheckedShadow & 0xff,
(shadow_end - shadow_begin) * sizeof(*shadow_begin));
----------------
memset takes an int and converts it to unsigned char, so this masking should be unnecessary.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D49252
More information about the llvm-commits
mailing list