public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "torvalds@linux-foundation.org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/12518] memcpy acts randomly (and differently) with overlapping areas
Date: Fri, 04 Mar 2011 23:54:00 -0000	[thread overview]
Message-ID: <bug-12518-131-zgBsDIrEN8@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-12518-131@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=12518

--- Comment #10 from Linus Torvalds <torvalds@linux-foundation.org> 2011-03-04 23:53:36 UTC ---
(In reply to comment #9)
> 
> It solves everything.  If you just relink without retesting you're an idiot and
> acting irresponsible.

It does solve a lot, and at least fixes the "you broke stuff that used to work"
issue.

However, I still don't understand why you guys can't just admit that you might
as well just do memmove() and be done with it. It's not slower. And the excuse
that "you'll have more implementations in the future" is just an even stronger
reason to do that.

To make this very clear: your new "and improved" memcpy() ACTS DIFFERENTLY ON
DIFFERENT MACHINES. That means that all that testing that was done by the
developer at link-time is ALMOST TOTALLY WORTHLESS, because what was tested
wasn't necessarily at all what the user sees.

I really don't understand why you can't admit that random behavior like that by
a very fundamental core library routine is actually a real problem. 

And there really isn't any upside. The optimized routines up to 80 bytes are
the same (in fact, my patch should speed them up by a few cycles), and anything
bigger than that will not notice the extra couple of cycles to check for
overlap.

So while I agree that it's a fix to the immediate problem to just say "don't
screw up for existing binaries", I do NOT understand why the glibc people then
apparently think it's fine to be stupid for new binaries.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  parent reply	other threads:[~2011-03-04 23:54 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25  2:26 [Bug libc/12518] New: " torvalds@linux-foundation.org
2011-02-25  2:29 ` [Bug libc/12518] " torvalds@linux-foundation.org
2011-02-25  3:57 ` hjl.tools at gmail dot com
2011-02-25  4:15 ` torvalds@linux-foundation.org
2011-02-25  9:59 ` drepper.fsp at gmail dot com
2011-02-25 11:49 ` tolzmann at molgen dot mpg.de
2011-02-25 12:07 ` jakub at redhat dot com
2011-02-25 15:20 ` hjl.tools at gmail dot com
2011-02-26  1:56 ` drepper.fsp at gmail dot com
2011-03-02  4:03 ` alexander.hunt2005 at gmail dot com
2011-03-02 20:12 ` smconvey at gmail dot com
2011-03-03 23:28 ` felipe.contreras at gmail dot com
2011-03-04  3:02 ` jvillalo at redhat dot com
2011-03-04  9:28 ` thierry.vignaud at gmail dot com
2011-03-04 16:07 ` ml-bz-dale at riyescott dot com
2011-03-04 23:42 ` drepper.fsp at gmail dot com
2011-03-04 23:54 ` torvalds@linux-foundation.org [this message]
2011-03-05  0:28 ` felipe.contreras at gmail dot com
2011-03-05 13:28 ` oliver.henshaw at gmail dot com
2011-03-12 16:38 ` tmoody at ku dot edu
2011-03-24 21:04 ` bvasselle at gmail dot com
2011-03-25  4:37 ` hjl.tools at gmail dot com
2011-03-25  6:46 ` jakub at redhat dot com
2011-03-28 11:53 ` tmraz at redhat dot com
2011-03-28 11:54 ` felipe.contreras at gmail dot com
2011-03-29 14:43 ` felipe.contreras at gmail dot com
2011-03-29 22:28 ` bvasselle at gmail dot com
2011-03-30  5:14 ` felipe.contreras at gmail dot com
2011-03-30  7:21 ` felipe.contreras at gmail dot com
2011-03-30 10:20 ` y.pronenko at gmail dot com
2011-03-31  8:37 ` shaforostoff at gmail dot com
2011-04-01 23:42 ` drepper.fsp at gmail dot com
2011-04-02  2:57 ` hjl.tools at gmail dot com
2011-04-10 15:39 ` bvasselle at gmail dot com
2011-04-10 15:50 ` felipe.contreras at gmail dot com
2011-05-04 13:32 ` vincent+libc at vinc17 dot org
2011-05-04 15:02 ` felipe.contreras at gmail dot com
2011-06-07  3:07 ` kenyon at kenyonralph dot com
2013-08-12 17:20 ` tudorb at gmail dot com
2013-08-19 23:48   ` Ondřej Bílka
2013-08-19 23:48 ` neleai at seznam dot cz
2013-08-20  1:12 ` tudorb at gmail dot com
2014-02-16 19:41 ` jackie.rosen at hushmail dot com
2014-02-16 19:54 ` kenyon at kenyonralph dot com
2014-05-28 19:41 ` schwab at sourceware dot org
2014-06-27 13:49 ` fweimer at redhat dot com
2015-02-25 10:28 ` mwest@awek-microdata.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-12518-131-zgBsDIrEN8@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).