If I understand the history that I'm looking at
correctly, this Undefined Behavior usage error
has existed since:

QUOTE
author  Rebecca Cran <[email protected]>        2019-03-06 05:39:40 +0000
committer       Rebecca Cran <[email protected]>        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


Reply via email to