coreboot-kgpe-d16/tests
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
..
acpi tests: Rename Makefiles from .inc to .mk 2024-01-26 12:43:08 +00:00
commonlib tests: Rename Makefiles from .inc to .mk 2024-01-26 12:43:08 +00:00
console tests: Rename Makefiles from .inc to .mk 2024-01-26 12:43:08 +00:00
data/lib/lzma-test
device tests: Rename Makefiles from .inc to .mk 2024-01-26 12:43:08 +00:00
drivers tests: Rename Makefiles from .inc to .mk 2024-01-26 12:43:08 +00:00
include
lib malloc/memalign: Return NULL if the request is too large 2024-01-29 19:12:43 +00:00
mock
stubs
Makefile.common tests: Rename Makefiles from .inc to .mk 2024-01-26 12:43:08 +00:00
Makefile.mk tests: Rename Makefiles from .inc to .mk 2024-01-26 12:43:08 +00:00