summaryrefslogtreecommitdiffstats
path: root/tools/valgrind/vbug205541.patch
blob: 3ab721a38e383b75d5312d8044b53e3ca54efea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# See https://bugs.kde.org/show_bug.cgi?id=205541#c1
Index: memcheck/mc_main.c
===================================================================
--- memcheck/mc_main.c	(revision 10877)
+++ memcheck/mc_main.c	(working copy)
@@ -3708,7 +3708,14 @@
    if (rr || ww || xx)
       MC_(make_mem_defined)(a, len);
    else
-      MC_(make_mem_noaccess)(a, len);
+      MC_(make_mem_defined)(a, len);
+      /* State after     mmap(,,PROT_NONE,,,) should match
+       * state after mprotect(,,PROT_NONE):  the operating system
+       * will trap any access, but any subsequent mprotect(,,PROT_R|W|X)
+       * will re-instate the previous V bits [in this case, all valid].
+       * See comment in  mc_pre_clo_init()  re:
+       *       VG_(track_change_mem_mprotect) ( NULL );
+       */
 }
 
 static