Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: d1fccbf494a4f38f803cb8288dd6b08ec7b98dcc https://github.com/tianocore/edk2/commit/d1fccbf494a4f38f803cb8288dd6b08ec7b98dcc Author: Doug Cook (WINDOWS) <dc...@microsoft.com> Date: 2024-12-17 (Tue, 17 Dec 2024)
Changed paths: M EmulatorPkg/Win/Host/WinBlockIo.c Log Message: ----------- EmulatorPkg: spurious failure in WriteBlocks on X64 WinNtBlockIoWriteBlocks can spuriously fail on X64. This occurs because &BytesWritten is a `UINTN*` (i.e. `UINT64*`) but is cast to `LPDWORD` (i.e. `UINT32*`). Only the low 32 bits are initialized by WriteFile, so the high 32 bits are uninitialized. This means we will spuriously fail the `BytesWritten != BufferSize` test. This doesn't occur on X86-32 since UINTN is the same as DWORD in that case. Fix is to declare BytesWritten as DWORD to match the type expected by WriteFile. This also makes the cast unnecessary. Signed-off-by: Doug Cook <idigd...@gmail.com> To unsubscribe from these emails, change your notification settings at https://github.com/tianocore/edk2/settings/notifications _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits