From 447720b03b4ac37cbc1367bf3aad56711a30a307 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 18 May 2016 05:48:56 -0700 Subject: 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. --- benchtests/bench-memmove.c | 1 + 1 file changed, 1 insertion(+) (limited to 'benchtests/bench-memmove.c') 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); -- cgit v1.1