Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions MemoryModule.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ HMEMORYMODULE MemoryLoadLibraryEx(const void *data, size_t size,
} else {
result->isRelocated = TRUE;
}

// flush instruction cache to avoid executing stale code after performing relocations
FlushInstructionCache((HANDLE)-1, NULL, 0);

// load required dlls and adjust function table of imports
if (!BuildImportTable(result)) {
Expand Down