[PATCH] D68431: [msan] Add interceptors: crypt, crypt_r.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 17:33:58 PDT 2019
vitalybuka added inline comments.
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:9593
+#if SANITIZER_INTERCEPT_CRYPT_R
+INTERCEPTOR(char *, crypt_r, char *key, char *salt, void *data) {
+ void *ctx;
----------------
why you don't check data?
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:9598
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1);
+ char *res = REAL(crypt)(key, salt);
+ if (res != nullptr)
----------------
REAL(crypt_r?
================
Comment at: compiler-rt/test/msan/crypt.cpp:7
+
+#include <sanitizer/msan_interface.h>
+
----------------
test in common could be nice as well
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68431/new/
https://reviews.llvm.org/D68431
More information about the llvm-commits
mailing list