(dl_open_worker): Use l_map_start and l_map_end to test for pointer in range of DSO address space.
This commit is contained in:
parent
6884329416
commit
28760b3d01
|
@ -110,9 +110,14 @@ dl_open_worker (void *a)
|
||||||
for (l = _dl_loaded; l; l = l->l_next)
|
for (l = _dl_loaded; l; l = l->l_next)
|
||||||
if (l->l_addr != 0 /* Make sure we do not currently set this map up
|
if (l->l_addr != 0 /* Make sure we do not currently set this map up
|
||||||
in this moment. */
|
in this moment. */
|
||||||
&& caller >= (const void *) l->l_addr
|
&& caller >= (const void *) l->l_map_start
|
||||||
&& (call_map == NULL || call_map->l_addr < l->l_addr))
|
&& caller < (const void *) l->l_map_end)
|
||||||
call_map = l;
|
{
|
||||||
|
/* There must be exactly one DSO for the range of the virtual
|
||||||
|
memory. Otherwise something is really broken. */
|
||||||
|
call_map = l;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (call_map == NULL)
|
if (call_map == NULL)
|
||||||
/* In this case we assume this is the main application. */
|
/* In this case we assume this is the main application. */
|
||||||
|
|
Loading…
Reference in New Issue