MdeModulePkg/EbcDxe: Mitigate memcpy intrinsics

Assignments of structure values cause the emission of memcpy()
intrinsics by the CLANG38 toolchain. Substitute the assignments with
calls to CopyMem() to mitigate the issue.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin H?user <mhaeuser@posteo.de>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
Marvin H?user
2021-08-16 04:11:56 +08:00
committed by mergify[bot]
parent 77d5fa8024
commit b04453d36b
3 changed files with 15 additions and 3 deletions

View File

@ -158,7 +158,11 @@ DebuggerBreakpointDel (
// Delete this breakpoint
//
for (BpIndex = Index; BpIndex < DebuggerPrivate->DebuggerBreakpointCount - 1; BpIndex++) {
DebuggerPrivate->DebuggerBreakpointContext[BpIndex] = DebuggerPrivate->DebuggerBreakpointContext[BpIndex + 1];
CopyMem (
&DebuggerPrivate->DebuggerBreakpointContext[BpIndex],
&DebuggerPrivate->DebuggerBreakpointContext[BpIndex + 1],
sizeof (DebuggerPrivate->DebuggerBreakpointContext[BpIndex])
);
}
ZeroMem (
&DebuggerPrivate->DebuggerBreakpointContext[BpIndex],