Comfy-Org / Comfy-Org/comfy-aimdo
Possible mismatch between `cuGetProcAddress` function pointer and driver symbol
- Dominant language
- C
- Stars
- 67
- Forks
- 39
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 10
Description
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?
Contributor guide
Research direction
Start with src/gpu_dispatch.h at line 8 and src-cuda/dispatch.c around line 213. Compare the declared cuGetProcAddress function-pointer signature with the driver symbol resolved through dlsym, then check the relevant driver API definition and build or runtime tests. Done means confirming whether the signatures are compatible and documenting or correcting the dispatch behavior accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100