-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
C++awaiting-responseThe CodeQL team is awaiting further input or clarification from the original reporter of this issue.The CodeQL team is awaiting further input or clarification from the original reporter of this issue.questionFurther information is requestedFurther information is requested
Description
Description of the issue
I want to resolve calls made with pointer variables, such as:
struct foo_struct {
void (*foo)(void);
};
static void foo_func(void)
{
printf("hello from foo_func\n");
}
static struct foo_struct bar_ops = {
.foo = foo_func,
};
int main(void)
{
// pointer call to foo_func
struct foo_struct *ops_ptr = &bar_ops;
ops_ptr->foo();
// another pointer call to foo_func
void (*ptr_call)(void);
ptr_call = foo_func;
ptr_call();
return 0;
}
Why can't resolveCall from import semmle.code.cpp.ir.dataflow.ResolveCall resolve it?
Is there a solution available for this?
Thanks in advance.
Metadata
Metadata
Assignees
Labels
C++awaiting-responseThe CodeQL team is awaiting further input or clarification from the original reporter of this issue.The CodeQL team is awaiting further input or clarification from the original reporter of this issue.questionFurther information is requestedFurther information is requested