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.
Original issue reported on code.google.com by ramosian.glider@gmail.com on 13 Feb 2012 at 11:41
Original issue reported on code.google.com by
ramosian.glider@gmail.com
on 13 Feb 2012 at 11:41