Sometimes hard-to-debug errors arise if the runtime library maps the shadow memory regions
over the existing mappings (those are usually code segments; this may occur if ASLR
is on (see issue 29) or any of the libraries is forced to have a fixed load address
(see issue 38)).
We need to detect such situations and report them, because otherwise mmap() call may
silently pass.
This can be easily done by querying the list of existing mappings, but this is generally
thread-unsafe, so we may need to add locking to prevent libraries from being loaded
or unloaded at this time (see man 3 dyld, _dyld_register_func_for_add_image() and _dyld_register_func_for_remove_image())
I am assuming this is a Mac-only problem for now, although some variations may occur
on other systems.
Reported by ramosian.glider on 2012-02-13 11:41:05
Originally reported on Google Code with ID 39
Reported by
ramosian.glider
on 2012-02-13 11:41:05