How to identify the end of a branch in the symbolic execution in clang?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to identify the end of a branch in the symbolic execution in clang?

Neil Nelson via cfe-dev
I am writing a taint tracking checker with clang static analyzer,  and currently I want to do something when a branch is finished being analyzed. So I need to know when the symbolic execution reaches the end of a branch, which means how can I notice that the symbolic execution reaches the end of an If code block or Else code block? I have tried the CompoundStmt, but it didn't work in the callback function CheckPostStmt<CompoundStmt>, and neither did the BlockExpr work. Are there any possible ways to achieve this goal? 

Thank you!

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to identify the end of a branch in the symbolic execution in clang?

A. Sidorin
This post has NOT been accepted by the mailing list yet.
Hello,

To track the end of a single execution path, you may possibly be need to implement check::EndFunction corresponding callback.
Reply | Threaded
Open this post in threaded view
|

Re: How to identify the end of a branch in the symbolic execution in clang?

Pengfei
This post has NOT been accepted by the mailing list yet.
Hi,
Thank you for reply. As far as I know the check::EndFunction can only be invoked when the analyzer core reaches the end of a function being analyzed. However, what I need to know is when the analyzer core reaches the end of a branch, for example the end of an If branch or an Else branch. Is there any possible ways to get this? Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: How to identify the end of a branch in the symbolic execution in clang?

Neil Nelson via cfe-dev
In reply to this post by Neil Nelson via cfe-dev
(Resending with the correct Clang list CCed.)

> On Dec 9, 2015, at 9:05 , Jordan Rose <[hidden email]> wrote:
>
> Hi, Pengfei. I'm not really working on the static analyzer any more; most of my time goes to Swift. Anna and Devin (CCed) are probably the best people to help you, as well as others on the cfe-dev mailing list.
>
> Best,
> Jordan
>
>> On Dec 9, 2015, at 3:23 , [hidden email] wrote:
>>
>> Hello Jordan
>>
>> I am writing a taint tracking checker of clang static analyzer,  and currently I want to do something when a branch is finished being analyzed. Aka I need to know when the symbolic execution reaches the end of an If code block or Else code block. I have tried the CompoundStmt, but it didn't work in the callback function CheckPostStmt<CompoundStmt>, and neither did the BlockExpr work.
>> It seems that the control flow stmt can only be analyzed in a path-insensitive way, such as using the ASTDecl and ASTCodeBody callbacks.
>> Are there any other possible ways during the symbolic execution to achieve this goal? Thank you!
>>
>> Kind regards
>> Pengfei
>>
>> _____________________________________
>> Sent from http://clang-developers.42468.n3.nabble.com
>>
>

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev