macOS mmap / dlopen problem

We are having a problem in our C++ app with dlopen returning memory addresses which were previous reserved using mmap() with the MAP_ANON | MAP_PRIVATE | MAP_JIT flags. The mmap is memory is 4Kb page-aligned and returns normally, however sometime later dlopen() is returning an address within the mmap range when no munmap() has been performed. This looks like a bug in the macOS kernal memory manager.

Back in July, I opened support ticket FB14442215 where one of our Engineers was able to create a similar and reproducible problem using Preview to load a large bitmap. This ticket has not yet been acted upon, still showing a status of "Open" .

Any help or suggestions would be most welcome.

Norm Green norm(dot)green(at)gemtalksystems(dot)com

Answered by normg in 802433022

Nevermind. dlopen() returns a handle not a memory address so not a bug. Sorry for the noise.

Accepted Answer

Nevermind. dlopen() returns a handle not a memory address so not a bug. Sorry for the noise.

macOS mmap / dlopen problem
 
 
Q