[GSD-12417] crash in zesDevicePciGetProperties()
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 300
- PR merge metrics
- No merged PRs in 30d
Description
Hello
hwloc crashes in recent releases of level-zero and compute-runtime. I don't know exactly when it started because it's complicated to test different releases when Debian/Ubuntu official ZE packages (mostly level-zero package names) are incompatible with the deb packages you distribute.
Anyway, here's a small reproducer extracted from hwloc. It basically just list ZES drivers and devices and calls zesDevicePciGetProperties() on each:
```
#include
#include
#include
#include
#include
#include
int main(void)
{
zes_driver_handle_t *sdrh;
uint32_t nbdrivers, i, k;
ze_result_t res;
printf("testing ZES devices\n");
res = zesInit(0);
if (res != ZE_RESULT_SUCCESS) {
fprintf(stderr, "Failed to initialize LevelZero Sysman in zesInit(): %d\n", (int)res);
return 0;
}
nbdrivers = 0;
res = zesDriverGet(&nbdrivers, NULL);
if (res != ZE_RESULT_SUCCESS || !nbdrivers)
return 0;
sdrh = malloc(nbdrivers * sizeof(*sdrh));
if (!sdrh)
return 0;
res = zesDriverGet(&nbdrivers, sdrh);
if (res != ZE_RESULT_SUCCESS) {
free(sdrh);
return 0;
}
printf("found %u L0 ZES drivers\n", nbdrivers);
k = 0;
for(i=0; i
Contributor guide
Assessment
This issue has not been assessed yet.