Try to catch OOM errors when loading binaries
authorCharles Giessen <charles@lunarg.com>
Thu, 8 Dec 2022 00:15:22 +0000 (17:15 -0700)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Fri, 13 Jan 2023 18:14:13 +0000 (11:14 -0700)
commit366966e85b85fdfce8e365360cd37bb28bb9a642
tree02fdfb3ce7188f07973cdf9a1099d62c0f24ebb7
parent2b1fce945e473c416842f131f3a7cb2bb3b5defe
Try to catch OOM errors when loading binaries

If there is an error loading a dynamic library, check to see if it is
the result of an OOM condition. Then return the appropriate OOM error
code up the callchain. This commit is the result of an OOM condition
when trying to load the validation layers, which resulted in the return
code VK_ERROR_LAYER_NOT_PRESENT. This is very misleading. If the
loader can catch then report more accurate information, then it should.
loader/loader.c
loader/loader_common.h