Repository navigation
Remove usage of alloca() & create vk_loader_platform.c - #2076
Conversation
|
CI Vulkan-Loader build queued with queue ID 166139. |
|
CI Vulkan-Loader build queued with queue ID 166156. |
3abbebe to
599624d
Compare
|
CI Vulkan-Loader build queued with queue ID 166170. |
|
CI Vulkan-Loader build # 3878 running. |
|
CI Vulkan-Loader build queued with queue ID 166213. |
|
CI Vulkan-Loader build # 3879 running. |
|
CI Vulkan-Loader build # 3879 passed. |
599624d to
65c6535
Compare
|
CI Vulkan-Loader build queued with queue ID 166300. |
|
CI Vulkan-Loader build queued with queue ID 166317. |
|
CI Vulkan-Loader build # 3881 running. |
|
CI Vulkan-Loader build # 3881 failed. |
65c6535 to
bde8fab
Compare
|
CI Vulkan-Loader build queued with queue ID 166345. |
|
CI Vulkan-Loader build queued with queue ID 166362. |
bde8fab to
6e353b4
Compare
|
CI Vulkan-Loader build queued with queue ID 166364. |
|
CI Vulkan-Loader build # 3884 running. |
|
CI Vulkan-Loader build # 3884 passed. |
6e353b4 to
ae13d1c
Compare
|
CI Vulkan-Loader build queued with queue ID 166469. |
|
CI Vulkan-Loader build queued with queue ID 166486. |
|
CI Vulkan-Loader build # 3886 running. |
|
CI Vulkan-Loader build # 3886 passed. |
`= {};` is a compiler extension.
ae13d1c to
f259cbd
Compare
|
CI Vulkan-Loader build queued with queue ID 166513. |
|
CI Vulkan-Loader build # 3887 running. |
|
CI Vulkan-Loader build queued with queue ID 166531. |
f259cbd to
ea850e0
Compare
|
CI Vulkan-Loader build queued with queue ID 166532. |
|
CI Vulkan-Loader build # 3889 running. |
|
CI Vulkan-Loader build queued with queue ID 166568. |
|
CI Vulkan-Loader build # 3890 running. |
ea850e0 to
ae3d4f1
Compare
|
CI Vulkan-Loader build queued with queue ID 166589. |
|
CI Vulkan-Loader build # 3891 running. |
|
CI Vulkan-Loader build queued with queue ID 166608. |
|
CI Vulkan-Loader build # 3892 running. |
|
CI Vulkan-Loader build # 3892 passed. |
Also replaces the usage of loader_fopen in asm_offset.c with the per platform calls as it was the only function from vk_loader_platform.h used by asm_offset. This prevents needing to compile vk_loader_platform.c in the asm_offset executable.
ae3d4f1 to
7e49533
Compare
|
CI Vulkan-Loader build queued with queue ID 167276. |
|
CI Vulkan-Loader build queued with queue ID 167293. |
Alloca is not considered good practice and its usage has caused crashes for users. Removing stack_allocation.h improving the allocating handling logic across the codebase, since many places avoided returning out-of- host-memory (OOHM) errors by using alloca instead of a real allocation. This is done by passing a bool pointer out parameter to indicate an OOHM error condition has occured. In addition to the refactoring for OOHM, helpers for converting utf-8 to ucs (aka wide chars to multi-byte chars) were added, since they too need to allocate memory to hold the converted string.
7e49533 to
a298a75
Compare
|
CI Vulkan-Loader build queued with queue ID 167322. |
|
CI Vulkan-Loader build # 3897 running. |
|
CI Vulkan-Loader build # 3897 passed. |
|
Went through extensive review from claude, found many major and minor issues which have all been resolved. |
Create vk_loader_platform.c to hold function definitions
Also replaces the usage of loader_fopen in asm_offset.c with the per
platform calls as it was the only function from vk_loader_platform.h
used by asm_offset. This prevents needing to compile
vk_loader_platform.c in the asm_offset executable.
Remove alloca from codebase
Alloca is not considered good practice and its usage has caused crashes
for users. Removing stack_allocation.h improving the allocating handling
logic across the codebase, since many places avoided returning out-of-
host-memory (OOHM) errors by using alloca instead of a real allocation.
This is done by passing a bool pointer out parameter to indicate an OOHM
error condition has occured.
In addition to the refactoring for OOHM, helpers for converting utf-8 to
ucs (aka wide chars to multi-byte chars) were added, since they too need
to allocate memory to hold the converted string.