kfdtest: MigrateFileBackedRangeTest address sanitizer builds failing

Use alloca to replace variable size array.



Change-Id: I81e5a7d8f6ace203b81f5f5a651b2a6aa948821c
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 88e6921d45]
This commit is contained in:
Philip Yang
2021-09-16 10:18:56 -04:00
parent e9a71840e8
commit c90f3f2648
@@ -1226,7 +1226,8 @@ TEST_F(KFDSVMRangeTest, MigrateFileBackedRangeTest) {
ASSERT_NE(-1, fd);
size_t size = PAGE_SIZE;
char buf[size] = {0x30};
char *buf = reinterpret_cast<char *>(alloca(size));
memset(buf, 0x30, size);
ASSERT_EQ(size, write(fd, buf, size));