Hi team,
I'm currently developing a device running on USBX and discovered a bug with how the host stack enumerates multiple HID devices of the same class in the hub tree.
From the code, it seems like all devices of the same class share the same pointer to the latest instance for the class created and leaks the previously created instances (since the pointers to them have been overwritten), and a removal event would render all devices of that class unusable because the only pointer to the single usable instance for that class would be tore down. I've described the issue and implemented a fix that worked for me in this PR: #262
When I did the PR I signed the ECA with the wrong email, and I've since resolved that issue. Please let me know if you need any additional context or if I've straight up misunderstood the code.
-- Kajtek
Hi team,
I'm currently developing a device running on USBX and discovered a bug with how the host stack enumerates multiple HID devices of the same class in the hub tree.
From the code, it seems like all devices of the same class share the same pointer to the latest instance for the class created and leaks the previously created instances (since the pointers to them have been overwritten), and a removal event would render all devices of that class unusable because the only pointer to the single usable instance for that class would be tore down. I've described the issue and implemented a fix that worked for me in this PR: #262
When I did the PR I signed the ECA with the wrong email, and I've since resolved that issue. Please let me know if you need any additional context or if I've straight up misunderstood the code.
-- Kajtek