Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
Operating System: ReactOS
Platform: x86 Hardware
Description
Created an attachment (id=5525)
Save the world.
psapi:psapi_main is crashing with this trace in build bot:
Assertion 'MemoryInformationClass == MemoryBasicInformation' failed at ARME::VIRTUAL line 2359
[7hEntered debugger on embedded INT3 at 0x0008:0x808fd156.
kdb:> bt
Eip:
<ntoskrnl.exe:fd157 (lib/rtl/i386/debug_asm.S:32 (DbgBreakPoint))>
Frames:
<ntoskrnl.exe:b6733 (ARM³::VIRTUAL:2359 (NtQueryVirtualMemory@24))>
<ntoskrnl.exe:72cf (ntoskrnl/ke/i386/traphdlr.c:1558 (@KiFastCallEntryHandler@8))>
<ntoskrnl.exe:f7757 (ntoskrnl/ke/i386/trap.s:135 (KiFastCallEntry))>
<ntdll.dll:7b31 (dll/ntdll/dispatch/i386/dispatch.S:252 (KiIntSystemCall))>
<psapi.dll:1cf2 (dll/win32/psapi/psapi.c:836 (GetMappedFileNameA@16))>
<psapi_winetest.exe:26fe (modules/rostests/winetests/psapi/psapi_main.c:158 (test_GetMappedFileName))>
<psapi_winetest.exe:53e2 (modules/rostests/winetests/psapi/psapi_main.c:362 (func_psapi_main))>
<psapi_winetest.exe:17fe (include/reactos/wine/test.h:554 (run_test))>
<psapi_winetest.exe:1a0a (include/reactos/wine/test.h:608 (main))>
<psapi_winetest.exe:5929 (lib/3rdparty/mingw/crtexe.c:275 (__tmainCRTStartup))>
<psapi_winetest.exe:5972 (lib/3rdparty/mingw/crtexe.c:177 (mainCRTStartup))>
<kernel32.dll:2e1f2 (dll/win32/kernel32/process/procsup.c:62 (BaseProcessStartup@4))>
a quick look at psapi show an NtQueryVirtualMemory call with the info class MemorySectionName
A quick google search found this: http://books.google.com/books?id=Fp1ct-bKYdcC&pg=RA1-PA87&lpg=RA1-PA87&dq=MemorySectionName&source=bl&ots=ciUs93yLfP&sig=T_oqlVjFlKf1yZbdXeOhwrEudto&hl=en&ei=C073TNeNOsG88gbChsnUBg&sa=X&oi=book_result&ct=result&resnum=3&ved=0CCoQ6AEwAg#v=onepage&q=MemorySectionName&f=false
A entry in the famous book: Windows NT/2000 native API reference By Gary Nebbett
Later i discovered this http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/virtual.c?pathrev=41406
A few copy pastes later i got a viable patch. I took the chance to reintroduce buffer probing with seh. Successfully tested in qemu.