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 tests: Add lib/lzma-test test case 2021-10-14 13:13:07 +00:00
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 tests/include: Move EMPTY_WRAP() macro to tests/include/test.h 2022-02-10 21:16:49 +00:00
lib malloc/memalign: Return NULL if the request is too large 2024-01-29 19:12:43 +00:00
mock tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
stubs tests/stubs/console: Allow enabling printk to print to stdout 2021-09-13 14:00:57 +00:00
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