]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
fix leak-segv-jmp test for platforms with 64K pagesize
authorPetar Jovanovic <mips32r2@gmail.com>
Fri, 3 Feb 2017 01:19:55 +0000 (01:19 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Fri, 3 Feb 2017 01:19:55 +0000 (01:19 +0000)
Increase the size of allocated array, so mprotect call does not end up
protecting non-allocated areas. This enables the test to work on
platforms with pagesize=64K.

Issue discovered on MIPS XLP machine with 64K pagesize.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16220

memcheck/tests/leak-segv-jmp.c
memcheck/tests/leak-segv-jmp.stderr.exp

index 1d1f84ca74fa6b7a7cb1a9e54214d3e817355e5c..86235b74023b860f3ab59c2e423915ee9020044a 100644 (file)
@@ -287,7 +287,7 @@ void f(void)
    long pagesize;
 #define RNDPAGEDOWN(a) ((long)a & ~(pagesize-1))
    int i;
-   const int nr_ptr = (10000 * 4)/sizeof(char*);
+   const int nr_ptr = (10000 * 20)/sizeof(char*);
 
    b10 = calloc (nr_ptr * sizeof(char*), 1);
    for (i = 0; i < nr_ptr; i++)
index 1ee37cdf803723a4d80272f615a13ad6c04f54a6..f455bd5735987bfddb101adad3f42218501f405e 100644 (file)
@@ -6,7 +6,7 @@ LEAK SUMMARY:
    definitely lost: 0 bytes in 0 blocks
    indirectly lost: 0 bytes in 0 blocks
      possibly lost: 0 bytes in 0 blocks
-   still reachable: 41,000 bytes in 2 blocks
+   still reachable: 201,000 bytes in 2 blocks
         suppressed: 0 bytes in 0 blocks
 Reachable blocks (those to which a pointer was found) are not shown.
 To see them, rerun with: --leak-check=full --show-leak-kinds=all
@@ -21,7 +21,7 @@ LEAK SUMMARY:
    definitely lost: 1,000 bytes in 1 blocks
    indirectly lost: 0 bytes in 0 blocks
      possibly lost: 0 bytes in 0 blocks
-   still reachable: 40,000 bytes in 1 blocks
+   still reachable: 200,000 bytes in 1 blocks
         suppressed: 0 bytes in 0 blocks
 Reachable blocks (those to which a pointer was found) are not shown.
 To see them, rerun with: --leak-check=full --show-leak-kinds=all
@@ -37,7 +37,7 @@ LEAK SUMMARY:
    definitely lost: 1,000 bytes in 1 blocks
    indirectly lost: 0 bytes in 0 blocks
      possibly lost: 0 bytes in 0 blocks
-   still reachable: 40,000 bytes in 1 blocks
+   still reachable: 200,000 bytes in 1 blocks
         suppressed: 0 bytes in 0 blocks
 Reachable blocks (those to which a pointer was found) are not shown.
 To see them, rerun with: --leak-check=full --show-leak-kinds=all
@@ -53,7 +53,7 @@ LEAK SUMMARY:
    definitely lost: 1,000 bytes in 1 blocks
    indirectly lost: 0 bytes in 0 blocks
      possibly lost: 0 bytes in 0 blocks
-   still reachable: 40,000 bytes in 1 blocks
+   still reachable: 200,000 bytes in 1 blocks
         suppressed: 0 bytes in 0 blocks
 Reachable blocks (those to which a pointer was found) are not shown.
 To see them, rerun with: --leak-check=full --show-leak-kinds=all
@@ -65,7 +65,7 @@ expecting heuristic not to crash after full mprotect
    by 0x........: f (leak-segv-jmp.c:295)
    by 0x........: main (leak-segv-jmp.c:370)
 
-40,000 bytes in 1 blocks are possibly lost in loss record ... of ...
+200,000 bytes in 1 blocks are possibly lost in loss record ... of ...
    at 0x........: calloc (vg_replace_malloc.c:...)
    by 0x........: f (leak-segv-jmp.c:342)
    by 0x........: main (leak-segv-jmp.c:370)
@@ -73,8 +73,8 @@ expecting heuristic not to crash after full mprotect
 LEAK SUMMARY:
    definitely lost: 1,000 bytes in 1 blocks
    indirectly lost: 0 bytes in 0 blocks
-     possibly lost: 40,000 bytes in 1 blocks
-   still reachable: 40,000 bytes in 1 blocks
+     possibly lost: 200,000 bytes in 1 blocks
+   still reachable: 200,000 bytes in 1 blocks
         suppressed: 0 bytes in 0 blocks
 Reachable blocks (those to which a pointer was found) are not shown.
 To see them, rerun with: --leak-check=full --show-leak-kinds=all
@@ -83,19 +83,19 @@ finished
 LEAK SUMMARY:
    definitely lost: 1,000 bytes in 1 blocks
    indirectly lost: 0 bytes in 0 blocks
-     possibly lost: 40,000 bytes in 1 blocks
-   still reachable: 40,000 bytes in 1 blocks
+     possibly lost: 200,000 bytes in 1 blocks
+   still reachable: 200,000 bytes in 1 blocks
         suppressed: 0 bytes in 0 blocks
 Rerun with --leak-check=full to see details of leaked memory
 
 leaked:     1000 bytes in  1 blocks
-dubious:    40000 bytes in  1 blocks
-reachable:  40000 bytes in  1 blocks
+dubious:    200000 bytes in  1 blocks
+reachable:  200000 bytes in  1 blocks
 suppressed:   0 bytes in  0 blocks
 
 HEAP SUMMARY:
-    in use at exit: 81,000 bytes in 3 blocks
-  total heap usage: 3 allocs, 0 frees, 81,000 bytes allocated
+    in use at exit: 401,000 bytes in 3 blocks
+  total heap usage: 3 allocs, 0 frees, 401,000 bytes allocated
 
 For a detailed leak analysis, rerun with: --leak-check=full