[PATCH] [ASan] Fix asan_preload_test-2 on PowerPC64 Linux
Jay Foad
jay.foad at gmail.com
Wed Dec 24 03:14:52 PST 2014
Use write instead of memset.
http://reviews.llvm.org/D6776
Files:
test/asan/TestCases/Linux/asan_preload_test-2.cc
Index: test/asan/TestCases/Linux/asan_preload_test-2.cc
===================================================================
--- test/asan/TestCases/Linux/asan_preload_test-2.cc
+++ test/asan/TestCases/Linux/asan_preload_test-2.cc
@@ -10,11 +10,11 @@
#include <stdlib.h>
-extern "C" void *memset(void *p, int val, size_t n);
+extern "C" ssize_t write(int fd, const void *buf, size_t count);
void do_access(void *p) {
// CHECK: AddressSanitizer: heap-buffer-overflow
- memset(p, 0, 2);
+ write(1, p, 2);
}
int main(int argc, char **argv) {
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6776.17624.patch
Type: text/x-patch
Size: 555 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141224/5f576b1d/attachment.bin>
More information about the llvm-commits
mailing list