Bug#619963: gcc-4.6: wrongly optimizes memmove() into memcpy()
On Thu, Apr 28, 2011 at 04:50:15PM -0500, Jonathan Nieder wrote:
> tags 619963 - moreinfo
> quit
>
> Hi,
>
> Török Edwin wrote:
>
> > Indeed if I remove __restrict the bug is gone, and if I upgrade to libc6
> > 2.13-0exp5, VLC's dec.c seems to be compiled correctly too.
> >
> > Should gcc-4.6 depend on glibc >= 2.13?
> > Or should gcc-4.6 provide a fixed prototype for memmove via fix-includes?
>
> In other words, it is a libc6-dev bug, but it seems that gcc (<< 4.6) did
> not expose it. I suppose that means gcc-4.6 could benefit from
>
> Breaks: libc6-dev (<< fixed version), libc0.1-dev (<< fixed version),
> libc0.3-dev (<< fixed version), libc6.1-dev (<< fixed version)
>
> to force an upgrade. (Side note: it might make sense to rename those
> packages to libc-dev and make libc<n>-dev into a dummy package.)
>
> libc maintainers: any idea which versions mistakenly annotate memmove
> with __restrict? Would that be worth fixing in stable (my hunch is
> "yes")?
>
It's probably worth fixing that in stable, but I don't think we should
do an upload to stable just to fix that. I'll include a patch in the SVN
later, so that it's included in the next upload to stable.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
Reply to: