From 6c4528ba33550e31ab5f317d045f497cf211ec78 Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Tue, 11 Apr 2023 11:40:10 +0000 Subject: [PATCH] Fix assertion when _GLIBCXX_ASSERTIONS is enabled One some platforms, e.g Arch Linux, -D_GLIBCXX_ASSERTIONS compile flag is enabled by default, causing a runtime assertion. Avoid assertion by using std::vector accessor function data(). Change-Id: I118cdf102c3e353f32c618823e363ee1059f3453 [ROCm/ROCR-Runtime commit: 511855d344dc315019f90f7d6c7d171998b0b0ad] --- .../rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp index 162b8a7e24..74d0617495 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -1659,7 +1659,7 @@ void Runtime::LoadTools() { } if (!ld(&hsa_api_table_.hsa_api, hsa_api_table_.hsa_api.version.major_id, - failed.size(), &failed[0])) { + failed.size(), failed.data())) { failed.push_back(lib.name_.c_str()); os::CloseLib(tool); continue;