unsigned num_planes = process_buf(buf, planes);
for (unsigned p = 0; p < num_planes; p++) {
+ // This should not work!
+ ptrs[i][p] = test_mmap(NULL, planes[p].length,
+ PROT_READ | PROT_WRITE, MAP_SHARED, node->fd, 0);
+ fail_on_test(ptrs[i][p] != MAP_FAILED);
+ }
+
+ for (unsigned p = 0; p < num_planes; p++) {
ptrs[i][p] = malloc(planes[p].length);
fail_on_test(ptrs[i][p] == NULL);
}
fail_on_test(expbuf_planes[p].length < planes[p].length);
for (unsigned p = 0; p < num_planes; p++) {
+ // This should not work!
+ ptrs[i][p] = test_mmap(NULL, planes[p].length,
+ PROT_READ | PROT_WRITE, MAP_SHARED, node->fd, 0);
+ fail_on_test(ptrs[i][p] != MAP_FAILED);
+ }
+
+ for (unsigned p = 0; p < num_planes; p++) {
memset(&expbuf, 0, sizeof(expbuf));
expbuf.type = expbuf_bufs.type;
expbuf.index = i;