This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: New miscompilation of elf-strtab.c:_bfd_elf_strtab_finalize
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 21 Dec 2001 22:52:05 +0100
- Subject: Re: New miscompilation of elf-strtab.c:_bfd_elf_strtab_finalize
- References: <Pine.BSF.4.30.0112211308140.52702-100000@dair.pair.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Dec 21, 2001 at 01:09:19PM -0500, Hans-Peter Nilsson wrote:
> Once more egcs-1.1.2 miscompiles elf-strtab.c:_bfd_elf_strtab_finalize.
> The failure looks the same as in
> <URL:http://sources.redhat.com/ml/binutils/2001-11/msg00274.html>. This
> time there's unfortunately no obvious improvement that can "legitimately"
> work aroung the failure. I can get it to work with an ugly placed cast:
>
> *** elf-strtab.c Fri Dec 21 09:34:07 2001
> --- /tmp/elf-strtab.c Fri Dec 21 18:26:29 2001
> *************** alloc_failure:
> *** 443,449 ****
> {
> e = tab->array[i];
> if (e->refcount && ! e->len)
> ! e->u.index = e->u.suffix->u.index
> ! + (e->u.suffix->len - strlen (e->root.string) - 1);
> }
> }
> --- 443,451 ----
> {
> e = tab->array[i];
> if (e->refcount && ! e->len)
> ! e->u.index
> ! = (e->u.suffix->u.index
> ! + ((bfd_size_type) e->u.suffix->len
> ! - strlen (e->root.string) - 1));
> }
> }
>
> but not by (the slightly less ugly) casting the outer non-bfd_size_type
> expression or breaking it out to a local variable. I've had enough; this
> is getting too ugly for my taste. egcs-1.1.2 is obsolete, being two
> versions back, so I don't think we really need to support it. I'd like to
> autoconf away the losing combination: egcs-1.1.2 and 64-bit bfd and an
> i386-host. Thoughts?
Definitely. long long support before gcc 2.95.x is very flakey.
Jakub