Commit 0fdc7a4
loader: Propagate OOM from loader_add_to_ext_list in two call sites
loader_add_to_ext_list() returns VkResult and documents that
VK_ERROR_OUT_OF_HOST_MEMORY signals allocation failure, but two call
sites discarded the return value entirely:
1. loader_read_layer_json() – when appending an instance extension from
a layer's JSON manifest the OOM path silently drops the extension and
continues. The device-extension block directly below it correctly
checks the analogous loader_add_to_dev_ext_list() return value;
bring instance-extension parsing in line with it.
2. terminator_EnumerateInstanceExtensionProperties() – when merging
implicit-layer extensions into the local list the return value was
ignored. On allocation failure the function continues with an
incomplete list and returns VK_SUCCESS to the application, violating
the Vulkan spec guarantee that a successful count query returns the
full set of available extensions.
Capture the return value in both sites and propagate
VK_ERROR_OUT_OF_HOST_MEMORY via the existing 'goto out' paths.
Fixes: silent OOM swallowing in loader_read_layer_json
Fixes: silent OOM swallowing in terminator_EnumerateInstanceExtensionProperties
Reviewed-by: (pending)1 parent 70e3d87 commit 0fdc7a4
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3018 | 3018 | | |
3019 | 3019 | | |
3020 | 3020 | | |
3021 | | - | |
| 3021 | + | |
| 3022 | + | |
3022 | 3023 | | |
3023 | 3024 | | |
3024 | 3025 | | |
| |||
7617 | 7618 | | |
7618 | 7619 | | |
7619 | 7620 | | |
7620 | | - | |
| 7621 | + | |
| 7622 | + | |
| 7623 | + | |
| 7624 | + | |
7621 | 7625 | | |
7622 | 7626 | | |
7623 | 7627 | | |
| |||
0 commit comments