[PATCH] D46545: [sanitizer] Add fgets, fputs and puts into sanitizer_common
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 01:17:01 PDT 2018
krytarowski added inline comments.
================
Comment at: lib/msan/msan_interceptors.cc:752
- ENSURE_MSAN_INITED();
- InterceptorScope interceptor_scope;
- char *res = REAL(fgets)(s, size, stream);
----------------
Lekensteyn wrote:
> FYI: This was added in https://reviews.llvm.org/D42884, but I believe that the `COMMON_INTERCEPTOR_ENTER` macro in `lib/msan/msan_interceptors.cc` covers this now.
Right, the MSan macro COMMON_INTERCEPTOR_ENTER covers it.
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:1197
+ COMMON_INTERCEPTOR_ENTER(ctx, fgets, s, size, file);
+ // FIXME: under ASan the call below may write to freed memory and corrupt
+ // its metadata. See
----------------
Is this bug still valid? Is it Linux specific?
https://reviews.llvm.org/D46545
More information about the llvm-commits
mailing list