This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
RE: commit 6fb8cbcb58a29fff73eb2101b34caa19a7f88eba causes Dialogic DIVA fax to send corrupted image
- From: "Lu, Hongjiu" <hongjiu dot lu at intel dot com>
- To: Jeff Chua <jeff dot chua dot linux at gmail dot com>, "glibc-bugs at sourceware dot org" <glibc-bugs at sourceware dot org>, Dialogic Support <emea dot support at dialogic dot com>, Dialogic Support <apac dot support at dialogic dot com>
- Date: Tue, 26 Oct 2010 08:15:47 -0700
- Subject: RE: commit 6fb8cbcb58a29fff73eb2101b34caa19a7f88eba causes Dialogic DIVA fax to send corrupted image
- References: <AANLkTinjmt5AHEOCP9M2pOMK3TkHZJ3TLgyrMONDeyGu@mail.gmail.com>
>
> I don't know whether this is a Dialogic Diva Fax problem or Glibc
> problem. With this commit, fax sent is corrupted. Reverting the commit
> solves the problem.
>
> I'm on latest glibc (dbf3a06904168417a05882a871342e7a9ee3b383) and it
> has the same problem, so I bisected to this commit causing the issue.
> I've tried all versions of DIVA including the latest
> Diva4Linux_installer_9.5-110-13.bin and dssdk-gcc4x-110.2555-
> 1.x86_64.rpm
>
> Linux version is 2.6.33
> gcc version 4.4.5 20100925 (prerelease) (GCC)
>
> GNU C Library stable release version 2.11.1, by Roland McGrath et al.
> (OK) GNU C Library development release version 2.12.90, by Roland
> McGrath et al. (bad)
>
> I've attached two images. One good and a corrupted image received.
>
> 6fb8cbcb58a29fff73eb2101b34caa19a7f88eba is the first bad commit
> commit 6fb8cbcb58a29fff73eb2101b34caa19a7f88eba
> Author: H.J. Lu <hongjiu.lu@intel.com>
> Date: Wed Jun 30 08:26:11 2010 -0700
>
> Improve 64bit memcpy/memmove for Atom, Core 2 and Core i7
>
> This patch includes optimized 64bit memcpy/memmove for Atom, Core
> 2 and
> Core i7. It improves memcpy by up to 3X on Atom, up to 4X on Core
> 2 and
> up to 1X on Core i7. It also improves memmove by up to 3X on Atom,
> up to
> 4X on Core 2 and up to 2X on Core i7.
>
>
The new memcpy doesn't work if there is any overlap in destination and
source. Please try to replace memcpy with memmove in Dialogic Diva Fax to
see if the problem goes away. If it is impossible, please write a
memcpy wrapper to check if there is any overlap in destination and
source.
H.J.