Summary:
This corrects intercepting this call on NetBSD without false positives.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, eugenis, vitalybuka
Reviewed By: vitalybuka
Subscribers: llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D42884
llvm-svn: 325207
INTERCEPTOR(char *, fgets, char *s, int size, void *stream) {
ENSURE_MSAN_INITED();
+ InterceptorScope interceptor_scope;
char *res = REAL(fgets)(s, size, stream);
if (res)
__msan_unpoison(s, REAL(strlen)(s) + 1);