[PATCH] D41481: Small fixes for detect_invalid_pointer_pairs.
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 15:30:21 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL323162: Small fixes for detect_invalid_pointer_pairs. (authored by alekseyshl, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D41481?vs=127836&id=130974#toc
Repository:
rL LLVM
https://reviews.llvm.org/D41481
Files:
compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc
compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc
Index: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc
===================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc
@@ -6,7 +6,7 @@
#include <stdlib.h>
int bar(char *p, char *q) {
- return p <= q;
+ return p - q;
}
char global[10000] = {};
Index: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc
===================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc
@@ -10,8 +10,12 @@
}
char global1[100] = {}, global2[100] = {};
+char __attribute__((used)) smallest_global[5] = {};
char small_global[7] = {};
+char __attribute__((used)) little_global[10] = {};
+char __attribute__((used)) medium_global[4000] = {};
char large_global[5000] = {};
+char __attribute__((used)) largest_global[6000] = {};
int main() {
// Heap allocated memory.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41481.130974.patch
Type: text/x-patch
Size: 1160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180122/f7653c84/attachment.bin>
More information about the llvm-commits
mailing list