public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/3432] New: memmove() does not conform with the C99 standard.
@ 2006-10-29  9:36 yuvalfl at gmail dot com
  2006-10-29 18:42 ` [Bug libc/3432] " drepper at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: yuvalfl at gmail dot com @ 2006-10-29  9:36 UTC (permalink / raw)
  To: glibc-bugs

By reviewing the glibc sources it turns out that memmove() only does word copy.
Thus, the function will not work correctly when |dst-src|<|word|.

The C99 standard (section 7.21.2.2 "The memmove function") mandates:
---
#include <string.h>
void *memmove(void *s1, const void *s2, size_t n);

The memmove function copies n characters from the object pointed to by
s2 into the object pointed to by s1. Copying takes place as if the n
characters from the object pointed to by s2 are first copied into a
temporary array of n characters that does not overlap the objects
pointed to by s1 and s2, and then the n characters from the temporary
array are copied into the object pointed to by s1.
---

-- 
           Summary: memmove() does not conform with the C99 standard.
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: yuvalfl at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libc/3432] memmove() does not conform with the C99 standard.
  2006-10-29  9:36 [Bug libc/3432] New: memmove() does not conform with the C99 standard yuvalfl at gmail dot com
@ 2006-10-29 18:42 ` drepper at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: drepper at redhat dot com @ 2006-10-29 18:42 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2006-10-29 18:42 -------
Nonsense, memmove takes the buffer location into account on all the supported
architectures.  I don't know what file you're looking at.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-29 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-29  9:36 [Bug libc/3432] New: memmove() does not conform with the C99 standard yuvalfl at gmail dot com
2006-10-29 18:42 ` [Bug libc/3432] " drepper at redhat dot com

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).