yapi icon indicating copy to clipboard operation
yapi copied to clipboard

Memory high address crash

Open justnonamenoname opened this issue 4 years ago • 13 comments

If you enable memory high address allocation - x64Call will crash

memory.reg (system need to restart to enable)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management] "AllocationPreference"=dword:00010000

I tried change 0x7e (jle singed) to 0x76 (jbe unsigned) , but it didn't help

justnonamenoname avatar Feb 18 '20 08:02 justnonamenoname

Thanks for your feedback.

orca-zhang avatar Feb 26 '20 02:02 orca-zhang

I'll reproduce it and try to fix it.

orca-zhang avatar Feb 26 '20 02:02 orca-zhang

Seems like you have no time for this I can donate for this

justnonamenoname avatar Aug 15 '20 11:08 justnonamenoname

any news on this? @orca-zhang

Bit00009 avatar Dec 01 '20 19:12 Bit00009

I've used MacOS for several years and the disk is not as big to install a windows docker yet.

BTW, I think I'm too lazy. But if you can donate for it, it may encourage me to make it better. : (

orca-zhang avatar Jan 29 '22 11:01 orca-zhang

@orca-zhang paypal?

justnonamenoname avatar Jan 29 '22 12:01 justnonamenoname

orca-zhang avatar Jan 30 '22 03:01 orca-zhang

If you enable memory high address allocation - x64Call will crash

I've tried to reproduce, but failed.

Please give me more information about it.

  1. exe linker param: PLATFORM x64 or x86?
  2. vs version
  3. sample code
    • which class is used: X64Call or ProcessWriter or YAPICall? argument count is less than 7?

orca-zhang avatar Feb 01 '22 16:02 orca-zhang

  1. 32bit exe loadlibrary in 64bit exe
  2. VisualStudio2008

HANDLE Handle=OpenProcess(PROCESS_ALL_ACCESS,FALSE,id); if(Handle) { yapi::YAPICall CallLoadLibraryA(Handle,L"kernel32.dll","LoadLibraryA"); CallLoadLibraryA.Timeout(10000); CallLoadLibraryA.Dw64()(path); }

justnonamenoname avatar Feb 02 '22 08:02 justnonamenoname

OK, I'll check it.

orca-zhang avatar Feb 02 '22 14:02 orca-zhang

The host binary is 64bit exe, and try to load 32bit dll into a 32 bit exe?

orca-zhang avatar Feb 03 '22 14:02 orca-zhang

32bit exe load 64bit dll to 64bit exe

justnonamenoname avatar Feb 04 '22 07:02 justnonamenoname

I've tried both 64bit exe load 32bit dll to a 32 bit exe or 32bit exe load 64bit dll to 64bit exe, both haven't crash, is there any backtrace/stack info or try to check it in normal way.

orca-zhang avatar Feb 07 '22 08:02 orca-zhang