summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/PiDxeS3BootScriptLib
diff options
context:
space:
mode:
authorMike Beaton <mjsbeaton@gmail.com>2025-11-27 00:45:23 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-12-03 15:29:51 +0300
commit12751d48e215de110a245151f76d3deff39bfe70 (patch)
treeb1abfe299e6f4ed562eaa26634355de68bb546e3 /MdeModulePkg/Library/PiDxeS3BootScriptLib
parent939ebe48e6d6e157b0768368445a51172fee53b9 (diff)
downloadedk2-12751d48e215de110a245151f76d3deff39bfe70.tar.xz
BaseTools/VfrCompile: Fix EFI_GUID unaligned access
The memmove in SetClassGuid at line 684 generates a `store to misaligned address` runtime warning when VfrCompile is compiled with clang UBSan. We can avoid generating code which stores to a misaligned address in a least a couple of other ways than done here, including casting the destination pointer of the memmove to (VOID *), or compiling with `-fno-builtin-memmove`. However, maintaining an unaligned pointer to an aligned type is, strictly speaking, undefined behaviour in the c/c++ standard (regardless of how it is or is not then accessed). So here we resolve the actual incorrect semantics of this part of the code (and thereby fix the unaligned access) by introducing a PACKED_EFI_GUID type in VfrUtilityLib.h, and using it for this unaligned access. Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib')
0 files changed, 0 insertions, 0 deletions