Skip to content
\n

Tracking the source string with partial dataflow analysis ends in the del call. It can't follow to the actual method Process. I also tried to call getTarget / getRuntimeTarget on the DelegateCall but there is no result.

\n

I don't know why it can't follow further or find the Process method ?

","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

Hi.

\n

Thanks for your question. This is a known limitation of how we resolve delegate calls (we do not track delegates stored in collections). If it instead had been

\n
    class DelegateRegistry\n    {\n        public static readonly SimpleDelegate d = null;\n\n        public static void Register(SimpleDelegate del)\n        {\n            d = del;\n        }\n    }
\n

then it ought to work (we do track delegates stored in fields).

\n

I have been wanting to improve this for some time, but it has not yet been a priority.

","upvoteCount":1,"url":"https://github.com/github/codeql/discussions/20255#discussioncomment-14178758"}}}
Discussion options

You must be logged in to vote

Hi.

Thanks for your question. This is a known limitation of how we resolve delegate calls (we do not track delegates stored in collections). If it instead had been

    class DelegateRegistry
    {
        public static readonly SimpleDelegate d = null;

        public static void Register(SimpleDelegate del)
        {
            d = del;
        }
    }

then it ought to work (we do track delegates stored in fields).

I have been wanting to improve this for some time, but it has not yet been a priority.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Hug0Vincent
Comment options

Comment options

You must be logged in to vote
1 reply
@Hug0Vincent
Comment options

Answer selected by Hug0Vincent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants