Skip to content

Commit 245f494

Browse files
committed
Fix one memcheck error in the umfLevelZeroProviderTest.basic test
Fix one "Conditional jump or move depends on uninitialised value(s)" memcheck error in the umfLevelZeroProviderTest.basic test at provider_level_zero.cpp:370 (ASSERT_EQ(hostMemory[i], pattern)). Signed-off-by: Lukasz Dorau <[email protected]>
1 parent f31f7b0 commit 245f494

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/providers/provider_level_zero.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ TEST_F(umfLevelZeroProviderTest, basic) {
364364
ASSERT_EQ(alloc_props.type, ZE_MEMORY_TYPE_DEVICE);
365365

366366
// check if the pattern was successfully applied
367-
uint32_t *hostMemory = (uint32_t *)malloc(size);
367+
uint32_t *hostMemory = (uint32_t *)calloc(1, size);
368368
CopyDeviceToHostMemory(hostMemory, ptr, size);
369369
for (size_t i = 0; i < size / sizeof(int); i++) {
370370
ASSERT_EQ(hostMemory[i], pattern);

0 commit comments

Comments
 (0)