Lesen von Addresse mit PAGE_EXECUTE Flag trigger keine Exception
-
Hi Leute,
ich allokieren mir mit VirtualAlloc eine Page und setzte die ProtectionFlags auf PAGE_EXECUTE. Wenn ich jetzt zb. mit
0x00000000: size-> 5 opcode: b827031500 MOV EAX, 0x150327 0x00000005: size-> 2 opcode: 8a00 MOV AL, [EAX]
darauf lesend zugreif wird keine Exception geworfen was es aber laut MSDN machen sollte:
MSDN schrieb:
PAGE_EXECUTE
0x10Enables execute access to the committed region of pages. An attempt to read from or write to the committed region results in an access violation.
This flag is not supported by the CreateFileMapping function.
Wenn ich jetzt aber: PAGE_NOACCESS benutzt geht.
Meine ExceptionHandler werden mit AddVector.. und SetUnhandled... gesetzt.
Hab auch mit VMMap von sysInternals ueberprueft ob die allokierte Page wirklich das Flag hat und das hat sie.Gruessle