mmap_32bit_base not initialised from -xm unless initLinker is called
In a mixed Haskell/other code program the default setting for mmap_32bit_base
(0x40000000) might already be allocated once the RTS goes to allocate it (probably for the dynamic wrapper FFI functionality?), the RTS then fails with a message suggesting to set the base with -xm
.
Setting -xm
doesn't work because mmap_32bit_base
is not initialised with -xm
in a normal program, it is only initialised in initLinker
.
The calls seem to roughly be:
createAdjustor
alloc_adjustor
alloc_adjustor_chunk
allocateExecPage
mmapAnonForLinker
mmapForLinker
Expected behavior
Always initialise mmap_32bit_base
with value from -xm
or don't use the mmapForLinker
functionality at all for the adjustors (do they need this 32 bit address size thing?).
Environment
- GHC version used: 9.6-9.10
- Operating System: Linux
- System Architecture: x86-64