Valgrind: r16218 - /trunk/perf/bigcode.c

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Valgrind: r16218 - /trunk/perf/bigcode.c

Author: petarj
Date: Thu Feb  2 17:24:14 2017
New Revision: 16218

Add PROT_READ flag to mmap, as Valgrind needs to be able to read the
code before it executes it.

This fixes none/tests/bigcode on some MIPS platforms.


Modified: trunk/perf/bigcode.c
--- trunk/perf/bigcode.c (original)
+++ trunk/perf/bigcode.c Thu Feb  2 17:24:14 2017
@@ -75,7 +75,7 @@
    printf("%d copies of f(), %d reps\n", n_fns, n_reps);
    char* a = mmap(0, FN_SIZE * n_fns,
-                     PROT_EXEC|PROT_WRITE,
+                     PROT_EXEC|PROT_WRITE|PROT_READ,
                      MAP_PRIVATE|MAP_ANONYMOUS, -1,0);
    assert(a != (char*)MAP_FAILED);

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Valgrind-developers mailing list
[hidden email]