From e019191ddfb1fa7617c6f9659d6b44eda6370fcc Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Thu, 27 Oct 2022 20:22:22 +0530 Subject: [PATCH] SWDEV-360317 - Correct array creation. (#3023) Change-Id: I9fd80bc4202a10a83a6c22a813af6cdbb84f3c53 [ROCm/hip-tests commit: 40c42dcc69dab0d18682627eb6a80a7f01d76eb4] --- projects/hip-tests/catch/unit/memory/hipMemAdvise.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hip-tests/catch/unit/memory/hipMemAdvise.cc b/projects/hip-tests/catch/unit/memory/hipMemAdvise.cc index cc2a52a807..09ea32bda8 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemAdvise.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemAdvise.cc @@ -143,7 +143,7 @@ TEST_CASE("Unit_hipMemAdvise_TstFlags") { float *Hmm = nullptr; int AttrVal = 0; HIP_CHECK(hipGetDeviceCount(&NumDevs)); - Outpt = new int(NumDevs); + Outpt = new int[NumDevs]; HIP_CHECK(hipMallocManaged(&Hmm, MEM_SIZE * 2, hipMemAttachGlobal)); // With the following for loop we iterate through each of the Gpus in the // system set and unset the flags and check the behavior.