[Mono-devel-list] Mono on Windows XP SP2

Kaushik Srenevasan kaushik at vfemail.net
Tue Jan 25 07:05:58 EST 2005


Hi,

Could mini obtaining memory for JITted code from g_malloc be a problem with
systems running Windows XP SP2 or later as Microsoft has added Data
Execution Prevention???

http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2mempr.mspx

"......Applications that attempt to violate DEP will receive an exception
with status code STATUS_ACCESS_VIOLATION (0xC0000005). If an application
requires executable memory, it must explicitly set this attribute on the
appropriate memory by specifying PAGE_EXECUTE, PAGE_EXECUTE_READ,
PAGE_EXECUTE_READWRITE or PAGE_EXECUTE_WRITECOPY in the memory protection
argument of the Virtual* memory allocation functions. Heap allocations using
the malloc() and HeapAlloc() functions are non-executable......"

Probably mini needs to be modified to call VirtualAlloc to allocate memory
that has PAGE_EXECUTE_READWRITE attribute on Windows. VirtualAlloc in
io-layer could just return the result of g_malloc on linux systems where
this may not a problem.

Regards,
Kaushik Srenevasan




More information about the Mono-devel-list mailing list