From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2075 invoked by alias); 23 Jun 2014 07:19:22 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 2033 invoked by uid 48); 23 Jun 2014 07:19:18 -0000 From: "slyfox at inbox dot ru" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: slyfox at inbox dot ru X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg01371.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16004 --- Comment #3 from Sergei Trofimovich --- 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.