ramosian-glider / sanitizers

0 stars 0 forks source link

Need to check that the shadow memory does not overlap with existing mappings #40

Open ramosian-glider opened 9 years ago

ramosian-glider commented 9 years ago

Originally reported on Google Code with ID 39

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

ramosian-glider commented 9 years ago
Fixed in r150391

Reported by ramosian.glider on 2012-02-13 15:32:56

ramosian-glider commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:12:58