This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: YAH8LP (Yet another H8 Ld Problem :)
- To: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Subject: Re: YAH8LP (Yet another H8 Ld Problem :)
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Fri, 3 Nov 2000 11:41:14 +1100 (EST)
- cc: binutils at sources dot redhat dot com
On Thu, 2 Nov 2000, Joel Sherrill wrote:
> We are back to a core dump. It appears to be for a different reason.
> This is from the free at the bottom of the routine
> bfd_coff_reloc16_get_relocated_section_contents(). Is the pointer
> being corrupted? There is some aliasing of it going on.
It's probably not the pointer but some piece of code writing outside of an
allocated memory block. eg.
struct foobie *p = malloc (n * sizeof (struct foobie));
.
p[-1].field = crasho;
.
p[n+1].field = alternate_crasho; // might not bomb on free (p), but free
. // of something else.
free (p);
These sorts of bugs can be difficult to find. Tools like purify and
electric-fence help.
--
Linuxcare. Support for the Revolution.