[PATCH] D55554: [HWASAN/rt] Implement support for memory intrinsics
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 12 13:07:07 PST 2018
eugenis added a comment.
In D55554#1328211 <https://reviews.llvm.org/D55554#1328211>, @evgeny777 wrote:
> Addressed some of review comments
> Unfortunately I don't know how to use memset from __hwasan_memset, given this comment in `hwasan.cc`
>
> // ACHTUNG! No system header includes in this file.
>
I think it only matters for interceptors, where we need to redefine libc functions without knowing their exact signature. It should be OK to remove this comment an include <string.h>.
================
Comment at: lib/hwasan/hwasan.cc:532
+void *__hwasan_memset(void *block, int c, uptr size) {
+ CheckAddressSized<ErrorAction::Abort, AccessType::Store>(
+ reinterpret_cast<uptr>(block), size);
----------------
This way -fsanitize-recover does not apply to mem intrinsics. I think, for consistency, there needs to be a __hwasan_memset_noabort variant, used in instrumentation when !Recover.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55554/new/
https://reviews.llvm.org/D55554
More information about the llvm-commits
mailing list