FEX-Emu / FEX-Emu/FEX

mmap(address_hint, ..., MAP_32BIT) without MAP_FIXED never honors hint

Open
#5,872 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
8k
Forks
351
Avg merge
12h 31m
Merged PRs (30d)
102

Description

The issue was observed when running x64 [sbcl](https://www.sbcl.org/) under emulation.
```
$ sbcl --version
mmap: wanted 1048576 bytes at 0x50000000, actually mapped at 0x7feff000
Dump of /proc/self/maps:
...
```
sbcl calls mmap(0x50000000, ..., MAP_32BIT), see
https://github.com/sbcl/sbcl/blob/master/src/compiler/x86-64/parms.lisp#L123
https://github.com/sbcl/sbcl/blob/master/src/runtime/linux-mman.c#L86

Contributor guide

Open the contributing guide

Research direction

Start with the SBCL call sites in src/compiler/x86-64/parms.lisp and src/runtime/linux-mman.c, then reproduce the mapping under x64 SBCL emulation while tracing FEX's mmap handling for MAP_32BIT. Done means the requested address hint is honored in the reported reproduction without requiring MAP_FIXED.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.