[PATCH] D56125: [Sanitizer] Intercept arc4random_buf on FreeBSD/NetBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 28 03:59:07 PST 2018


krytarowski added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:9092
+  COMMON_INTERCEPTOR_ENTER(ctx, arc4random_buf, buf, len);
+  if (buf)
+    COMMON_INTERCEPTOR_READ_RANGE(ctx, buf, len);
----------------
`(buf && len)`


================
Comment at: test/asan/TestCases/Posix/arc4random.cc:3
+//
+// Darwin supports it, would need interception in its specific code before enabling it.
+// Linux does not support it but only via third party library.
----------------
I would drop L3-L7, at most put it in commit message.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56125/new/

https://reviews.llvm.org/D56125





More information about the llvm-commits mailing list