public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "slyfox at inbox dot ru" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/16004] memcpy/strcpy: detect memory overlap and crash when error is detected
Date: Mon, 23 Jun 2014 07:19:00 -0000	[thread overview]
Message-ID: <bug-16004-131-g1VqEGdb6C@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-16004-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=16004

--- Comment #3 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Well, I think:
* for most of simple (stack-to-stack) 'memcpy's issues by gcc compiler can
prove there is no overlap and call just an unsafe memcpy
* for big chunks to copy one check won't hurt performance
* for small unaligned chunks memcpy is already inefficient

Here is another real-world data corruption:
https://bugs.gentoo.org/show_bug.cgi?id=486984

This time it "just" required patched toolchain and
brand new CPU to notice a bug in test suite.
Before that fix it "only" corrupted real data on
new CPUs but passed test suite.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


  parent reply	other threads:[~2014-06-23  7:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-05 11:29 [Bug libc/16004] New: " slyfox at inbox dot ru
2013-10-09  7:52 ` [Bug libc/16004] " neleai at seznam dot cz
2014-06-13 12:41 ` fweimer at redhat dot com
2014-06-23  3:11 ` allachan at au1 dot ibm.com
2014-06-23  7:19 ` slyfox at inbox dot ru [this message]
2014-06-24  8:30 ` fweimer at redhat dot com
2015-08-27 22:17 ` [Bug string/16004] " jsm28 at gcc dot gnu.org
2024-03-01  7:43 ` sam at gentoo dot org

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-16004-131-g1VqEGdb6C@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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).