[Bug 264021] efi: failed to allocate staging area: 9

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 21 May 2022 11:06:54 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264021

--- Comment #12 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=0d6600b579be769b85f049ef421023316f21b5c3

commit 0d6600b579be769b85f049ef421023316f21b5c3
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-05-21 10:45:41 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-05-21 10:45:41 +0000

    Set mm before passing it to the UEFI firmware

    When reading the UEFI memory map we pass in a pointer to the memory to
    hold the map. Unfortunately it wasn't initialised before the first use
    so clang decided it was undefined behaviour so the entire loop was
    removed. This leads to everything in bi_load after this to also be
    removed as dead code.

    The next function after bi_load in the binary is efi_copy_init. The
    above caused us to enter efi_copy_init with a return address of the
    start of the function. Because of this it would enter an infinite
    loop of calling the function, allocating memory, then returning to
    the start of the function.

    PR:             264021

 stand/efi/loader/bootinfo.c | 1 +
 1 file changed, 1 insertion(+)

-- 
You are receiving this mail because:
You are the assignee for the bug.