This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Patch to detect invalid mergeable string sections
On Mon, Nov 05, 2007 at 02:31:18AM +0000, Joseph S. Myers wrote:
> On Mon, 5 Nov 2007, Alan Modra wrote:
>
> > ld/testsuite/
> > * ld-elf/merge3.d, ld-elf/merge3.s: Delete.
>
> It seems to me tests are still needed to make sure the linker doesn't
> crash (or indeed to verify that the unterminated strings now get properly
> merged).
That could be quite challenging. A meaningful test should fail on a
20071031 ld and pass with today's ld. I think you'd need to replace
ld's memory allocation functions with ones that filled memory with
some non-zero pattern, or run ld under valgrind or somesuch to
reliably detect an error caused by buffer overrun.
--
Alan Modra
Australia Development Lab, IBM