New miscompilation of elf-strtab.c:_bfd_elf_strtab_finalize
Jakub Jelinek
jakub@redhat.com
Fri Dec 21 21:01:00 GMT 2001
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
More information about the Binutils
mailing list