memcpy overlap: quickly detect, diagnose, work around

John Reiser jreiser at
Tue Nov 30 00:08:18 UTC 2010

On 11/29/2010 03:44 PM, Matt McCutchen wrote:
> On Sun, 2010-11-28 at 15:13 -0800, John Reiser wrote:
>> This patch (with .rpms for x86_64 and i686) enables glibc optionally
>> to detect, diagnose, and work around overlap in memcpy/mempcpy:
> What is the mass addition of commented curly braces for?  It is
> distracting from the substance of the patch.

> -#ifdef USE_AS_STRNCMP
> +#ifdef USE_AS_STRNCMP  /*{*/
>  /* Since the counter, %r11, is unsigned, we branch to strcmp_exitz
>     if the new counter > the old one or is 0.  */

Those comments enable parenthesis matching in some text editors.
The scoping of conditional compilation in sysdeps/x86_64/multiarch/strcmp.S
was complicated enough that I needed help figuring it out.
Indeed, it was complicated enough to help conceal a bug.


More information about the devel mailing list