On Mon, Oct 17, 2011 at 10:43:57AM +0200, Aurelien Jarno wrote: > On Mon, Oct 17, 2011 at 10:03:44AM +0200, Lionel Elie Mamane wrote:
>> Package: libc6 >> Version: 2.11.1-1 >> Severity: important >> On amd64, one specific program behaves differently when run with >> libc6 2.10.2-9 (or earlier) than when run with libc6 2.11.1-1 (or >> later). >> (..) it looks like a 2.10 vs 2.11 thing. I vaguely looked at the NEWS file >> and diff of source code between those versions, the only thing that struck >> my eye is: >> * New optimized string functions for x86-64: strstr, strcasestr, memcmp, >> strcspn, strpbrk, strspn, strcpy, stpcpy, strncpy, strcmp (SSE2, SSE4.2), >> strncmp (SSE2, SSE4.2), strchr (SSE4.2), strrchr (SSE4.2). >> Contributed by H.J. Lu. >> strlen, rawmemchr, strcmp (SSSE3), strncmp (SSSE3). >> Implemented by Ulrich Drepper. >> But I think that if these functions were buggy, we would have noticed! >> So, unlikely. > This is likely to be these functions actually, and more precisely > memcpy(). C standards specifies that the source and dest areas > should not overlap, otherwise memmove() should be used > instead. Recent version of the libc uses to optimize this function, > but some binaries use memcpy() while they should use memmove(). > Given your code is closed source and thus can't be fixed, the best > is to use the provided wrapper, see > /usr/share/doc/libc6/NEWS.Debian.gz for more information about how > to use them. Interesting theory, but according the NEWS.Debian.gz of *sid* and the BTS entries linked to, the issue you refer to seems to be new to (e)glibc 2.13, not (e)glibc 2.11... And the problem was originally observed in *squeeze*. And I've just checked for overlap by running these on the latrace output: grep ' memcpy(' | sed 's/[(,)]/ /g' | gawk '{if ( strtonum($8) <= strtonum($5) && strtonum($8) + strtonum($11) >= strtonum($5)) print "overlap: " $5 " " $8 " " $11 }' grep ' memcpy(' | sed 's/[(,)]/ /g' | gawk '{if ( strtonum($8) >= strtonum($5) && strtonum($5) + strtonum($11) >= strtonum($8)) print "overlap: " $5 " " $8 " " $11 }' Do you happen to have another theory, that would apply to a change between 2.10 and 2.11? -- Lionel -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org