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]
此提交包含在:
Philip Yang committed 2021-09-16 10:51:56 -04:00
1 父節點 e9a71840e8
當前提交 c90f3f2648
1 file changed
+2 -1
+2 -1
查看文件
@@ -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));