[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 04:28:10 PST 2018
krytarowski added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:9099
+
+INTERCEPTOR(void, arc4random_addrandom, u64 *dat, int datlen) {
+ void *ctx;
----------------
u64 -> unsigned char
================
Comment at: test/sanitizer_common/TestCases/Posix/arc4random.cc:15
+
+ arc4random_buf(buf, sizeof(buf));
+ return 0;
----------------
Please print buf.
```
printf("buf: '");
for (size_t i = 0; i < sizeof buf; i++)
printf("%" PRIx8, buf[i]);
printf("'\n");
```
and
`CHECK: buf '{{.*}}`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56125/new/
https://reviews.llvm.org/D56125
More information about the llvm-commits
mailing list