summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/test/asan/TestCases/heap-overflow-large.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/test/asan/TestCases/heap-overflow-large.cc b/compiler-rt/test/asan/TestCases/heap-overflow-large.cc
index eb2fcc3220e..566b1158a5d 100644
--- a/compiler-rt/test/asan/TestCases/heap-overflow-large.cc
+++ b/compiler-rt/test/asan/TestCases/heap-overflow-large.cc
@@ -15,9 +15,9 @@ int main(int argc, char *argv[]) {
int *x = new int[5];
memset(x, 0, sizeof(x[0]) * 5);
int index = atoi(argv[1]);
- int res = x[index];
+ unsigned res = x[index];
// CHECK: main
// CHECK-NOT: CHECK failed
delete[] x;
- return res ? res : 1;
+ return (res % 10) + 1;
}
OpenPOWER on IntegriCloud