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

[incubator-mxnet] branch master updated: Fix undefined behaviour in memory_test.cc, use of delete instead of delete[] to free arrays through unique_ptr. (#9435)

This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 1b5caf6  Fix undefined behaviour in memory_test.cc, use of delete instead of delete[] to free arrays through unique_ptr. (#9435)
1b5caf6 is described below

commit 1b5caf6889d713a544a28742b132b0156499ec19
Author: Pedro Larroy <92...@users.noreply.github.com>
AuthorDate: Mon Jan 15 20:43:46 2018 +0100

    Fix undefined behaviour in memory_test.cc, use of delete instead of delete[] to free arrays through unique_ptr. (#9435)
---
 tests/cpp/misc/memory_test.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/cpp/misc/memory_test.cc b/tests/cpp/misc/memory_test.cc
index 7c83e46..a06e5ec 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) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].