Use memset for initializing variable sized array
In ASAN builds, the compiler used is clang. The initialization of
variable sized array using assignment operator is causing compilation
failure in ASAN builds. Used memset to fix the same.
Change-Id: I02aef3b99a6cad0cce3a378210a48732e07a88fb
[ROCm/ROCR-Runtime commit: 65911e8368]
这个提交包含在:
1 父节点
9bcc4bafdf
当前提交
245c5e2a40
1 个文件已更改
+2
-1
@@ -441,7 +441,8 @@ TEST_F(KFDDBGTest, SuspendQueues) {
|
||||
|
||||
uint32_t NumQueues = 1;
|
||||
uint32_t QueueIds[NumQueues];
|
||||
struct kfd_queue_snapshot_entry Snapshots[NumQueues] = {0};
|
||||
struct kfd_queue_snapshot_entry Snapshots[NumQueues];
|
||||
memset(Snapshots, 0, NumQueues * sizeof(struct kfd_queue_snapshot_entry));
|
||||
ASSERT_SUCCESS(debug->SuspendQueues(&NumQueues, Queues, &QueueIds[0], 0));
|
||||
|
||||
// Suspend should fail as new queues cannot be suspended
|
||||
|
||||
在新工单中引用
屏蔽一个用户