mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 19:32:25 +08:00
fix: fix compilation issues with clang18
- pass aligned memory to std::map::find and std::map::erase functions - use EXPECT_EQ_VAL when comparing potentially misaligned memory Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7adf9ad32a
commit
340a4906a1
@@ -277,9 +277,11 @@ ze_result_t EventPool::getIpcHandle(ze_ipc_event_pool_handle_t *ipcHandle) {
|
|||||||
|
|
||||||
auto memoryManager = this->context->getDriverHandle()->getMemoryManager();
|
auto memoryManager = this->context->getDriverHandle()->getMemoryManager();
|
||||||
auto allocation = this->eventPoolAllocations->getDefaultGraphicsAllocation();
|
auto allocation = this->eventPoolAllocations->getDefaultGraphicsAllocation();
|
||||||
if (int retCode = allocation->peekInternalHandle(memoryManager, poolData.handle); retCode != 0) {
|
uint64_t handle{};
|
||||||
|
if (int retCode = allocation->peekInternalHandle(memoryManager, handle); retCode != 0) {
|
||||||
return ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY;
|
return ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY;
|
||||||
}
|
}
|
||||||
|
poolData.handle = handle;
|
||||||
memoryManager->registerIpcExportedAllocation(allocation);
|
memoryManager->registerIpcExportedAllocation(allocation);
|
||||||
return ZE_RESULT_SUCCESS;
|
return ZE_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5034,8 +5034,8 @@ TEST_F(DebugApiLinuxTest, GivenNonClassUuidEventWithoutPayloadWhenHandlingEventT
|
|||||||
session->handleEvent(reinterpret_cast<prelim_drm_i915_debug_event *>(&uuid));
|
session->handleEvent(reinterpret_cast<prelim_drm_i915_debug_event *>(&uuid));
|
||||||
|
|
||||||
EXPECT_EQ(50u, session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[uuid.handle].classHandle);
|
EXPECT_EQ(50u, session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[uuid.handle].classHandle);
|
||||||
EXPECT_EQ(uuid.handle, session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[uuid.handle].handle);
|
EXPECT_EQ_VAL(uuid.handle, session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[uuid.handle].handle);
|
||||||
EXPECT_EQ(uuid.class_handle, session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[uuid.handle].classHandle);
|
EXPECT_EQ_VAL(uuid.class_handle, session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[uuid.handle].classHandle);
|
||||||
EXPECT_EQ(nullptr, session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[uuid.handle].data);
|
EXPECT_EQ(nullptr, session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[uuid.handle].data);
|
||||||
EXPECT_EQ(0u, session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[uuid.handle].dataSize);
|
EXPECT_EQ(0u, session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[uuid.handle].dataSize);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user