icd:Increase WHOLE_SIZE mapped memory
authorTobin Ehlis <tobine@google.com>
Tue, 14 Nov 2017 20:05:22 +0000 (13:05 -0700)
committerTobin Ehlis <tobine@google.com>
Fri, 17 Nov 2017 16:38:09 +0000 (09:38 -0700)
Bump hard-coded mapped memory allocation size for WHOLE_SIZE from 4k to
64k. One validation test (InvalidMemoryMapping) was mapping 64k of
memory that was leading to segF as the 4k buffer was overwritten when
shadowed.

scripts/mock_icd_generator.py

index 7a10c5d..3366aa1 100644 (file)
@@ -648,9 +648,9 @@ CUSTOM_C_INTERCEPTS = {
 ''',
 'vkMapMemory': '''
     unique_lock_t lock(global_lock);
-    // TODO: Just hard-coding 4k whole size for now
+    // TODO: Just hard-coding 64k whole size for now
     if (VK_WHOLE_SIZE == size)
-        size = 4096;
+        size = 0x10000;
     void* map_addr = malloc((size_t)size);
     mapped_memory_map[memory].push_back(map_addr);
     *ppData = map_addr;