This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.23-331-g447720b


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  447720b03b4ac37cbc1367bf3aad56711a30a307 (commit)
      from  0014680d6a5bdeb4fe17682450105ebed19f35da (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=447720b03b4ac37cbc1367bf3aad56711a30a307

commit 447720b03b4ac37cbc1367bf3aad56711a30a307
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed May 18 05:48:56 2016 -0700

    Clear destination buffer updated by the previous run
    
    Clear the destination buffer updated by the previous run in bench-memcpy.c
    and test-memcpy.c to catch the error when the following implementations do
    not copy anything.
    
    	[BZ #19907]
    	* benchtests/bench-memcpy.c (do_one_test): Clear the destination
    	buffer updated by the previous run.
    	* string/test-memcpy.c (do_one_test): Likewise.
    	* benchtests/bench-memmove.c (do_one_test): Add a comment.
    	* string/test-memmove.c (do_one_test): Likewise.

diff --git a/ChangeLog b/ChangeLog
index ce605c1..5249fbe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-05-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #19907]
+	* benchtests/bench-memcpy.c (do_one_test): Clear the destination
+	buffer updated by the previous run.
+	* string/test-memcpy.c (do_one_test): Likewise.
+	* benchtests/bench-memmove.c (do_one_test): Add a comment.
+	* string/test-memmove.c (do_one_test): Likewise.
+
 2016-05-17  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #20094]
diff --git a/benchtests/bench-memcpy.c b/benchtests/bench-memcpy.c
index c5a7192..9d9e7b6 100644
--- a/benchtests/bench-memcpy.c
+++ b/benchtests/bench-memcpy.c
@@ -55,6 +55,10 @@ do_one_test (impl_t *impl, char *dst, const char *src,
   size_t i, iters = INNER_LOOP_ITERS;
   timing_t start, stop, cur;
 
+  /* Must clear the destination buffer set by the previous run.  */
+  for (i = 0; i < len; i++)
+    dst[i] = 0;
+
   if (CALL (impl, dst, src, len) != MEMCPY_RESULT (dst, len))
     {
       error (0, 0, "Wrong result in function %s %p %p", impl->name,
diff --git a/benchtests/bench-memmove.c b/benchtests/bench-memmove.c
index c38596b..3858f2a 100644
--- a/benchtests/bench-memmove.c
+++ b/benchtests/bench-memmove.c
@@ -70,6 +70,7 @@ do_one_test (impl_t *impl, char *dst, char *src, const char *orig_src,
   size_t i, iters = INNER_LOOP_ITERS;
   timing_t start, stop, cur;
 
+  /* This also clears the destination buffer set by the previous run.  */
   memcpy (src, orig_src, len);
 #ifdef TEST_BCOPY
   CALL (impl, src, dst, len);
diff --git a/string/test-memcpy.c b/string/test-memcpy.c
index 2a0994c..cb072f8 100644
--- a/string/test-memcpy.c
+++ b/string/test-memcpy.c
@@ -53,6 +53,12 @@ static void
 do_one_test (impl_t *impl, char *dst, const char *src,
 	     size_t len)
 {
+  size_t i;
+
+  /* Must clear the destination buffer set by the previous run.  */
+  for (i = 0; i < len; i++)
+    dst[i] = 0;
+
   if (CALL (impl, dst, src, len) != MEMCPY_RESULT (dst, len))
     {
       error (0, 0, "Wrong result in function %s %p %p", impl->name,
diff --git a/string/test-memmove.c b/string/test-memmove.c
index d2ab3f3..4343329 100644
--- a/string/test-memmove.c
+++ b/string/test-memmove.c
@@ -68,6 +68,7 @@ static void
 do_one_test (impl_t *impl, char *dst, char *src, const char *orig_src,
 	     size_t len)
 {
+  /* This also clears the destination buffer set by the previous run.  */
   memcpy (src, orig_src, len);
 #ifdef TEST_BCOPY
   CALL (impl, src, dst, len);

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                  |    9 +++++++++
 benchtests/bench-memcpy.c  |    4 ++++
 benchtests/bench-memmove.c |    1 +
 string/test-memcpy.c       |    6 ++++++
 string/test-memmove.c      |    1 +
 5 files changed, 21 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]