Date: Sat, 21 May 2022 13:02:30 -0700 From: Mark Millard <marklmi@yahoo.com> To: Andrew Turner <andrew@freebsd.org>, dev-commits-src-main@freebsd.org Subject: Re: git: 0d6600b579be - main - Set mm before passing it to the UEFI firmware Message-ID: <0560AA26-3E4D-412E-8375-67B0D33DD096@yahoo.com> References: <0560AA26-3E4D-412E-8375-67B0D33DD096.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
If I understand the history that I'm looking at correctly, this Undefined Behavior usage error has existed since: QUOTE author Rebecca Cran <bcran@FreeBSD.org> 2019-03-06 05:39:40 +0000 committer Rebecca Cran <bcran@FreeBSD.org> 2019-03-06 05:39:40 +0000 commit ce37b71e6809fe5074be54230da9cf09543d3cdd (patch) tree 6dcce17c6e090289b79e78f72e3f2904d8ba171b /stand/efi/loader/bootinfo.c parent 151c6d102035a05ff5c62b7df02bb7b3247dd0f7 (diff) download src-ce37b71e6809fe5074be54230da9cf09543d3cdd.tar.gz src-ce37b71e6809fe5074be54230da9cf09543d3cdd.zip Add retry loop around GetMemoryMap call to fix fragmentation bug The call to BS->AllocatePages can cause the memory map to become framented, causing BS->GetMemoryMap to return EFI_BUFFER_TOO_SMALL more than once. For example this can happen on the MinnowBoard Turbot, causing the boot to stop with an error. Avoid this by calling GetMemoryMap in a loop. Reviewed by: imp, tsoome, kevans Differential Revision: https://reviews.freebsd.org/D19341 Notes Notes: svn path=/head/; revision=344839 END QUOTE So, I end up with the question: MFC to avoid depending on details of various toolchains' handling of the Undefined Behavior? === Mark Millard marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0560AA26-3E4D-412E-8375-67B0D33DD096>