[GH-ISSUE #101] Possible mismatch between cuGetProcAddress function pointer and driver symbol #39

Open
opened 2026-10-26 22:23:58 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @CS-liujf on GitHub (Sep 2, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-aimdo/issues/101

github.com/Comfy-Org/comfy-aimdo@d82e6bedda/src/gpu_dispatch.h (L8)

It declares a function pointer with 5 parameters. However, when resolving the entry point from the driver library, the project uses dlsym:

github.com/Comfy-Org/comfy-aimdo@d82e6bedda/src-cuda/dispatch.c (L213)

which means the 4-parameter symbol is picked.

So the project effectively calls the 4-parameter cuGetProcAddress through a 5-parameter prototype, passing NULL as the extra fifth argument.

Is this intentional, or is it a mistake?

Originally created by @CS-liujf on GitHub (Sep 2, 2026). Original GitHub issue: https://github.com/Comfy-Org/comfy-aimdo/issues/101 https://github.com/Comfy-Org/comfy-aimdo/blob/d82e6beddae42ba31e815a6bf9389568c1224752/src/gpu_dispatch.h#L8 It declares a function pointer with 5 parameters. However, when resolving the entry point from the driver library, the project uses `dlsym`: https://github.com/Comfy-Org/comfy-aimdo/blob/d82e6beddae42ba31e815a6bf9389568c1224752/src-cuda/dispatch.c#L213 which means the 4-parameter symbol is picked. So the project effectively calls the 4-parameter `cuGetProcAddress` through a 5-parameter prototype, passing `NULL` as the extra fifth argument. Is this intentional, or is it a mistake?
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-aimdo#39
No description provided.