[Mono-dev] Possible bugs in tramp-amd64.c when addresses span 4Gb boundary

Ben Carter benml at saillune.net
Thu Sep 25 08:45:05 UTC 2014


On 24/09/2014 10:34 am, Ben Carter wrote:
> On 24/09/2014 02:22 am, Zoltan Varga wrote:
>> Hi,
>>
>>    Mono tries to allocate all its code into the lower 32 bit part of the
>> address space (see MAP_32BIT in mono-codeman.c). What platform is this ?
>
>   Ah, that might well explain it - this is on Windows, and as far as I
> can see there's no code to perform an equivalent limiting of the
> allocated address ranges. This is starting to make sense now...

  Just as a quick follow-up in case anyone else runs into this - Zoltan 
was absolutely right. The issue was that MONO_ARCH_NOMAP32BIT was not 
set (meaning that the JIT was assuming that all code would be in the 
lower 32 bit region), but the corresponding code to implement the 
MAP32BIT flag in the allocator didn't exist.

  Thus, setting MONO_ARCH_NOMAP32BIT has fixed everything (as far as I 
can tell!).

  Thanks again!
-- 
  Ben Carter - ben at saillune.net


More information about the Mono-devel-list mailing list