You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using MemoryModule will cause access violation for large application built with runtime packages.
This happen to FixPtr function in ExecuteTLS.
This is due to the code was allocated via VirtualAlloc to allocate memory at arbitrary position:
// reserve memory for image of library// XXX: is it correct to commit the complete memory region at once?// calling DllEntry raises an exception if we don't...
code := VirtualAlloc(Pointer(old_header.OptionalHeader.ImageBase),
old_header.OptionalHeader.SizeOfImage,
MEM_RESERVE or MEM_COMMIT,
PAGE_READWRITE);
if code = nilthenbegin// try to allocate memory at arbitrary position
code := VirtualAlloc(nil,
old_header.OptionalHeader.SizeOfImage,
MEM_RESERVE or MEM_COMMIT,
PAGE_READWRITE);
if code = nilthenbegin
SetLastError(ERROR_OUTOFMEMORY);
Exit;
end;
end;
using MemoryModule will cause access violation for large application built with runtime packages.
This happen to
FixPtr
function inExecuteTLS
.This is due to the
code
was allocated viaVirtualAlloc
to allocate memory at arbitrary position:And it further affect in
ExecuteTLS
:I refer to c version of MemoryModule: https://github.com/fancycode/MemoryModule/blob/master/MemoryModule.c
It seems calling
FixPtr
isn't require.The text was updated successfully, but these errors were encountered: