SWDEV-474345 - Address potential segmentation fault in Print_Out_Attributes test
Change-Id: Ie507d3da66d9644eea56a510e76564af1970e2c0
이 커밋은 다음에 포함됨:
@@ -452,10 +452,11 @@ constexpr int kW = 60;
|
||||
} // anonymous namespace
|
||||
|
||||
template <size_t n> void printAttributes(const AttributeToStringMap<n>& attributes, const int device) {
|
||||
int attribute_value;
|
||||
hipError_t ret_val;
|
||||
for (const auto& attribute : attributes) {
|
||||
ret_val = hipDeviceGetAttribute(&attribute_value, attribute.first, device);
|
||||
int64_t attribute_value = 0;
|
||||
ret_val = hipDeviceGetAttribute(reinterpret_cast<int *>(&attribute_value),
|
||||
attribute.first, device);
|
||||
std::cout << std::setw(kW) << std::string(attribute.second).append(": ");
|
||||
if (ret_val == hipSuccess)
|
||||
std::cout << attribute_value << "\n";
|
||||
|
||||
새 이슈에서 참조
사용자 차단