[oi-dev] mapfile and RESERVE_SEGMENT or CAPABILITY

stes@PANDORA.BE stes at telenet.be
Sun Aug 8 12:32:44 UTC 2021


Thanks indeed I noticed this setting is now in /etc/system.d/ in the latest OI but it somehow did not fix my problem.

> set _userlimit=0x7fffc0000000

seems a reasonable setting to simulate the behavior of Linux ...

However I have pushed a workaround to patch - set MAP_32BIT for cog-spur 5.0.3031 for the moment.

If I limit the mmap results to 4GB 32bit then cog-spur also works.

I'd say this is a bug in (very recent) cog-spur versions, the return value of mmap on OI is not wrong,
it is just that the pointer arithmetic in OpenSmalltalk latest code for cog-spur assumes the Linux layout.

The traditional stack-spur interpreter which is more like the traditional Squeak VM continues to support full 64bit.

So stack-spur 5.0.3031 is supporting full 64bit memory;  also cog-spur 2967 still supported the full 64bit.

David Stes

----- Op 8 aug 2021 om 14:01 schreef oi-dev oi-dev at openindiana.org:

> Am 08.08.21 11:27 schrieb "stes at PANDORA.BE" <stes at telenet.be>:
> 
> 
> 
> Back in March 2021 there was an interesting post by Alan Coopersmith about the
> address space layout diagrams for the AMD64 ABI.
> 
> This was related in March to firefox, spidermonkey and so-called tagged
> pointers.
> 
> He described various strategies, some were adding a ld link editor mapfile using
> either RESERVE_SEGMENT or CAPABILITY.
> 
> However I fear that the OpenIndiana ld has no support for RESERVE_SEGMENT.
> 
> I have ran into a new issue in the very latest versions of OpenSmalltalk
> cog-spur where apparently new code in OpenSmalltalk expects the Linux address
> space layout - not the OpenIndiana layout.
> 
> The issue is that new code when ran under a debugger seems to set
> 
> endOfJITZone = 0xffff80ffbcecf000
> 
> instead of
> 
> endOfJITZone = 0x7fffbe400000
> 
> as on Linux. The OpenIndiana layout seems to use the full 64bit pointer range
> while Linux does not seem to do that but unfortunately it appears that
> OpenSmalltalk now expects the Linux layout. A few weeks ago that was not the
> case so I already raised the issue with the OpenSmalltalk developers.
> 
> I am trying now to use a ld -M mapfile on OI as workaround.
> 
> There are some examples in :
> 
> /usr/lib/ld
> 
> and
> 
> /usr/lib/ld/amd64
> 
> These examples are : map.default, map.below4G and map.above4G
> 
> Has anyone - perhaps for spidermonkey ? - created a mapfile for simulating the
> Linux address space layout ?
> 
> Something like: /usr/lib/ld/amd64/map.linux ?
> 
> Thanks
> David Stes
> 
> _______________________________________________
> oi-dev mailing list
> oi-dev at openindiana.org
> [ https://openindiana.org/mailman/listinfo/oi-dev |
> https://openindiana.org/mailman/listinfo/oi-dev ]
> OI mapfile do not support such setting, so I guess the /etc/system setting:
> 
> set _userlimit=0x7fffc0000000
> 
> is the only option for you.
> --
> Carsten
> 
> _______________________________________________
> oi-dev mailing list
> oi-dev at openindiana.org
> https://openindiana.org/mailman/listinfo/oi-dev



More information about the oi-dev mailing list