[compiler-rt] r270949 - [esan] Fix workingset-memset test failure
Derek Bruening via llvm-commits
llvm-commits at lists.llvm.org
Thu May 26 18:47:28 PDT 2016
Author: bruening
Date: Thu May 26 20:47:27 2016
New Revision: 270949
URL: http://llvm.org/viewvc/llvm-project?rev=270949&view=rev
Log:
[esan] Fix workingset-memset test failure
Fixes an esan workingset-memset test failure by switching to malloc to
avoid a shadow mapping issue with mmap in certain situations that will be
fully fixed separately.
Modified:
compiler-rt/trunk/test/esan/TestCases/workingset-memset.cpp
Modified: compiler-rt/trunk/test/esan/TestCases/workingset-memset.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/esan/TestCases/workingset-memset.cpp?rev=270949&r1=270948&r2=270949&view=diff
==============================================================================
--- compiler-rt/trunk/test/esan/TestCases/workingset-memset.cpp (original)
+++ compiler-rt/trunk/test/esan/TestCases/workingset-memset.cpp Thu May 26 20:47:27 2016
@@ -8,13 +8,12 @@
#include <string.h>
int main(int argc, char **argv) {
- const int size = 128*1024*1024;
- char *p = (char *)mmap(0, size, PROT_READ | PROT_WRITE,
- MAP_ANON | MAP_PRIVATE, -1, 0);
+ const int iters = 630;
+ const int size = 64*iters;
+ char *p = (char *)malloc(size);
// Test the slowpath at different cache line boundaries.
for (int i = 0; i < 630; i++)
memset((char *)p + 63*i, i, 63*i);
- munmap(p, size);
return 0;
// FIXME: once the memory scan and size report is in place add it here.
// CHECK: {{.*}}EfficiencySanitizer is not finished: nothing yet to report
More information about the llvm-commits
mailing list