You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/01/15 19:43:49 UTC

[GitHub] piiswrong closed pull request #9435: Fix undefined behaviour in memory_test.cc, use of delete instead of d?

piiswrong closed pull request #9435: Fix undefined behaviour in memory_test.cc, use of delete instead of d?
URL: https://github.com/apache/incubator-mxnet/pull/9435
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/cpp/misc/memory_test.cc b/tests/cpp/misc/memory_test.cc
index 7c83e461bd..a06e5ec8ad 100644
--- a/tests/cpp/misc/memory_test.cc
+++ b/tests/cpp/misc/memory_test.cc
@@ -64,7 +64,7 @@ TEST(MEMORY_TEST, MemsetAndMemcopyPerformance) {
     std::cout << "====================================" << std::endl
               << "Data size: " << test::pretty_num(test_size) << std::endl << std::flush;
 
-    std::unique_ptr<float> buffer_1(new float[test_size]), buffer_2(new float[test_size]);
+    std::unique_ptr<float[]> buffer_1(new float[test_size]), buffer_2(new float[test_size]);
     float *src = buffer_1.get(), *dest = buffer_2.get();
 
     for (size_t x = 0; x < 5; ++x) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services