[Bug ports/15759] tile: C++11 destructors aren't working right
siddhesh at redhat dot com
sourceware-bugzilla@sourceware.org
Sun Jul 21 10:41:00 GMT 2013
http://sourceware.org/bugzilla/show_bug.cgi?id=15759
Siddhesh Poyarekar <siddhesh at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |siddhesh at redhat dot com
--- Comment #1 from Siddhesh Poyarekar <siddhesh at redhat dot com> ---
Looks like a bug in _dl_unmap. It returns without unmapping the object if the
program is not running in a simulator:
/* Support notifying the simulator about removed objects prior to munmap(). */
void internal_function
_dl_unmap (struct link_map *l)
{
int shift;
/* Don't bother if not in the simulator. */
if (__insn_mfspr (SPR_SIM_CONTROL) == 0)
return;
...
__munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start);
}
Looks like the right code should be:
/* Support notifying the simulator about removed objects prior to munmap(). */
void internal_function
_dl_unmap (struct link_map *l)
{
int shift;
/* Don't bother if not in the simulator. */
if (__insn_mfspr (SPR_SIM_CONTROL) == 0)
goto out;
...
out:
__munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start);
}
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list