This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug ports/15759] tile: C++11 destructors aren't working right
- From: "siddhesh at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 21 Jul 2013 10:38:53 +0000
- Subject: [Bug ports/15759] tile: C++11 destructors aren't working right
- Auto-submitted: auto-generated
- References: <bug-15759-131 at http dot sourceware dot org/bugzilla/>
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.