coreboot-kgpe-d16/tests/lib
Patrick Georgi c59426f60d malloc/memalign: Return NULL if the request is too large
It's what this function family is defined to do, we currently don't
usually run into the case (see: not too many die() instances going
around), it's more useful to try to recover, and the JPEG parser can run
into it if the work buffer size exceeds the remaining heap, whereas its
sole user (the bootsplash code) knows what to do when seeing a NULL.

Use xmalloc() if you want an allocation that either works or dies.

tl;dr: That code path isn't usually taken. Right now it crashes. With
this patch it _might_ survive. There is a use-case for doing it like
that now.

Change-Id: I262fbad7daae0ca3aab583fda00665a2592deaa8
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80226
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-01-29 19:12:43 +00:00
..
Makefile.mk tests: Rename Makefiles from .inc to .mk 2024-01-26 12:43:08 +00:00
b64_decode-test.c
bootmem-test.c
cbfs-lookup-test.c
cbfs-verification-test.c
cbmem_console-test.c
cbmem_stage_cache-test.c
compute_ip_checksum-test.c
coreboot_table-test.c
crc_byte-test.c
dimm_info_util-test.c
edid-test.c
fmap-test.c
hexstrtobin-test.c
imd-test.c
imd_cbmem-test.c
lib-test.c
libgcc-test.c
list-test.c
lzma-test.c
malloc-test.c malloc/memalign: Return NULL if the request is too large 2024-01-29 19:12:43 +00:00
memchr-test.c
memcmp-test.c
memcpy-test.c
memmove-test.c
memrange-test.c
memset-test.c
region_file-test.c
rtc-test.c
spd_cache-test.c
stack-test.c
string-test.c
timestamp-test.c
uuid-test.c
ux_locales-test.c